Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > openwatcom.users.c_cpp > #3568
| From | Brian Havard <brianh@kheldar.apana.org.au> |
|---|---|
| Newsgroups | openwatcom.users.c_cpp |
| Subject | Diagnosis of failure to destruct on exception |
| Date | 2019-01-08 15:34 +1100 |
| Organization | OpenWatcom |
| Message-ID | <q11988$gmk$1@www.openwatcom.org> (permalink) |
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.
Back to openwatcom.users.c_cpp | Previous | Next | Find similar
Diagnosis of failure to destruct on exception Brian Havard <brianh@kheldar.apana.org.au> - 2019-01-08 15:34 +1100
csiph-web