about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-02-03 12:22:53 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-02-05 09:07:23 -0800
commit5163606d060ccb2c6462d34f590e2a1f30ce4a1f (patch)
tree3939e0d5c09d5d23bcb798b7acf5467a2e737312
parent75c56e84940f6985a67e117a82142a1c23ea2392 (diff)
downloadrust-5163606d060ccb2c6462d34f590e2a1f30ce4a1f.tar.gz
rust-5163606d060ccb2c6462d34f590e2a1f30ce4a1f.zip
platform-specific valgrind suppression
-rw-r--r--mk/platform.mk8
-rw-r--r--src/etc/apple-darwin.supp9
2 files changed, 16 insertions, 1 deletions
diff --git a/mk/platform.mk b/mk/platform.mk
index 10cef47e6f0..45c1d3ab751 100644
--- a/mk/platform.mk
+++ b/mk/platform.mk
@@ -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
index 00000000000..7e2598f7694
--- /dev/null
+++ b/src/etc/apple-darwin.supp
@@ -0,0 +1,9 @@
+{
+   issue_1333_setenv_leak
+   Memcheck:Leak
+   fun:malloc_zone_malloc
+   ...
+   fun:setenv
+   fun:setenv__c_stack_shim
+   ...
+}