Summary: | darwin merge broke mmap2/mprotect behavior on linux | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Dan Kegel <dank> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | jakub, njn |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | blocking3.5.1 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dan Kegel
2009-10-12 02:38:39 UTC
The problem is in the darwin memcheck/mc_main.c changes, in particular mc_new_mem_startup/mc_new_mem_mmap now doing MC_(make_mem_noaccess)(a, len); for PROT_NONE mappings instead of MC_(make_mem_defined)(a, len); ATM memcheck ignores change_mem_mprotect, so if something is mapped as PROT_NONE initially, it is tracked as noaccess even if it is latter on changed with mprotect. Either this change should be reverted (or guarded with darwin define only, or limited to Addr 0 only), or mc_main.c needs to be taught to track also mprotect. Given the comment why it doesn't track mprotect I think making it noaccess on PROT_NONE mprotect and defined on other mprotect is not desirable, so perhaps just making it defined on != PROT_NONE mprotect or walking the range and changing any noaccess ranges in it to defined. Thanks for the diagnosis, Jakub. Looks like John Reiser got there first; see bug 205541. He even submitted a possible patch. *** This bug has been marked as a duplicate of bug 205541 *** |