Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#1973 musl: Don't pass SS_ONSTACK to sigaltstack in tests #7198

Merged
merged 6 commits into from
Feb 4, 2025

Conversation

ziyao233
Copy link
Member

@ziyao233 ziyao233 commented Jan 18, 2025

POSIX.1 requires SS_ONSTACK to appear only in a stack_t retrieved from
sigaltstack(), not one passed to it. musl checks the invalid flag and will
bail out with EINVAL before issuing a syscall in this case, failing the test.

This commit sets ss_flags to zero instead, on both glibc and musl this
should issue a syscall, which fixes assertion failures encountered in
linux.signal*, api.static_signal and drcachesim.burst_threads on musl.

Issue: #1973

POSIX.1 requires SS_ONSTACK to appear only in a stack_t retrieved from
sigaltstack(), not one passed to it. musl checks the invalid flag and
will bail out with EINVAL before issuing a syscall in this case.

This commit sets ss_flags to zero in the test instead, on both glibc and
musl this should issue a syscall and result in an EPERM failure.

Issue: DynamoRIO#1973
suite/tests/linux/signal-base.h Show resolved Hide resolved
suite/tests/linux/signal-base.h Show resolved Hide resolved
@ziyao233 ziyao233 changed the title i#1973: Fix linux.signal* tests on musl i#1973 musl: Fix linux.signal* tests on musl Feb 3, 2025
@ziyao233 ziyao233 changed the title i#1973 musl: Fix linux.signal* tests on musl i#1973 musl: Don't pass SS_ONSTACK to sigaltstack in tests Feb 3, 2025
@ziyao233 ziyao233 merged commit ac47745 into DynamoRIO:master Feb 4, 2025
17 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