diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-10-30 17:52:23 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-11-02 10:50:51 +0100 |
commit | fcee486849c2e5a07c0eef630beb427742f54d8e (patch) | |
tree | d04e06d93f947ef5f235cbb641473e068fe0156f /solenv/bin | |
parent | 61128761b27beea9d6f550d8eaa23eefa2750108 (diff) |
detect even more memory mismanagement on glibc
Change-Id: Idba21b12582e9ae7d240d9d3527f9ac5893252f7
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/linkoo | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo index c97df916dd40..78202345ab71 100755 --- a/solenv/bin/linkoo +++ b/solenv/bin/linkoo @@ -54,6 +54,19 @@ export STAR_RESOURCEPATH=$thisdir/resource export SAL_DISABLE_FLOATGRAB=1 export G_SLICE=always-malloc export MALLOC_CHECK_=2 +#get some random value between 0 and 255 +rndbyte=$RANDOM +if test -n "${rndbyte}"; then + rndbyte=$(( $rndbyte % 256 )) +else + if test -r /dev/urandom; then + rndbyte=$(dd if=/dev/urandom bs=1 count=1 2>/dev/null | od -tu1 | cut -s -d " " -f2) + else + rndbyte=$(( (( $(date +%S) + 1 ) * $$ ) % 255 )) + fi +fi +export MALLOC_PERTURB_=${rndbyte} +unset rndbyte export OOO_DISABLE_RECOVERY=1 export SAL_ALLOW_LINKOO_SYMLINKS=1 '; |