]> git.lizzy.rs Git - rust.git/commitdiff
platform-specific valgrind suppression
authorNiko Matsakis <niko@alum.mit.edu>
Fri, 3 Feb 2012 20:22:53 +0000 (12:22 -0800)
committerNiko Matsakis <niko@alum.mit.edu>
Sun, 5 Feb 2012 17:07:23 +0000 (09:07 -0800)
mk/platform.mk
src/etc/apple-darwin.supp [new file with mode: 0644]

index 10cef47e6f02d8efa204b4915f4a2b8695f6bcd4..45c1d3ab751e862b47a241e68b1ba187bbe88e4e 100644 (file)
@@ -99,6 +99,10 @@ ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
   CFG_INSTALL_NAME = -Wl,-install_name,@rpath/$(1)
 endif
 
+# Hack: not sure how to test if a file exists in make other than this
+OS_SUPP = $(patsubst %,--suppressions=%,\
+           $(wildcard $(CFG_SRC_DIR)src/etc/$(CFG_OSTYPE).supp*))
+
 ifneq ($(findstring mingw,$(CFG_OSTYPE)),)
   CFG_WINDOWSY := 1
 endif
@@ -154,7 +158,9 @@ ifdef CFG_UNIXY
   ifdef CFG_VALGRIND
     CFG_VALGRIND += --leak-check=full \
                     --error-exitcode=100 \
-                    --quiet --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp
+                    --quiet \
+                    --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
+                    $(OS_SUPP)
   endif
 endif
 
diff --git a/src/etc/apple-darwin.supp b/src/etc/apple-darwin.supp
new file mode 100644 (file)
index 0000000..7e2598f
--- /dev/null
@@ -0,0 +1,9 @@
+{
+   issue_1333_setenv_leak
+   Memcheck:Leak
+   fun:malloc_zone_malloc
+   ...
+   fun:setenv
+   fun:setenv__c_stack_shim
+   ...
+}