You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I'm trying to figure out why an object on the stack doesn't have its
destructor called when a C++ exception is thrown in a fairly complex
section of code (a recursive descent scripting language interpreter).
It's looking to me to be a compiler/runtime/optimiser bug because it
works correctly in full debug mode (-d2) or when built with gcc on
Linux. However, it's quite possibly a bug in my code that is interfering
with the clean up process.
Does anyone understand how the runtime tracks objects that need to be
cleaned up when the stack is unwound or have any advice on how to
diagnose the issue?
The object in question is a custom auto pointer I've written that tracks
references by forming a ring of auto pointer objects so the failure to
destruct one leads to dangling pointers and a crash.