summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 18:12:11 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 18:12:11 +0000
commit57c7b47c5b8180d8771842315ce31288f42410e0 (patch)
treea0382f2aa4d5878fa4241c1ab0b1529d547cb571 /tools
parent36cf19b922c0b2f31dcab456fe2e36b1e12dbf4f (diff)
downloadchromium_src-57c7b47c5b8180d8771842315ce31288f42410e0.zip
chromium_src-57c7b47c5b8180d8771842315ce31288f42410e0.tar.gz
chromium_src-57c7b47c5b8180d8771842315ce31288f42410e0.tar.bz2
Patch from timur. Properly terminate XML output document in case of an exec.
This makes the python scripts happier. Also add some safeguards against building valgrind with gold, which generates a broken valgrind. BUG=17453 TEST=build and install new valgrind; sh tools/valgrind/chrome_tests.sh -t base, verify no "valgrind did not finish" warnings Review URL: http://codereview.chromium.org/159200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/valgrind/build-valgrind-for-chromium.sh17
-rw-r--r--tools/valgrind/fork.patch25
2 files changed, 41 insertions, 1 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh
index c81231e..7c9c1be 100755
--- a/tools/valgrind/build-valgrind-for-chromium.sh
+++ b/tools/valgrind/build-valgrind-for-chromium.sh
@@ -6,6 +6,12 @@ THISDIR=`cd $THISDIR && /bin/pwd`
set -x
set -e
+if ld --version | grep gold
+then
+ echo cannot build valgrind with gold
+ exit 1
+fi
+
# Check out latest version that following patches known to apply against
rm -rf valgrind-20090715
svn co -r '{2009-07-15}' svn://svn.valgrind.org/valgrind/trunk valgrind-20090715
@@ -19,7 +25,7 @@ cd ..
# Work around bug https://bugs.kde.org/show_bug.cgi?id=162848
# "fork() not handled properly"
-#wget -O fork.patch "https://bugs.kde.org/attachment.cgi?id=35150"
+#wget -O fork.patch "https://bugs.kde.org/attachment.cgi?id=35510"
patch -p0 < "$THISDIR"/fork.patch
# Work around bug https://bugs.kde.org/show_bug.cgi?id=186796
@@ -30,6 +36,15 @@ patch -p0 < "$THISDIR"/longlines.patch
sh autogen.sh
./configure --prefix=/usr/local/valgrind-20090715
make -j4
+
+if ./vg-in-place /bin/true
+then
+ echo built valgrind passes smoke test, good
+else
+ echo built valgrind fails smoke test
+ exit 1
+fi
+
sudo make install
cd /usr
test -f bin/valgrind && sudo mv bin/valgrind bin/valgrind.orig
diff --git a/tools/valgrind/fork.patch b/tools/valgrind/fork.patch
index 6b64003..7e9281c 100644
--- a/tools/valgrind/fork.patch
+++ b/tools/valgrind/fork.patch
@@ -1,3 +1,28 @@
+Index: coregrind/m_syswrap/syswrap-generic.c
+===================================================================
+--- coregrind/m_syswrap/syswrap-generic.c (revision 10399)
++++ coregrind/m_syswrap/syswrap-generic.c (working copy)
+@@ -2558,6 +2558,15 @@
+
+ } else {
+ path = (Char*)ARG1;
++ if (VG_(clo_xml)) {
++ VG_(message)(Vg_UserMsg, "");
++ VG_(message)(Vg_UserMsg, "<execv/>");
++ VG_(message)(Vg_UserMsg, "");
++ VG_(message)(Vg_UserMsg, "</valgrindoutput>");
++ VG_(message)(Vg_UserMsg, "");
++ } else {
++ VG_(message)(Vg_UserMsg, "execv called - the tool will now quit");
++ }
+ }
+
+ // Set up the child's environment.
+@@ -4093,4 +4102,3 @@
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+-
Index: coregrind/m_main.c
===================================================================
--- coregrind/m_main.c (revision 10399)