summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.valgrindrc16
-rw-r--r--tests/valgrind.supp22
2 files changed, 38 insertions, 0 deletions
diff --git a/.valgrindrc b/.valgrindrc
new file mode 100644
index 0000000..6ed5787
--- /dev/null
+++ b/.valgrindrc
@@ -0,0 +1,16 @@
+--demangle=yes
+--error-exitcode=1
+--show-error-list=yes
+--default-suppressions=yes
+--suppressions=tests/valgrind.supp
+--alignment=16
+--redzone-size=128
+--read-var-info=yes
+--leak-check=full
+--leak-resolution=high
+--show-leak-kinds=all
+--leak-check-heuristics=all
+--undef-value-errors=yes
+--track-origins=yes
+--keep-stacktraces=alloc-and-free
+--show-mismatched-frees=yes
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
new file mode 100644
index 0000000..b9c60f5
--- /dev/null
+++ b/tests/valgrind.supp
@@ -0,0 +1,22 @@
+# musl ldpath file stuff (upstream this into valgrind apk someday)
+{
+ musl:ldpath
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:realloc
+ fun:getdelim
+ ...
+ fun:__dls3
+ obj:/lib/ld-musl-*
+}
+# CLIPP global ctor in .init
+{
+ clipp:ctor
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ fun:do_init_fini
+ fun:__libc_start_init
+ obj:/lib/ld-musl-*
+}