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

i#3966: Switch 32-bit x86 Linux to 16-byte stack alignment

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i3966-32bit-stack-align into master Apr 20, 2020
  • Overview 18
  • Commits 8
  • Pipelines 0
  • Changes 21

Abandons the 4-byte stack alignment DR was using for 32-bit x86 Linux (for compatibility with legacy code). The SysV ABI breakage by gcc 4.5 was 10 years ago and in that time other compilers have followed suit, making 16-byte the de facto standard. Clang doesn't even support requesting 4-byte stack alignment. DR is now switching to the modern ABI of 16-byte stack alignment.

Bumps the version to 7.92 and marks OLDEST_COMPATIBLE_VERSION as 791 to indicate the binary compatbility break for 32-bit x86 DR.

Leaves Windows as 4-byte-aligned, since changing the injection assembly code and other pieces would be a bunch of extra work for little benefit: Windows 32-bit only requires 4-byte alignment, and the code is not that much more complex with a split alignment.

Aligns the stack after clean call preparation (state saving) and again after clean call argument setup. Currently the stack restores can end up with two LEA's in a row; we leave removing that for future work.

Adds stack alignment checks to some of the clean call tests.

Updates the manual stack alignment in DR assembly code. I only found a few places to update and I expected to find more. We should monitor usage outside the test suite and look for problems.

Issue: #847 (closed), #3966 (closed), #4200 (closed) Fixes: #3966 (closed) Fixes: #4200 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i3966-32bit-stack-align