-
Couldn't load subscription status.
- Fork 78
Closed
Labels
A-heapArea: Heap (including Mmapper, VMMap)Area: Heap (including Mmapper, VMMap)C-bugCategory: BugCategory: BugF-investigateCall For Participation: Investigate the issue and provide more detailed directionCall For Participation: Investigate the issue and provide more detailed direction
Description
The use of MAP_FIXED flag in the dzmmap functions means we overwrite any previous mapping that may overlap with our current request:
Line 15 in a4110d9
| let flags = libc::MAP_ANON | libc::MAP_PRIVATE | libc::MAP_FIXED; |
Although it is very unlikely to happen in 64-bits targets, it is still possible.
For example, we do not know how various malloc implementations use the address space, and we may overwrite their mappings.
An alternative is to remove the MAP_FIXED flag and compare the result of mmap with our requested starting address.
AFAIK, they will be the same if there is no overlaps.
Metadata
Metadata
Assignees
Labels
A-heapArea: Heap (including Mmapper, VMMap)Area: Heap (including Mmapper, VMMap)C-bugCategory: BugCategory: BugF-investigateCall For Participation: Investigate the issue and provide more detailed directionCall For Participation: Investigate the issue and provide more detailed direction