diff options
author | dank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 20:18:26 +0000 |
---|---|---|
committer | dank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 20:18:26 +0000 |
commit | 6814d5d2b3d86247e010286bd3c218722f93881c (patch) | |
tree | 8417caa975ea0b9d373c0b2d1e79d97d16733926 /tools/valgrind/build-valgrind-for-chromium.sh | |
parent | 71a1426dea83fad4fd6e5c3fd938dec01da450d0 (diff) | |
download | chromium_src-6814d5d2b3d86247e010286bd3c218722f93881c.zip chromium_src-6814d5d2b3d86247e010286bd3c218722f93881c.tar.gz chromium_src-6814d5d2b3d86247e010286bd3c218722f93881c.tar.bz2 |
Increase valgrind's redzone from 16 to 64 bytes.
If https://bugs.kde.org/show_bug.cgi?id=208197 is ever fixed,
we can get rid of the patch and change the redzone size
with a commandline option instead.
Install to /usr/local/valgrind-10880-redzone to make it easier to tell which machines have the updated valgrind.
Add DIRNAME variable to valgrind build script to simplify changing name of tarball/build dir/install dir.
Also give -f option to mv because macosx's mv is timid about overwriting symlinks.
Review URL: http://codereview.chromium.org/216048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/build-valgrind-for-chromium.sh')
-rwxr-xr-x | tools/valgrind/build-valgrind-for-chromium.sh | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh index 726cd10..62047c0 100755 --- a/tools/valgrind/build-valgrind-for-chromium.sh +++ b/tools/valgrind/build-valgrind-for-chromium.sh @@ -18,6 +18,11 @@ VEX_SVN_REV=1914 # and TSAN may be out of sync, so you have to check that out by rev anyway TSAN_SVN_REV=1129 +# suffix for build and install dir to denote our set of patches (may be empty) +PATCHLEVEL=-redzone + +DIRNAME=valgrind-${VALGRIND_SVN_REV}${PATCHLEVEL} + THISDIR=$(dirname "${0}") THISDIR=$(cd "${THISDIR}" && /bin/pwd) @@ -27,8 +32,7 @@ x|x/*) ;; echo "Usage: sh build-valgrind-for-chromium.sh [prefix]" echo "Prefix is optional, but if present, must be the absolute path to where" echo "you want to install valgrind's bin, include, and lib directories." - echo "Prefix defaults to /usr/local/valgrind-${VALGRIND_SVN_REV}, where" - echo "${VALGRIND_SVN_REV} is the revision used when retrieving valgrind from svn." + echo "Prefix defaults to /usr/local/$DIRNAME." echo "Will use sudo to do the install if you don't own the parent of prefix." exit 1 ;; @@ -44,15 +48,15 @@ then fi # Clean checkout our untar -rm -rf "valgrind-${VALGRIND_SVN_REV}" -mkdir -p "valgrind-${VALGRIND_SVN_REV}" +test -d "$DIRNAME" && rm -rf ./"$DIRNAME" +mkdir -p "$DIRNAME" if test "x${USE_TARBALL}" != "xyes" then # Check out latest version that following patches known to apply against - svn co -r "${VALGRIND_SVN_REV}" "svn://svn.valgrind.org/valgrind/trunk" "valgrind-${VALGRIND_SVN_REV}" + svn co -r "${VALGRIND_SVN_REV}" "svn://svn.valgrind.org/valgrind/trunk" "$DIRNAME" - cd "valgrind-${VALGRIND_SVN_REV}" + cd "$DIRNAME" # Make sure svn gets the right version of the external VEX repo, too svn update -r "${VEX_SVN_REV}" VEX/ @@ -69,6 +73,9 @@ then # "Need library load address in log files" patch -p0 < "${THISDIR}/xml-loadadr.patch" + # Make red zone 64 bytes bigger to catch more buffer overruns + patch -p0 < "${THISDIR}/redzone.patch" + if [ "${INSTALL_TSAN}" = "yes" ] then # Add ThreadSanitier to the installation. @@ -85,7 +92,7 @@ then then # replace symlink with actual contents! cp install-sh install-sh.new - mv install-sh.new install-sh + mv -f install-sh.new install-sh chmod +x install-sh fi @@ -101,17 +108,17 @@ fi if test "x${MAKE_TARBALL}" = "xyes" then - tar -czvf "valgrind-${VALGRIND_SVN_REV}.tgz" "valgrind-${VALGRIND_SVN_REV}" + tar -czvf "$DIRNAME".tgz "$DIRNAME" fi if test "x${USE_TARBALL}" = "xyes" then - tar -xzvf "valgrind-${VALGRIND_SVN_REV}.tgz" + tar -xzvf "$DIRNAME".tgz fi if test "x${MAKE_TARBALL}" != "xyes" then - cd "valgrind-${VALGRIND_SVN_REV}" + cd "$DIRNAME" OVERRIDE_LD_DIR="${THISDIR}/override_ld" if ld --version | grep gold @@ -139,7 +146,7 @@ then fi # Desired parent directory for valgrind's bin, include, etc. - PREFIX="${1:-/usr/local/valgrind-${VALGRIND_SVN_REV}}" + PREFIX="${1:-/usr/local/$DIRNAME}" parent_of_prefix=$(dirname "${PREFIX}") if test ! -d "${parent_of_prefix}" then |