| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # This script contains some functions useful to build | 7 # This script contains some functions useful to build |
| 8 # Valgrind and ThreadSanitizer for use with chromium | 8 # Valgrind and ThreadSanitizer for use with chromium |
| 9 | 9 |
| 10 THISDIR=$(dirname "${0}") | 10 THISDIR=$(dirname "${0}") |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 patch -p0 -i "${THISDIR}/xml-loadadr.patch" | 41 patch -p0 -i "${THISDIR}/xml-loadadr.patch" |
| 42 | 42 |
| 43 # Fix/work around https://bugs.kde.org/show_bug.cgi?id=210481 | 43 # Fix/work around https://bugs.kde.org/show_bug.cgi?id=210481 |
| 44 # which prevented valgrind from handling v8 on 64 bits | 44 # which prevented valgrind from handling v8 on 64 bits |
| 45 patch -p0 -i "${THISDIR}/vbug210481.patch" | 45 patch -p0 -i "${THISDIR}/vbug210481.patch" |
| 46 | 46 |
| 47 # Add intercepts for tcmalloc memory functions. | 47 # Add intercepts for tcmalloc memory functions. |
| 48 # The corresponding feature request for Valgrind is at | 48 # The corresponding feature request for Valgrind is at |
| 49 # https://bugs.kde.org/show_bug.cgi?id=219156. | 49 # https://bugs.kde.org/show_bug.cgi?id=219156. |
| 50 patch -p0 -i "${THISDIR}/intercept_tcmalloc.patch" | 50 patch -p0 -i "${THISDIR}/intercept_tcmalloc.patch" |
| 51 | |
| 52 # Fix for https://bugs.kde.org/show_bug.cgi?id=227570 | |
| 53 # which causes false uninitialised memory warnings | |
| 54 if [ "$VG_REV" -lt "11051" ] | |
| 55 then | |
| 56 patch -p0 -i "${THISDIR}/vbug227570.patch" | |
| 57 fi | |
| 58 # }}} | 51 # }}} |
| 59 } | 52 } |
| 60 | 53 |
| 61 build_valgrind() { | 54 build_valgrind() { |
| 62 # Build Valgrind from sources in the current directory. | 55 # Build Valgrind from sources in the current directory. |
| 63 # $1 = output directory name for binaries | 56 # $1 = output directory name for binaries |
| 64 # $2 = flags to pass to configure | 57 # $2 = flags to pass to configure |
| 65 # {{{1 | 58 # {{{1 |
| 66 OUTPUT_DIR="$BINARIES_DIR/$1" | 59 OUTPUT_DIR="$BINARIES_DIR/$1" |
| 67 CONFIGURE_FLAGS=$2 | 60 CONFIGURE_FLAGS=$2 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 # Check that the binaries directory exists. | 213 # Check that the binaries directory exists. |
| 221 BINARIES_DIR="$THISDIR/../binaries" | 214 BINARIES_DIR="$THISDIR/../binaries" |
| 222 if ! [ -a $BINARIES_DIR ] | 215 if ! [ -a $BINARIES_DIR ] |
| 223 then | 216 then |
| 224 echo "Error: $BINARIES_DIR doesn't exist!" | 217 echo "Error: $BINARIES_DIR doesn't exist!" |
| 225 exit 1 | 218 exit 1 |
| 226 fi | 219 fi |
| 227 | 220 |
| 228 set -e | 221 set -e |
| 229 set -x | 222 set -x |
| OLD | NEW |