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
  • #2557
Closed
Open
Issue created Jul 21, 2017 by Derek Bruening@derekbrueningContributor

HANG: os_heap_reserve_in_region incorrectly thinks a large alloc spanning the end of the requested region is a match

With a maps file something like this:

00400000-17d0f000 r-xp ... <application>
19c78000-c6998000 rw-p 00000000 00:00 0                                  [heap]
c6998000-c82e2000 rw-p 00000000 00:00 0                                  [heap]
c82e2000-c82e8000 rw-p 00000000 00:00 0                                  [heap]

During init with default options and the client statically linked into the application, we have:

vmm_heap_unit_init: preferred=0x0000000055bfc000, allow=0x0000000000000000-0x0000000093dfffff
os_heap_reserve_in_region: 536887296 bytes in 0x0000000000000000-0x0000000093dff000
os_heap_reserve_in_region: asked for 0x00000000c6998000 size=536887296 got error 2 
os_heap_reserve_in_region: asked for 0x00000000c6998000 size=536887296 got error 2 
os_heap_reserve_in_region: asked for 0x00000000c6998000 size=536887296 got error 2 
os_heap_reserve_in_region: asked for 0x00000000c6998000 size=536887296 got error 2 
os_heap_reserve_in_region: asked for 0x00000000c6998000 size=536887296 got error 2 
os_heap_reserve_in_region: asked for 0x00000000c6998000 size=536887296 got error 2 
...

It's an infinite loop. The code:

        if (iter.vm_start >= start &&
            MIN(iter.vm_start, end) - MAX(last_end, start) >= size) {

fails to also check that the gap it found is not occupied, when it spans the endpoint.

Assignee
Assign to
Time tracking