search for: malloc_perturb_

Displaying 20 results from an estimated 28 matches for "malloc_perturb_".

2012 Apr 18
3
[PATCH 3/3] export MALLOC_PERTURB_ and MALLOC_CHECK_ in test suite
.../test/test_bins.sh +++ b/test/test_bins.sh @@ -37,6 +37,8 @@ LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_==$(($RANDOM % 255 + 1)) PATH=../src/flac:$PATH PATH=../obj/$BUILD/bin:$PATH BINS_PATH=../../test_files/bins diff --git a/test/test_flac.sh b/test/test_flac.sh index 0aa7e61..7e4a8fd 100755 --- a/test/test_flac.sh +++ b/test/test_flac.sh @@ -51,6 +51,8 @@ LD_LIBRARY_PATH=`pwd`/../src/share/replay...
2012 Jan 10
1
[PATCH] Prepend local library path to LD_LIBRARY_PATH for tests, instead of replacing it
...| 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/align/Makefile.am b/align/Makefile.am index 1dc9221..4afb2e4 100644 --- a/align/Makefile.am +++ b/align/Makefile.am @@ -72,7 +72,7 @@ stamp-virt-alignment-scan.pod: virt-alignment-scan.pod # TESTS_ENVIRONMENT = \ # MALLOC_PERTURB_=$(random_val) \ -# LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ +# LD_LIBRARY_PATH=$(top_builddir)/src/.libs${if ${LD_LIBRARY_PATH},:${LD_LIBRARY_PATH},} \ # LIBGUESTFS_PATH=$(top_builddir)/appliance \ # TMPDIR=$(top_builddir) diff --git a/cat/Makefile.am b/cat/Makefile.am index 3180b26..2a4...
2012 Apr 18
1
[PATCH 3/3] export MALLOC_PERTURB_ and MALLOC_CHECK_ in test suite
...7,6 +37,8 @@ LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH >> LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH >> LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH >> export LD_LIBRARY_PATH >> +export MALLOC_CHECK_=3 >> +export MALLOC_PERTURB_==$(($RANDOM % 255 + 1)) > > This has problems. > > This fails in bash, sh and dash. Eg bash: > > $ echo $(($RANDON % 256)) > bash: % 256: syntax error: operand expected (error token is "% 256") > > I do howver like this idea it if can be made to work...
2009 Aug 13
1
[PATCH libguestfs] tests: increase likelihood that heap abuse triggers failure
This takes advantage of glibc's MALLOC_PERTURB_. If you develop on glibc-based systems and don't yet set this via your shell's init scripts, add something like this to e.g., .bashrc: export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) This change ensures that it's enabled for anyone running "make check" and in particular fo...
2012 Jan 20
8
Various fixes from building libguestfs for Debian
Here are some of the patches that I have maintained in the patch queue of my packages that I maintain within the Debian distribution (http://packages.qa.debian.org/libg/libguestfs.html). All of them address FTBFS (fail to build from source) errors that happened with the particular configuration that is used for building the Debian package. Cheers, -Hilko
2019 Mar 18
2
[PATCH nbdkit] wrapper: Set MALLOC_CHECK=1 and MALLOC_PERTURB_ (randomly).
.../lib64/libc.so.6 What's happening here is that the filter / plugin chain is freed by Thread 2, while Thread 1 is calling filter->finalize. At this point filter->finalize points to freed memory, but "normally" this would still contain the correct function pointer. However when MALLOC_PERTURB_ is set the function pointer is overwritten with the non-zero dead memory pattern which we then attempt to call, causing a segfault (in Thread 1). --- wrapper.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/wrapper.c b/wrapper.c index ffb058b..6b5118c 100644 --- a/wrapper.c...
2019 Mar 18
0
Re: [PATCH nbdkit] wrapper: Set MALLOC_CHECK=1 and MALLOC_PERTURB_ (randomly).
...at's happening here is that the filter / plugin chain is freed by > Thread 2, while Thread 1 is calling filter->finalize. At this point > filter->finalize points to freed memory, but "normally" this would > still contain the correct function pointer. However when > MALLOC_PERTURB_ is set the function pointer is overwritten with the > non-zero dead memory pattern which we then attempt to call, causing a > segfault (in Thread 1). > --- > wrapper.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) I like that it makes in-tree testing more robust, witho...
2013 Mar 20
3
[PATCH] Change test scripts shell to bash, to avoid lack of arithmetic support in dash, which is sh on Ubuntu 10.04
Erik, I was thinking of doing this: export MALLOC_PERTURB_=$(awk 'BEGIN { srand(); print int(rand() * 32767 % 255 + 1) }') Or would you prefer using 'date'? On Tue, Mar 19, 2013 at 10:22 PM, Erik de Castro Lopo <mle+la at mega-nerd.com>wrote: > Jesse Weinstein wrote: > > > The subject line mostly says it all, but for r...
2017 May 21
3
[Bug 1150] New: Iptables fails to match rules with malloc perturberation activated
...filter.org Reporter: goeran at uddeborg.se On my Fedora system, I've upgraded to Fedora 26 versions of iptables and, in case it matters, glibc. iptables-1.6.1-2.fc26.x86_64 glibc-2.25-4.fc26.x86_64 I also have the debugmode package installed, which sets the environment variable MALLOC_PERTURB_ to a random value. The variable is meant to "detecting errors where programs incorrectly rely on allocated memory being initialized to zero, or reuse values in memory that has already been freed." It appears iptables in some cases do this. I haven't figured out exactly what con...
2012 Feb 12
1
[PATCH] Do not run test-virt-format.sh if appliance has not been built
--- format/Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/format/Makefile.am b/format/Makefile.am index 0d1b28e..1dc8f14 100644 --- a/format/Makefile.am +++ b/format/Makefile.am @@ -74,4 +74,6 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ $(top_builddir)/run +if ENABLE_APPLIANCE TESTS = test-virt-format.sh +endif ENABLE_APPLIANCE -- 1.7.9
2020 Mar 10
6
[PATCH libguestfs 0/2] build: Allow programs using libguestfs to be compiled from against build dir.
These changes allow virt-v2v to be compiled against the build directory of a non-installed libguestfs. Note that some small changes are also required to common and virt-v2v itself. I will post those separately. Rich.
2020 Mar 10
0
[PATCH libguestfs 2/2] build: Allow OCaml programs using libguestfs to be compiled against build dir.
...../libguestfs/run make’ in your other program and everything should +# just work. +CLEANFILES += guestfs + +all-local: guestfs + +guestfs: + rm -f $@ + ln -sf . $@ + +endif HAVE_OCAML diff --git a/run.in b/run.in index 6896d5a2c..90552fb04 100755 --- a/run.in +++ b/run.in @@ -227,6 +227,8 @@ export MALLOC_PERTURB_=$random_val # local libguestfs. prepend PKG_CONFIG_PATH "$b/lib/local" export PKG_CONFIG_PATH +prepend OCAMLPATH "$b/ocaml" +export OCAMLPATH # Do we have libtool? If we have it then we can use it to make # running valgrind simpler. However don't depend on it. -- 2...
2013 Mar 20
0
[PATCH] Change test scripts shell to bash, to avoid lack of arithmetic support in dash, which is sh on Ubuntu 10.04
Jaren Stangret wrote: > Erik, > > I was thinking of doing this: > export MALLOC_PERTURB_=$(awk 'BEGIN { srand(); print int(rand() * 32767 % > 255 + 1) }') > > Or would you prefer using 'date'? Your's is probably better and this is probably an improvement: awk 'BEGIN { srand(); print int(rand() * 255 + 1) }' Awk's rand seems to be seeded...
2019 Apr 02
0
Plan for nbdkit 1.12
...rtitions. Previously it only supported 4 MBR primary partitions and if you wanted more than that you had to use GPT. The partition filter also supports MBR logical partitions. The python plugin creates plugins which are compatible with Python >= 3.7. Tests are now run under MALLOC_CHECK=1 and MALLOC_PERTURB_=<random>. This causes some tests to crash (silently) because of a shutdown race which needs to be fixed. Test shell scripts now have a generic ‘requires’ function to skip tests if features are not present. C99 type ‘bool’ is now used in most places where appropriate. The protocol and conne...
2013 Mar 20
2
[PATCH] Change test scripts shell to bash, to avoid lack of arithmetic support in dash, which is sh on Ubuntu 10.04
The subject line mostly says it all, but for reference, having #!/bin/sh causes the following error: arithmetic expression: expecting primary: " % 255 + 1" --- test/test_flac.sh | 2 +- test/test_grabbag.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_flac.sh b/test/test_flac.sh index 10981c0..257c5ea 100755 --- a/test/test_flac.sh +++
2020 Mar 10
0
[PATCH libguestfs 1/2] build: Allow C programs using libguestfs to be compiled against build dir.
...ags: -I${includedir} +Libs: -L${libdir} -lguestfs @LIBS@ diff --git a/run.in b/run.in index c734612fc..6896d5a2c 100755 --- a/run.in +++ b/run.in @@ -223,6 +223,11 @@ export G_DEBUG=gc-friendly random_val="$(@AWK@ 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)" export MALLOC_PERTURB_=$random_val +# Allow dependent packages like virt-v2v to be compiled against +# local libguestfs. +prepend PKG_CONFIG_PATH "$b/lib/local" +export PKG_CONFIG_PATH + # Do we have libtool? If we have it then we can use it to make # running valgrind simpler. However don't depend on...
2020 Mar 12
0
[PATCH libnbd 2/3] build: Allow C programs using libnbd to be compiled against build dir.
...are using pkgconf/pkg-config: +# +# ../libnbd/run ./configure +# make #---------------------------------------------------------------------- @@ -78,6 +84,10 @@ export MALLOC_CHECK_=1 random_val="$(@AWK@ 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)" export MALLOC_PERTURB_=$random_val +# Allow dependent packages to be compiled against local libnbd. +prepend PKG_CONFIG_PATH "$b/lib/local" +export PKG_CONFIG_PATH + # Do we have libtool? If we have it then we can use it to make # running valgrind simpler. However don't depend on it. if libtool --hel...
2019 Apr 10
0
ANNOUNCE: nbdkit 1.12 - an NBD server toolkit with stable plugin API and permissive license
...ons. Previously it only supported 4 MBR primary partitions and if you wanted more than that you had to use GPT. The ‘partition’ filter also supports MBR logical partitions. The ‘python’ plugin creates plugins which are compatible with Python >= 3.7. Tests are now run under MALLOC_CHECK_=1 and MALLOC_PERTURB_=<random>. This causes some tests to crash (silently) because of a shutdown race which needs to be fixed. Test shell scripts now have a generic ‘requires’ function to skip tests if features are not present. C99 type ‘bool’ is now used in most places where appropriate. The protocol and conne...
2020 Aug 20
0
[PATCH nbdkit 12/13] wrapper: Port the wrapper to run on Windows.
...mat ("%s/plugins/%s/.libs/nbdkit-%s-plugin.so", + passthru_format ("%s/plugins/%s/.libs/nbdkit-%s-plugin." SOEXT, builddir, argv[optind], argv[optind]); } ++optind; @@ -295,7 +343,19 @@ main (int argc, char *argv[]) setenv ("MALLOC_PERTURB_", ts, 0); /* Run the final command. */ +#ifndef WIN32 execvp (cmd[0], (char **) cmd); perror (cmd[0]); exit (EXIT_FAILURE); +#else /* WIN32 */ + size_t i; + for (i = 1; cmd[i] != NULL; ++i) + cmd[i] = quote_string_for_spawn (cmd[i]); + r = _spawnvp (_P_WAIT, cmd[0], cmd); +...
2012 May 03
2
[PATCH 0/2] Don't fail if 'type' (disk format) attribute is missing from libvirt XML (RHBZ#701814).
https://bugzilla.redhat.com/show_bug.cgi?id=701814