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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8 January 2013 16:05, Jonathan Wakely wrote:
> On 8 January 2013 13:28, Tobias Ringström <tobias@xxxxxxxxx> wrote:
>> On 11/15/2011 09:14 PM, Jonathan Wakely wrote:
>>>
>>>
>>> What happens in std::thread is that we catch the exception (at which
>>> point the stack has been unwound) then call std::terminate explicitly.
>>>   That was done to ensure we onform to the standard and terminate as
>>> required.
>>>
>>> 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
>>
>>
>> Remember this from over a year ago?
>>
>> I just tried this with 4.7.2 on Fedora 17, and as far as I can tell, it
>> behaves just like 4.6.  Did this change never happen?
>
> I tried adding it, it didn't help. I don't remember why.

On some targets using noexcept for the thread start function would be
non-conforming.

GNU libc-based systems use a special exception type for thread
cancellation, and if thrown that exception *must* be allowed to leave
the thread start function, so the function can't be noexcept.

So although improving backtraces for noexcept functions would be good,
it won't help std::thread



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux