-
Notifications
You must be signed in to change notification settings - Fork 566
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#5256 sigprocmask: enable linux.sigaction on MacOS #5258
Conversation
Enables the linux.sigaction test on MacOS. Also enables tmate debugging for MacOS. Issue: #5256
Added the ifdef in the wrong routine.
I'm seeing a hang in the The test ends up succeeding after 90s but that's just because of the timeout. It works fine when the test is run with |
https://www.unix.com/man-page/osx/3HEAD/siginfo.h/ si_info <= 0 denotes user-sent signals on Mac as well.
The problem seems to be that the Line 6343 in 686f1a1
does not return true on Mac. On Linux, the SIGTERM is recognised as a user-generated signal at Line 4851 in 686f1a1
The second condition in is_sys_kill also returns false because is_at_do_syscall is false, but the syscall is a SYS_kill .
|
I made a fix to Following the bug more, I see that this may be the loop it's hitting: dynamorio/core/arch/x86/x86.asm Line 842 in 686f1a1
This could be because |
run arm tests |
Fixes and enables the linux.sigaction test on MacOS.
On MacOS, sigprocmask has different behaviour than Linux. It
does not fail for an unreadable or unwriteable old sigset. Also,
it does not need a size arg.
Fixes terminate_via_kill on MacOS. We need to add a constant
for Unix syscalls on Mac. Otherwise it results in a hang due to
the debug infinite loop at global_do_syscall_syscall when we
attempt to SIGTERM the process in linux.sigaction.
Fixes is_sys_kill detection on Mac. Things seem to work without
this, but the latest Mac documentation shows that the method
we use for non-MacOS (si_code <= 0) would work on Mac too:
https://www.unix.com/man-page/osx/3HEAD/siginfo.h
Fixes sigaction mask comparison in the linux.sigaction test.
Fixes a corner case where a bad old sigset fails the syscall with
EFAULT, but still succeeds in setting the new sigset.
Also adds a native execution test for linux.sigaction. This is to
verify kernel's behaviour in the CI.
Adds a -no_intercept_all_signals test for linux.sigaction.This is to
verify write faults in the path where DR has to manually modify
the old sigset returned by the kernel in sigprocmask.
Issue: #5257, #5254
Fixes: #5256