瀏覽代碼

Don't let valgrind produce too huge cores

Samuel Thibault 5 年之前
父節點
當前提交
7e1ebb5011
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      tools/dev/valgrind/valgrind.sh

+ 7 - 0
tools/dev/valgrind/valgrind.sh

@@ -17,6 +17,13 @@
 EXEC=$(basename $0 .sh)
 DIRNAME=$(dirname $0)
 
+CLIMIT=$(ulimit -c)
+if [ "$CLIMIT" = unlimited ]
+then
+	# valgrind cores are often *huge*, 100MB will already be quite big...
+	ulimit -c 100000000
+fi
+
 if test "$EXEC" == "valgrind"
 then
     RUN="valgrind --track-origins=yes --show-reachable=yes --leak-check=full --errors-for-leak-kinds=all --show-leak-kinds=all --error-exitcode=42"