Skip to content

Conversation

kammce
Copy link
Member

@kammce kammce commented Jul 10, 2025

When using LTO, the compiler may emit a _Unwind_Resume call rather than a __cxa_end_cleanup at the end of a landing pad. Calling GCC's unwinder while the estell unwinder is running will be UB. This wraps that API to call our __cxa_end_cleanup. The pointer to the current exception object passed to _Unwind_Resume, is ignored.

@kammce kammce changed the title 🐛 (patch) Wrap _Unwind_Resume 🐛 (patch) Wrap _Unwind_Resume Jul 10, 2025
When using LTO, the compiler may emit a `_Unwind_Resume` call rather
than a `__cxa_end_cleanup` at the end of a landing pad. Calling GCC's
unwinder while the estell unwinder is running will be UB. This wraps
that API to call our `__cxa_end_cleanup`. The pointer to the
current exception object passed to _Unwind_Resume, is ignored.
@kammce kammce force-pushed the override-unwind-resume branch from 15a1e45 to c6e7d9b Compare July 10, 2025 19:37
@kammce kammce merged commit 67b8b05 into main Jul 10, 2025
9 checks passed
@kammce kammce deleted the override-unwind-resume branch July 10, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant