init.sh: fix a typo
[pspp] / tests / init.sh
index 777273697011883491a2a8111b3d6cb18c9eb0e5..05a983a45b5c6703a8188824a9307d4eb40b6f86 100644 (file)
@@ -94,6 +94,13 @@ fi
 
 test -n "$EXEEXT" && shopt -s expand_aliases
 
+# Enable glibc's malloc-perturbing option.
+# This is cheap and useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
+
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
 # So use `Exit STATUS' instead of `exit STATUS' inside of the tests.