This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: No useful backtrace after uncaught exception in std::thread


On 2011-11-15 21:14, Jonathan Wakely wrote:
2011/11/15 Tobias RingstrÃm:
That's more like it. Is the std::thread behaviour a bug, or am I missing
something? Though the C++11 standard seems to allow the stack to be unwound
before std::terminate is called, it exceptionally unhelpful. I've search but
not been able to find any explanation.
No, it's not a bug, but it could be improved.

Heh, that's an understatement. :-)


Now that the compiler support noexcept we should use that instead and
not catch the exception, causing the runtime to call terminate without
unwinding the stack.

I'll make that change for 4.7.0

That's great news, and a good hint, too. I simply added a noexcept to my threads' main functions as a workaround, and it works as advertised. Thanks for your quick help!


/Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]