This repository was archived by the owner on Jun 19, 2026. It is now read-only.
misc/test_runner: Replace _exit after segfault with syscall#623
Merged
Conversation
kkysen
reviewed
Aug 11, 2025
kkysen
reviewed
Aug 11, 2025
libia2.a provides exit, _exit and call_libc_exit but we can't call any of these after catching a segfault because we're in a signal handler at that point. exit accesses ia2_stackptr_0 (a thread-local) using the %fs segment register whihc does not work from a signal handler. _exit just jumps to exit so it also doesn't work for the same reason and call_libc_exit calls dlopen which calls many functions that are not async-signal-safe. This commit replaces the call to _exit in the signal handler for tests with a syscall for exit instead.
Contributor
Author
This doesn't work since we override |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
libia2.a provides
exit,_exitandcall_libc_exitbut we can't call any of these after catching a segfault because we're in a signal handler at that point.exitaccesses ia2_stackptr_0 (a thread-local) using the %fs segment register which does not work from a signal handler._exitjust jumps toexitso it also doesn't work for the same reason andcall_libc_exitcallsdlopenwhich calls many functions that are not async-signal-safe. This commit replaces the call to_exitin the signal handler for tests with a syscall for exit instead. Originally part of PR #589.