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

i#3982: Increase size of initial brk reservation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i3982-static-brk into master Jan 30, 2020
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 5

Reserves 4MB instead of just 4KB for the initial reservation for -emulate_brk, to avoid an mmap (such as a client lib) blocking the brk and the app running out during early init, when it can't recover and can crash.

Fixes two related issues:

  • -vm_base_near_app was not checking for overlap with the app to see whether the default -vm_base will work. Without this fix my test below does not reproduce the bug.
  • Sets the preferred base for drsyms to 0x76000000 for UNIX (it was already set for Windows) to avoid colliding with end-user clients like drmemtrace.

Tested on a static app with a certain size where libdrmemtrace.so truncates the brk and reproduces the crash: $ clang hello.c -g -o hello-static -static -Wl,-Ttext=0x71f54000 $ bin64/drrun -t drcachesim -dr_ops "-vm_base_near_app -vm_size 128M" -- hello-static

Fixes #3982 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i3982-static-brk