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
  • #3549
Closed
Open
Issue created Apr 17, 2019 by Administrator@rootContributor

Aggressive inlining breaks static detach

Created by: Carrotman42

For static detach, we decide when to stop interpretting and start running code natively based on whether the App PC the next basic block to run is in a static set of PCs:

https://github.com/DynamoRIO/dynamorio/blob/ff837d4f64c0dfb0fab73d65d8884941dc9f4bae/core/dispatch.c#L249-L276

Unfortunately, when DR is compiled statically and link-time-optimizations are enabled, the application is not guaranteed to actually run that code at that location: internally we call dr_app_stop_and_cleanup_with_stats in a helper function, and in some cases it is inlined into our helper function, causing our helper to be the one who calls directly into detach_on_permanent_stack. This ends up causing self-interp and crashes when we hit a TLS action while using drcachesim.

My first thought is to disable inlining for all of the relevant stopping points.

Assignee
Assign to
Time tracking