diff options
-rwxr-xr-x | tools/valgrind/build-valgrind-for-chromium.sh | 8 | ||||
-rw-r--r-- | tools/valgrind/vbug205541.patch | 21 | ||||
-rw-r--r-- | tools/valgrind/vbug210481.patch | 14 |
3 files changed, 43 insertions, 0 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh index 3cd11b5..c4b2207 100755 --- a/tools/valgrind/build-valgrind-for-chromium.sh +++ b/tools/valgrind/build-valgrind-for-chromium.sh @@ -76,6 +76,14 @@ then # Make red zone 64 bytes bigger to catch more buffer overruns patch -p0 < "${THISDIR}/redzone.patch" + # Fix/work around https://bugs.kde.org/show_bug.cgi?id=210481 + # which prevented valgrind from handling v8 on 64 bits + patch -p0 < "${THISDIR}/vbug210481.patch" + + # Fix/work around https://bugs.kde.org/show_bug.cgi?id=205541 + # which prevented valgrind from handling wine + patch -p0 < "${THISDIR}/vbug205541.patch" + if [ "${INSTALL_TSAN}" = "yes" ] then # Add ThreadSanitier to the installation. diff --git a/tools/valgrind/vbug205541.patch b/tools/valgrind/vbug205541.patch new file mode 100644 index 0000000..3ab721a --- /dev/null +++ b/tools/valgrind/vbug205541.patch @@ -0,0 +1,21 @@ +# See https://bugs.kde.org/show_bug.cgi?id=205541#c1 +Index: memcheck/mc_main.c +=================================================================== +--- memcheck/mc_main.c (revision 10877) ++++ memcheck/mc_main.c (working copy) +@@ -3708,7 +3708,14 @@ + if (rr || ww || xx) + MC_(make_mem_defined)(a, len); + else +- MC_(make_mem_noaccess)(a, len); ++ MC_(make_mem_defined)(a, len); ++ /* State after mmap(,,PROT_NONE,,,) should match ++ * state after mprotect(,,PROT_NONE): the operating system ++ * will trap any access, but any subsequent mprotect(,,PROT_R|W|X) ++ * will re-instate the previous V bits [in this case, all valid]. ++ * See comment in mc_pre_clo_init() re: ++ * VG_(track_change_mem_mprotect) ( NULL ); ++ */ + } + + static diff --git a/tools/valgrind/vbug210481.patch b/tools/valgrind/vbug210481.patch new file mode 100644 index 0000000..2907f6d --- /dev/null +++ b/tools/valgrind/vbug210481.patch @@ -0,0 +1,14 @@ +# See https://bugs.kde.org/show_bug.cgi?id=210481 +Index: guest_amd64_toIR.c +=================================================================== +--- VEX/priv/guest_amd64_toIR.c (Revision 1924) ++++ VEX/priv/guest_amd64_toIR.c (Arbeitskopie) +@@ -14597,7 +14597,7 @@ + /* There is no encoding for 32-bit pop in 64-bit mode. + So sz==4 actually means sz==8. */ + if (haveF2orF3(pfx)) goto decode_failure; +- vassert(sz == 2 || sz == 4); ++ vassert(sz == 2 || sz == 4 || sz == 8); + if (sz == 4) sz = 8; + if (sz != 8) goto decode_failure; // until we know a sz==2 test case exists + |