Re: exception not caught? (aborting)
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thanks, -Ethan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Nevermind... I have discovered if you throw an exception from a destructor during a stack unwind from another exception, this immediately triggers a std::terminate. Such as in my case, a mutex being unlocked during the unwind also checked for thread cancellation and reposted the thread cancelation exception, causing the sudden terminate. For reference in future search results, it seems if you see these in the stack trace: #7 0x9060f5ee in _Unwind_Backtrace () #8 0x9060f794 in _Unwind_RaiseException () ...then that suggests it's a destructor re-throw. (I wouldn't know if there are other times these also show up, but in my testing that's the only time I see it) FWIW, it sure would be nice if pthread_cancel did a C++ destructor aware stack unwind on darwin like it does on linux so I wouldn't have to do this exception stuff manually to reimplement it... just say'n ;) This email sent to site_archiver@lists.apple.com
participants (1)
-
Ethan Tira-Thompson