Skip to content

Commit 5163606

Browse files
committed
platform-specific valgrind suppression
1 parent 75c56e8 commit 5163606

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

mk/platform.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
9999
CFG_INSTALL_NAME = -Wl,-install_name,@rpath/$(1)
100100
endif
101101

102+
# Hack: not sure how to test if a file exists in make other than this
103+
OS_SUPP = $(patsubst %,--suppressions=%,\
104+
$(wildcard $(CFG_SRC_DIR)src/etc/$(CFG_OSTYPE).supp*))
105+
102106
ifneq ($(findstring mingw,$(CFG_OSTYPE)),)
103107
CFG_WINDOWSY := 1
104108
endif
@@ -154,7 +158,9 @@ ifdef CFG_UNIXY
154158
ifdef CFG_VALGRIND
155159
CFG_VALGRIND += --leak-check=full \
156160
--error-exitcode=100 \
157-
--quiet --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp
161+
--quiet \
162+
--suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
163+
$(OS_SUPP)
158164
endif
159165
endif
160166

src/etc/apple-darwin.supp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
issue_1333_setenv_leak
3+
Memcheck:Leak
4+
fun:malloc_zone_malloc
5+
...
6+
fun:setenv
7+
fun:setenv__c_stack_shim
8+
...
9+
}

0 commit comments

Comments
 (0)