Bug 203254

Summary: Avoid MAP_FIXED in aspacemgr
Product: [Developer tools] valgrind Reporter: Nicholas Nethercote <njn>
Component: generalAssignee: Julian Seward <jseward>
Status: ASSIGNED ---    
Severity: normal    
Priority: NOR    
Version: 3.5 SVN   
Target Milestone: blocking3.6.0   
Platform: Unlisted Binaries   
OS: macOS   
Latest Commit: Version Fixed In:

Description Nicholas Nethercote 2009-08-10 03:56:45 UTC
This is a follow-on from bug 192634.  Valgrind's address space manager current uses MAP_FIXED a lot.  This relies on having a perfect view of the address space layout.  This is feasible on Linux, but a problem on Darwin, as the Darwin kernel tends to add mappings in ways that a user program cannot easily observe.  Valgrind currently checks for such kernel mappings at various points, but this is slow, and we may be missing some cases, in which case Valgrind will trash kernel mappings occasionally on Darwin.  So it's both a correctness and performance issue.

To fix this requires reworking aspacemgr to greatly reduce or preferably avoid MAP_FIXED completely.