[v8] use system valgrind header (1141483)
Tom Callaway
spot at fedoraproject.org
Tue Dec 2 20:31:43 UTC 2014
commit 284f7bc089b1d7cecb9ad64c0623eb62817289e6
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Dec 2 15:31:42 2014 -0500
use system valgrind header (1141483)
v8-3.14.5.10-system-valgrind.patch | 44 ++++++++++++++++++++++++++++++++++++
v8.spec | 13 +++++++++-
2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/v8-3.14.5.10-system-valgrind.patch b/v8-3.14.5.10-system-valgrind.patch
new file mode 100644
index 0000000..1e5b0cb
--- /dev/null
+++ b/v8-3.14.5.10-system-valgrind.patch
@@ -0,0 +1,44 @@
+diff -up v8-3.14.5.10/src/ia32/cpu-ia32.cc.system-valgrind v8-3.14.5.10/src/ia32/cpu-ia32.cc
+--- v8-3.14.5.10/src/ia32/cpu-ia32.cc.system-valgrind 2012-01-16 06:42:08.000000000 -0500
++++ v8-3.14.5.10/src/ia32/cpu-ia32.cc 2014-12-02 15:15:07.819525430 -0500
+@@ -28,7 +28,7 @@
+ // CPU specific code for ia32 independent of OS goes here.
+
+ #ifdef __GNUC__
+-#include "third_party/valgrind/valgrind.h"
++#include <valgrind/valgrind.h>
+ #endif
+
+ #include "v8.h"
+@@ -67,8 +67,7 @@ void CPU::FlushICache(void* start, size_
+ // solution is to run valgrind with --smc-check=all, but this comes at a big
+ // performance cost. We can notify valgrind to invalidate its cache.
+ #ifdef VALGRIND_DISCARD_TRANSLATIONS
+- unsigned res = VALGRIND_DISCARD_TRANSLATIONS(start, size);
+- USE(res);
++ VALGRIND_DISCARD_TRANSLATIONS(start, size);
+ #endif
+ }
+
+diff -up v8-3.14.5.10/src/x64/cpu-x64.cc.system-valgrind v8-3.14.5.10/src/x64/cpu-x64.cc
+--- v8-3.14.5.10/src/x64/cpu-x64.cc.system-valgrind 2012-02-23 03:45:21.000000000 -0500
++++ v8-3.14.5.10/src/x64/cpu-x64.cc 2014-12-02 15:14:51.289621074 -0500
+@@ -28,7 +28,7 @@
+ // CPU specific code for x64 independent of OS goes here.
+
+ #if defined(__GNUC__) && !defined(__MINGW64__)
+-#include "third_party/valgrind/valgrind.h"
++#include <valgrind/valgrind.h>
+ #endif
+
+ #include "v8.h"
+@@ -67,8 +67,7 @@ void CPU::FlushICache(void* start, size_
+ // solution is to run valgrind with --smc-check=all, but this comes at a big
+ // performance cost. We can notify valgrind to invalidate its cache.
+ #ifdef VALGRIND_DISCARD_TRANSLATIONS
+- unsigned res = VALGRIND_DISCARD_TRANSLATIONS(start, size);
+- USE(res);
++ VALGRIND_DISCARD_TRANSLATIONS(start, size);
+ #endif
+ }
+
diff --git a/v8.spec b/v8.spec
index 7318794..570ec2c 100644
--- a/v8.spec
+++ b/v8.spec
@@ -23,7 +23,7 @@
Name: v8
Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny}
-Release: 14%{?dist}
+Release: 15%{?dist}
Epoch: 1
Summary: JavaScript Engine
Group: System Environment/Libraries
@@ -33,6 +33,7 @@ Source0: http://commondatastorage.googleapis.com/chromium-browser-official/v8-%{
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: %{ix86} x86_64 %{arm}
BuildRequires: scons, readline-devel, libicu-devel
+BuildRequires: valgrind-devel
#backport fix for CVE-2013-2634 (RHBZ#924495)
Patch1: v8-3.14.5.8-CVE-2013-2634.patch
@@ -92,6 +93,9 @@ Patch12: v8-3.14.5.10-CVE-2013-6668.patch
# https://github.com/joyent/node/commit/3122e0eae64c5ab494b29d0a9cadef902d93f1f9
Patch13: v8-3.14.5.10-CVE-2013-6668-segfault.patch
+# Use system valgrind header
+# https://bugzilla.redhat.com/show_bug.cgi?id=1141483
+Patch14: v8-3.14.5.10-system-valgrind.patch
%description
V8 is Google's open source JavaScript engine. V8 is written in C++ and is used
@@ -121,6 +125,10 @@ Development headers and libraries for v8.
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1 -b .system-valgrind
+
+# Do not need this lying about.
+rm -rf src/third_party/valgrind
#Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6)
%if (0%{?rhel} > 6 || 0%{?fedora} > 18)
@@ -285,6 +293,9 @@ rm -rf %{buildroot}
%{python_sitelib}/j*.py*
%changelog
+* Tue Dec 2 2014 Tom Callaway <spot at fedoraproject.org> - 1:3.14.5.10-15
+- use system valgrind header (bz1141483)
+
* Wed Sep 17 2014 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1:3.14.5.10-14
- backport bugfix that eliminates unused-local-typedefs warning
- backport security fix: Fix Hydrogen bounds check elimination (CVE-2013-6668; RHBZ#1086120)
More information about the scm-commits
mailing list