Commit 4c969618f6ec6caa8facd199c3a6de0e6b06396f

Etienne Samson 2018-04-20T23:11:27

scripts: use leaks on macOS

1
2
3
4
5
6
7
8
9
10
11
diff --git a/script/cileaks.sh b/script/cileaks.sh
index 61b2557..ab35e0a 100755
--- a/script/cileaks.sh
+++ b/script/cileaks.sh
@@ -10,4 +10,6 @@ fi
 
 if [ -n "$VALGRIND" -a -e "$(which valgrind)" ]; then
 	valgrind --leak-check=full --show-reachable=yes --error-exitcode=125 --num-callers=50 --suppressions=./libgit2_clar.supp _build/libgit2_clar $@ -ionline -xbuf::oom
+elif [ -n "$LEAKS" -a -e "$(which leaks)" ]; then
+	MallocStackLogging=1 MallocScribble=1 leaks -atExit -- _build/libgit2_clar -ionline
 fi