Update sanitizer_allocator to use new API.
Second patch in a series. First patch https://reviews.llvm.org/D39072
Updates MmapNoAccess / MmapFixed call sites in the saniziter_allocator
to use the new Init/Map APIs instead.
Differential D38592
Update sanitizer_allocator to use new API. flowerhack on Oct 5 2017, 12:25 PM. Authored by
Details Update sanitizer_allocator to use new API. Second patch in a series. First patch https://reviews.llvm.org/D39072 Updates MmapNoAccess / MmapFixed call sites in the saniziter_allocator
Diff Detail Event Timeline
Comment Actions Thanks @alekseyshl ! However, https://reviews.llvm.org/D39072 needs to land before this one can be merged. Have you had a chance to look at that one yet? Thanks! Comment Actions I have some local tests failure with this patch. Looking into it, do not submit.
Comment Actions SanitizerCommon-tsan-x86_64-Linux :: Linux/decorate_proc_maps.cc appears to consistently fail with that patch. Comment Actions This is due to decorate_proc_maps. Comment Actions So this could go away with AllocatorName returning null, but it's not an actual fix, we would just be pretending the issue is not there. Comment Actions So to be clearer, this is a problem for every sanitizer intercepting open and using a map with a name and decorate_proc_maps=1 during the init. Comment Actions The root bug is that, if you have decorate_proc_maps enabled, *and* actually use a named mapping, *and* are using a sanitizer intercepting open (just TSAN and ESAN), then we'll get an explosion during initialization. I've updated this CL with what seems like a reasonable fix to me: change ReservedAddressRange::Init to not use name on POSIX, since that's where the problem happens (Fuchsia is fine with names). I can file a bug for allowing named mappings can be used everywhere more easily (the fix may involve e.g. porting shm_open s.t. it's not invoking open, which is what's causing the problem), if that's desired? Please let me know if this minor change is satisfactory so I can go ahead with it, thanks~ Comment Actions Looks like a perfectly acceptable fix to me, we never named these mappings. Please add a comment with TODO there explaining why we're not passing name down (pretty much what cryptoad@ said).
|
This one should pass the name too.