diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-06-15 11:04:33 -0400 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2017-07-04 20:24:47 -0700 |
commit | 70a35422b5509a456584b132ad8ce4466af323ea (patch) | |
tree | e6aeb89ae078597d372f4831d6a4f176bc9c949c /Makefile.am | |
parent | 6eca6c64fabbff55c43a78537e466312524b3acd (diff) | |
download | gperftools-70a35422b5509a456584b132ad8ce4466af323ea.tar.gz |
Ignore current_instance heap allocation when leak sanitizer is enabled
Without this patch, any user program that enables LeakSanitizer will
see a leak from tcmalloc. Add a weak hook to __lsan_ignore_object,
so that if LeakSanitizer is enabled, the allocation can be ignored.
Diffstat (limited to 'Makefile.am')
-rwxr-xr-x | Makefile.am | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 0aeb77d..ab9041c 100755 --- a/Makefile.am +++ b/Makefile.am @@ -79,6 +79,9 @@ TCMALLOC_FLAGS = if MINGW TCMALLOC_FLAGS += -Wl,-u__tcmalloc endif MINGW +if OSX +AM_LDFLAGS += -Wl,-U,___lsan_ignore_object +endif OSX # If we have objcopy, make malloc/free/etc weak symbols. That way folks # can override our malloc if they want to (they can still use tc_malloc). |