From 927ef14c584524a16e8be3fb7eff6cd3ee880ce6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 28 Jun 2012 13:15:57 +0100 Subject: run: Set MALLOC_PERTURB_ to a random value. MALLOC_PERTURB_ is a glibc feature which causes malloc to wipe memory before and after it is used, allowing both use-after-free and uninitialized reads to be detected with relatively little performance penalty: http://udrepper.livejournal.com/11429.html?nojs=1 Modify the ./run script so that it always sets this. We were already using MALLOC_PERTURB_ in most tests. Since ./run is now setting this, we can remove it from individual Makefiles. Most TESTS_ENVIRONMENT will now simply look like this: TESTS_ENVIRONMENT = $(top_builddir)/run --test --- tools/Makefile.am | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/Makefile.am b/tools/Makefile.am index a5d9844c..2c2ad1f3 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -55,11 +55,7 @@ $(top_builddir)/html/virt-%.1.html: virt-% # Tests. -random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) - -TESTS_ENVIRONMENT = \ - MALLOC_PERTURB_=$(random_val) \ - $(top_builddir)/run --test +TESTS_ENVIRONMENT = $(top_builddir)/run --test if ENABLE_APPLIANCE TESTS = test-virt-list-filesystems.sh \ -- cgit