When I compile some code with the near-trunk clang++ I get this:
...
tail call void @_Unwind_Resume_or_Rethrow(i8* %exn2) noreturn
unreachable
...
declare void @_Unwind_Resume_or_Rethrow(i8*)
...
Same with __cxa_throw. 'noreturn' is missing on declarations.
This seems to be a bug.
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.
Same with __cxa_throw. 'noreturn' is missing on declarations.
This seems to be a bug.
It really shouldn't make a difference; the call site should take priority anyway.
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.
If the unwind state is broken, we're well into who-really-cares-what-happens state. I
would abstractly prefer if URR just called abort() because it doesn't disguise the problem,
but whatever.