Bill Wendling
2010-Jul-16 01:30 UTC
[LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
On Jul 15, 2010, at 5:51 PM, John McCall wrote:>> Also can _Unwind_Resume_or_Rethrow actually return? When I run some >> simple exception code in JIT I see that this function actually returns >> and then SEGVs. > > I have no idea what system you're on, but _Unwind_Resume_or_Rethrow really > isn't allowed to return. >It's not. But if the unwind library can't handle something, then the _Unwind_Resume_or_Rethrow could fall out of the function (it would assert in debug mode). Darwin's implementation of _URoR in libunwind does this. -bw
Yuri
2010-Jul-16 01:52 UTC
[LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
On 07/15/2010 18:30, Bill Wendling wrote:> It's not. But if the unwind library can't handle something, then the _Unwind_Resume_or_Rethrow could fall out of the function (it would assert in debug mode). Darwin's implementation of _URoR in libunwind does this. > >Isn't unwind library supposed to call terminate() every time it can't handle something? Yuri
Bill Wendling
2010-Jul-16 23:01 UTC
[LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
On Jul 15, 2010, at 6:52 PM, Yuri wrote:> On 07/15/2010 18:30, Bill Wendling wrote: >> It's not. But if the unwind library can't handle something, then the _Unwind_Resume_or_Rethrow could fall out of the function (it would assert in debug mode). Darwin's implementation of _URoR in libunwind does this. >> > Isn't unwind library supposed to call terminate() every time it can't handle something? >I don't see anything specifying that it should call terminate() in the exception ABI document: http://www.codesourcery.com/public/cxx-abi/abi-eh.html -bw
Possibly Parallel Threads
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
- [LLVMdev] Why UnreachableInst instruction is required when the last call has NoReturn flag?