[PATCH] D34289: [Sanitizer] Remove CombinedAllocator::Allocate's 'cleared' parameter

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 16 13:51:17 PDT 2017


alekseyshl added a comment.

In https://reviews.llvm.org/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.


https://reviews.llvm.org/D34289





More information about the llvm-commits mailing list