This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizer] Remove CombinedAllocator::Allocate's 'cleared' parameter
ClosedPublic

Authored by alekseyshl on Jun 16 2017, 12:00 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

alekseyshl created this revision.Jun 16 2017, 12:00 PM
kcc accepted this revision.Jun 16 2017, 12:35 PM
kcc added a subscriber: kcc.

LGTM

Interesting. The intent was to optimize the calloc implementation to avoid memset of freshly mmap-ed regions.
Apparently, this optimization when somewhere else (to asan_allocator.cc? or disappeared?)
Anyway, this looks like NFC, so LGTM

This revision is now accepted and ready to land.Jun 16 2017, 12:35 PM
In D34289#782620, @kcc wrote:

LGTM

Interesting. The intent was to optimize the calloc implementation to avoid memset of freshly mmap-ed regions.
Apparently, this optimization when somewhere else (to asan_allocator.cc? or disappeared?)
Anyway, this looks like NFC, so LGTM

Yep, I figured that. It checks for the allocation source in asan_allocator.cc, Calloc, which seems like a reasonable solution, it's the only function which cares. It is not ideal, though, I think that FromPrimary check in Calloc is ugly. I'll revisit it later.

This revision was automatically updated to reflect the committed changes.