[PATCH] libsupc++: Fix UB terminating on foreign exception

Julia DeMille me@jdemille.com
Mon Jan 15 17:31:05 GMT 2024


Some more info:
On 2024-01-14 21:39, Julia DeMille wrote:
> I've gotten this to work, and run into an unexpected situation. 
> Something about the personality routine is causing a SIGABRT. 
> Investigating further.
This occurs due to an assertion in _Unwind_SetGR. Seemingly, the 
compiler intrinsic `__builtin_eh_return_data_regno` is doing something 
it *really* should not. I'm not a compiler developer, and have no clue 
how to investigate this.

This issue does not occur with Rust.

Additionally, LLVM's libc++abi manages not only to cleanly handle a Rust 
panic, but also, through some voodoo magic that took me by surprise, 
recognize Objective-C exceptions (and provide info on them) in its 
terminate handler. Perhaps due to Objective-C++? Hell if I know.

Thought it was worth mentioning that other implementations *have* gotten 
this working, though.
-- 
Thanks,
Julia DeMille
she/her



More information about the Libstdc++ mailing list