This is an archive of the discontinued LLVM Phabricator instance.

[msan] Fix SetShadow for mappings at the end of the application address space
ClosedPublic

Authored by foad on Jun 25 2015, 6:37 AM.

Details

Summary

On PPC64 if you disable ASLR (or run under gdb) you're likely to see
mmap returning a mapping right at the end of the application address
space region. This caused SetShadow to call MEM_TO_SHADOW() on the
last+1 address in the region, which seems wrong to me; how can
MEM_TO_SHADOW() distinguish this from the first address in the following
region?

Fixed by only calling MEM_TO_SHADOW() once, on the start address.

Diff Detail

Event Timeline

foad updated this revision to Diff 28460.Jun 25 2015, 6:37 AM
foad retitled this revision from to [msan] Fix SetShadow for mappings at the end of the application address space.
foad updated this object.
foad edited the test plan for this revision. (Show Details)
foad added reviewers: samsonov, eugenis, wschmidt.
foad added a subscriber: Unknown Object (MLST).
eugenis accepted this revision.Jun 25 2015, 11:06 AM
eugenis edited edge metadata.

LGTM, good catch

This revision is now accepted and ready to land.Jun 25 2015, 11:06 AM
foad closed this revision.Jun 25 2015, 1:48 PM