[hwasan] Do not memset allocation if it comes from the secondary allocator
authorLeonard Chan <leonardchan@google.com>
Wed, 26 Apr 2023 21:48:37 +0000 (21:48 +0000)
committerLeonard Chan <leonardchan@google.com>
Wed, 26 Apr 2023 21:49:42 +0000 (21:49 +0000)
commit82e5994c8d72734be813db7ea56af7325b9c9f68
treec8dba27f7369109a4ea6be843b58862eedd8ddf7
parentd94fe9728087f905dbd8fc32bc5c4a096b4d28c5
[hwasan] Do not memset allocation if it comes from the secondary allocator

The secondary allocator calls mmap which should return zero-inited pages, so we
don't need to explicitly memset it with zeros. This is similar to what asan's
calloc does.

Differential Revision: https://reviews.llvm.org/D149285
compiler-rt/lib/hwasan/hwasan_allocator.cpp