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
  • #5356
Closed
Open
Issue created Feb 14, 2022 by Derek Bruening@derekbrueningContributor

Add drwrap mode that inverts control for use inside a drbbdup case

Split from #3995

Pasting from there:

I guess this raises a larger issue: we want the drwrap clean call to only be inserted for one of our drbbdup cases. But with no control over drwrap, we can't arrange that, and drwrap is going to go insert its clean call at the start before the drbbdup case dispatch I would guess.

How to solve?

If drbbdup were integrated inside drmgr: would non-bbdup-aware users of drmgr like drwrap be invoked for the default case insertion and not the other cases? So the user can either have wrapping for just one case (has to be default)? Provide an option where user can pick one case, or all cases?

Or, drwrap has to turn its control model around and have the user call "do_drwrap_instru" from its insertion event, with drwrap not registering instru events (but still registering modload, etc.)?

Leaning toward the latter: add a drwrap global flag.

However, we have several issues implementing this:

  • There is no app2app event inside drbbdup! => For now, don't support drwrap_replace.
  • The "for_trace" and "translating" params are not passed => For now, document that drwrap doesn't need them
  • The dr_emit_flags_t return value is not propagated => For now, document that when wrapping and not replacing it always returns DR_EMIT_DEFAULT

We would have to augment drbbdup to support drwrap_replace which needs app2app and under some options needs to return something other than DR_EMIT_DEFAULT.

Assignee
Assign to
Time tracking