Repository navigation
vdso: emit unwind tables and check PT_GNU_EH_FRAME / DT_NEEDED - #17627
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
test/cl1020815689
branch
2 times, most recently
from
November 13, 2026 11:00
e0a1289 to
4d4f31a
Compare
Some C++ toolchains pass `-fno-asynchronous-unwind-tables` in non-optimized or sanitizer builds. When `.eh_frame` is omitted, the linker leaves the `PT_GNU_EH_FRAME` segment declared in the vDSO linker script at virtual address 0 with size 0. On arm64, `libgcc_s` (`_Unwind_Find_FDE`) dereferences `dlpi_addr + p_vaddr` when unwinding across `__kernel_rt_sigreturn` (e.g. during `pthread_cancel` in `EpollTest.UnblockWithSignal`), causing a `SIGSEGV`. Pass `-fasynchronous-unwind-tables` in `copts` on `vdso.so` so `.eh_frame` and `.eh_frame_hdr` are always emitted, and teach `check_vdso.py` to verify both that `PT_GNU_EH_FRAME` is non-empty and mapped inside a `PT_LOAD` segment and that the vDSO carries no `DT_NEEDED` dynamic dependencies. PiperOrigin-RevId: 1020815689
copybara-service
Bot
force-pushed
the
test/cl1020815689
branch
from
November 13, 2026 11:58
4d4f31a to
dd93c76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vdso: emit unwind tables and check PT_GNU_EH_FRAME / DT_NEEDED
Some C++ toolchains pass
-fno-asynchronous-unwind-tablesin non-optimized orsanitizer builds. When
.eh_frameis omitted, the linker leaves thePT_GNU_EH_FRAMEsegment declared in the vDSO linker script at virtual address0 with size 0. On arm64,
libgcc_s(_Unwind_Find_FDE) dereferencesdlpi_addr + p_vaddrwhen unwinding across__kernel_rt_sigreturn(e.g.during
pthread_cancelinEpollTest.UnblockWithSignal), causing aSIGSEGV.Pass
-fasynchronous-unwind-tablesincoptsonvdso.soso.eh_frameand.eh_frame_hdrare always emitted, and teachcheck_vdso.pyto verify boththat
PT_GNU_EH_FRAMEis non-empty and mapped inside aPT_LOADsegment andthat the vDSO carries no
DT_NEEDEDdynamic dependencies.