-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with C++ virtual destructor #7
Comments
Hi, What is the line Unfortunately it seems in C++ you can't get a function pointer to a C++ class destructor: http://stackoverflow.com/questions/10858998/how-do-i-get-the-member-function-pointer-of-a-destructor So I am not sure you can use I think it may still be possible to adapt tgc for use with C++ though. One idea would be something along these lines:
There are probably still some problems E.G. that we want to make sure |
@orangeduck Hey,
Is actually accessing the virtual dispatcher table on
So what I was actually doing is |
Nice - never knew about that hack. One other thing to be careful about is that tgc does not order destructors. E.G when an object goes out of scope so does all of it's children - tgc doesn't resolve the ordering of destructors in any way and some of the child objects may have their destructors called before the parent or vise versa. Otherwise I am interested to see how this goes 👍 |
So I'm trying to exploit tgc for C++ automatic GC dream:
The
dtor
is virtualized. However, when the program is sweeping and deleting theobject
, thedtor
was not able to be called, and instead asegfault
occurred. Can someone figure out what's happening?The text was updated successfully, but these errors were encountered: