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
  • #4052
Closed
Open
Issue created Jan 25, 2020 by Derek Bruening@derekbrueningContributor

CRASH due to uninitialized static TLS for static DR on Windows

After fixing #4030 (closed), the static-DR apps using droption (drcachesim offline) are crashing under VS2017. Their static TLS is not set up and TEB.ThreadLocalStoragePointer is NULL.

In #2117 (closed) we turned off -private_loader for UNIX, but on Windows we have it. Pasting from that issue:

Unlike on Linux, on Windows we don't rely on private libs filling in key TLS pieces for us and we have a less-significant swap. Furthermore, we have a much heavier dependence on -private_loader and -private_peb throughout DR API code. Plus, at least partial library isolation is possible due to the inability to link in static WINAPI libs. Thus, it seems like we should leave it on for Windows.

That makes sense. So I guess we try to leave it on, and we run the i#4030 code on the executable for static DR? Basically running it twice and hoping there are no bad consequences from that?? Or, better to just copy the app TLS data and not call the initializers?

Assignee
Assign to
Time tracking