Visitar URL original
vdso: emit unwind tables and check PT_GNU_EH_FRAME / DT_NEEDED by copybara-service[bot] · Pull Request #17627 · google/gvisor · GitHub
Skip to content

vdso: emit unwind tables and check PT_GNU_EH_FRAME / DT_NEEDED - #17627

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl1020815689
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl1020815689

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

vdso: emit unwind tables and check PT_GNU_EH_FRAME / DT_NEEDED

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.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Nov 13, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl1020815689 branch 2 times, most recently from e0a1289 to 4d4f31a Compare November 13, 2026 11:00
@copybara-service copybara-service Bot changed the title vdso: emit unwind tables and drop implicit libpthread dependency vdso: emit unwind tables and check PT_GNU_EH_FRAME / DT_NEEDED Nov 13, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants