diff options
author | Dan Liew <dan@su-root.co.uk> | 2019-01-21 01:41:08 +0000 |
---|---|---|
committer | Dan Liew <dan@su-root.co.uk> | 2019-01-21 01:41:08 +0000 |
commit | 5a3857c9b24f61721be0f09cb5650209390f0da4 (patch) | |
tree | c187a4374bdb35d44d782896057f50a1b70932c7 /compiler-rt/lib/asan/asan_malloc_mac.cc | |
parent | 4dd0bf94871ffde083ef7becc861ca7c8bbc9bc2 (diff) | |
download | bcm5719-llvm-5a3857c9b24f61721be0f09cb5650209390f0da4.tar.gz bcm5719-llvm-5a3857c9b24f61721be0f09cb5650209390f0da4.zip |
On Darwin add allocator address and size fields to
`sanitizer_malloc_introspection_t` and initialize them to zero.
We allow sanitizer implementations to perform different initialization
by defining `COMMON_MALLOC_HAS_EXTRA_INTROSPECTION_INIT` to be `1`
and providing an implementation of `mi_extra_init(...)`.
We use these changes in future patches to implement malloc zone enumeration.
rdar://problem/45284065
llvm-svn: 351712
Diffstat (limited to 'compiler-rt/lib/asan/asan_malloc_mac.cc')
-rw-r--r-- | compiler-rt/lib/asan/asan_malloc_mac.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_malloc_mac.cc b/compiler-rt/lib/asan/asan_malloc_mac.cc index 00529624184..faa6c62dfce 100644 --- a/compiler-rt/lib/asan/asan_malloc_mac.cc +++ b/compiler-rt/lib/asan/asan_malloc_mac.cc @@ -58,6 +58,7 @@ using namespace __asan; ReportMacMzReallocUnknown((uptr)ptr, (uptr)zone_ptr, zone_name, &stack); #define COMMON_MALLOC_NAMESPACE __asan #define COMMON_MALLOC_HAS_ZONE_ENUMERATOR 0 +#define COMMON_MALLOC_HAS_EXTRA_INTROSPECTION_INIT 0 #include "sanitizer_common/sanitizer_malloc_mac.inc" |