diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-06-28 13:15:57 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-06-28 13:19:39 +0100 |
commit | 927ef14c584524a16e8be3fb7eff6cd3ee880ce6 (patch) | |
tree | 53445bff704798cdde908fc7a8d4e19c257d56fd /resize | |
parent | b3df3ba5c824dc5ea15902df2f1ee80254aca22f (diff) | |
download | libguestfs-927ef14c584524a16e8be3fb7eff6cd3ee880ce6.tar.gz libguestfs-927ef14c584524a16e8be3fb7eff6cd3ee880ce6.tar.xz libguestfs-927ef14c584524a16e8be3fb7eff6cd3ee880ce6.zip |
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
Diffstat (limited to 'resize')
-rw-r--r-- | resize/Makefile.am | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/resize/Makefile.am b/resize/Makefile.am index b613bb77..70ace37d 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -108,11 +108,7 @@ utils_tests: resize_gettext.cmx utils.cmx utils_tests.cmx $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@ -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 TESTS = utils_tests if ENABLE_APPLIANCE |