summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-06-15 11:04:33 -0400
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2017-07-04 20:24:47 -0700
commit70a35422b5509a456584b132ad8ce4466af323ea (patch)
treee6aeb89ae078597d372f4831d6a4f176bc9c949c /Makefile.am
parent6eca6c64fabbff55c43a78537e466312524b3acd (diff)
downloadgperftools-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-xMakefile.am3
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).