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
  • Issues
  • #3535
Closed
Open
Issue created Apr 11, 2019 by Hendrik Greving@hgreving2304Contributor

safe_read magic unstable during detach from threaded app.

Following happens with a small reproducer that we produced off Google code.

  1. DR is attached to app running threaded code. The app is sending PROF signals (but type of signal doesn't matter, as long as it is asynchronous and process-directed).
  2. The app starts a detach via start/stop API (with_cleanup() path).
  3. Detach syncs and all threads go native. At this point, the thread's TLS (DynamoRIO's) has been removed.
  4. Main thread is not done cleaning up, signal handlers are still DR's.
  5. PROF signal comes in, child thread receives it. Signal handler calls safe_read_tls_magic(). <=>
  6. Corner case: main thread removes signal handlers and restores the app's handlers.
  7. safe_read_tls_magic() segfaults because no TLS.
  8. SIGSEGV is delivered to app.
Assignee
Assign to
Time tracking