Skip to content

meson: Fix unwinding error in libunwind over glibc - #5267

Merged
Alexays merged 1 commit into
Alexays:masterfrom
aokblast:fix_libcxx_overglibc
Aug 27, 2026
Merged

meson: Fix unwinding error in libunwind over glibc#5267
Alexays merged 1 commit into
Alexays:masterfrom
aokblast:fix_libcxx_overglibc

Conversation

@aokblast

Copy link
Copy Markdown
Contributor

glibc's pthread_cancel dlopens libgcc_s.so.1 and uses its unwinder, while libc++abi's personality routine resolves the Unwind* accessors from the global scope, where LLVM libunwind wins. This causes the two unwinders to interpret each other's unwind context incorrectly, and cancelling a thread segfaults. Pull libgcc_s into DT_NEEDED before libc++abi/libunwind so all Unwind* symbols resolve to the same unwinder.

glibc's pthread_cancel dlopens libgcc_s.so.1 and uses its unwinder,
while libc++abi's personality routine resolves the Unwind* accessors
from the global scope, where LLVM libunwind wins. This causes the two
unwinders to interpret each other's unwind context incorrectly, and
cancelling a thread segfaults. Pull libgcc_s into DT_NEEDED before
libc++abi/libunwind so all Unwind* symbols resolve to the same unwinder.
@Alexays
Alexays merged commit 154fa08 into Alexays:master Aug 27, 2026
10 checks passed
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.

2 participants