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
  • #3352
Closed
Open
Issue created Jan 19, 2019 by Hendrik Greving@hgreving2304Contributor

atomic_ operations not safe from compiler optimizations

I don't have/know of any test or app that exposes this. In particular, looking at objdump currently - at least on my machine - the compiler doesn't take advantage of the hole. Currently, we C-code

ATOMIC_OP (e.g. inc, compare/exchange etc.) SET (flag operation)

Both statements are "asm volatile". Theoretically, the compiler is allowed to move flag modifying instructions in between the statements. To fix, we need to either

  • move all instructions into the same asm volatile statement OR
  • at least add "cc" clobber to both asm volatile statements (and I would add "memory" to both as well).
Assignee
Assign to
Time tracking