This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Align & pad the allocator structures to the cacheline size v2
ClosedPublic

Authored by cryptoad on Mar 9 2018, 2:01 PM.

Details

Summary

This is a new version of D44261, which broke some builds with older gcc, as
they can't align on a constexpr, but rather require an integer (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56859) among others.

We introduce SANITIZER_CACHE_LINE_SIZE in sanitizer_platform.h to be
used in ALIGNED attributes instead of using directly kCacheLineSize.

Event Timeline

cryptoad created this revision.Mar 9 2018, 2:01 PM
Herald added subscribers: Restricted Project, delcypher, kubamracek. · View Herald TranscriptMar 9 2018, 2:01 PM
cryptoad updated this revision to Diff 137842.Mar 9 2018, 2:25 PM

Couple of additional changes from the original patch.

alekseyshl accepted this revision.Mar 9 2018, 2:55 PM
This revision is now accepted and ready to land.Mar 9 2018, 2:55 PM
This revision was automatically updated to reflect the committed changes.