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
  • !4662

i#1921 native sig: Handle signals during DR initialization

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i1921-init-time-signals into master Jan 07, 2021
  • Overview 3
  • Commits 3
  • Pipelines 0
  • Changes 7

Puts in place 6 fixes for handling signals during DR initialization, typically in a start/stop setup where other threads are alive.

  1. Copy the app handler at init time for delivering native signals during init.

  2. Reorder signal_arch_init(), which obtains the signal frame size, to run before DR installs its handler.

  3. Obtains the app handler before installing DR's handler, eliminating a (narrow) race window.

  4. Until DR starts executing the app, continues delivering native signals and using the globally recorded app handler, to match how DR init works.

  5. Set detacher_tid between init and setup to avoid races like in DR's handler at the end of init that were under #3535 (closed)

  6. Handle a race where the init thread has set the global try_except, causing master_signal_handler_C to think an app thread's signal is DR's. We add a global_try_tid and check the thread id to solve this.

Augments api.detach_signal with signals sent during init.

Also tested on a large proprietary application.

Issue: #1921 (closed), #3535 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i1921-init-time-signals