This is an archive of the discontinued LLVM Phabricator instance.

scudo: Tweak how we align UserPtr. NFCI.
ClosedPublic

Authored by pcc on Dec 10 2019, 11:20 AM.

Details

Summary

Instead of testing whether the pointer is aligned, just align it
unconditionally and compare it to the original pointer.

This moves the computation of UserPtr up to before we start preparing the
header, so that the memory tagging code will be able to read the original
header containing the bounds of the previous allocation before it gets
potentially clobbered by the pointer realignment code.

Diff Detail

Event Timeline

pcc created this revision.Dec 10 2019, 11:20 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 10 2019, 11:20 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
cryptoad accepted this revision.Dec 10 2019, 11:39 AM
This revision is now accepted and ready to land.Dec 10 2019, 11:39 AM

Build result: pass - 60684 tests passed, 0 failed and 726 were skipped.

Log files: console-log.txt, CMakeCache.txt

This revision was automatically updated to reflect the committed changes.