Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !5258

i#5256 sigprocmask: enable linux.sigaction on MacOS

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Abhinav Anil Sharma requested to merge i5256-sigprocmask-macos into master Dec 17, 2021
  • Overview 57
  • Commits 38
  • Pipelines 0
  • Changes 8

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 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i5256-sigprocmask-macos