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

i#4117: Add missing dr_standalone_init() and _exit() calls

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i4117-standalone-exit into master Feb 20, 2020
  • Overview 8
  • Commits 2
  • Pipelines 0
  • Changes 33

The filed bug is about raw2trace_directory using the DR API without initializing DR, but I expanded this to clean up the whole code base:

Adds dr_standalone_init() and _exit() to raw2trace_directory_t. This fixes an assert when calling dr_open_file() due to uninitialized state.

Adds {dr_,}standalone_exit() calls to all cases where _init() is called, except where we can't do that (drdecode heap usage).

For the C++ view and opcode_mix tools, uses a first-field destructor to ensure dr_standalone_exit() is called after any DR heap used by other fields is freed.

Fixes several bugs where IR cleanup calls were missing in the api.ir test, revealed by dr_standalone_exit's unfreed-memory check.

Fixes #4117 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i4117-standalone-exit