From 56ecc98d1d26b07da7114cfaf984ccaa9fe726b1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 01:43:42 -0600 Subject: [PATCH 001/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 3c2ef0f..1d5873e 100644 --- a/v8.spec +++ b/v8.spec @@ -17,7 +17,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 4%{?dist} +Release: 5%{?dist} Summary: JavaScript Engine Group: System Environment/Libraries License: BSD @@ -182,6 +182,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 3.3.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Sat Aug 27 2011 Matěj Cepl - 3.3.10-4 - Make jsmin.py working. From 05ed29d493b4f3e0e74a021152e1f8881e550158 Mon Sep 17 00:00:00 2001 From: Thomas Spura Date: Fri, 27 Jan 2012 13:25:02 +0100 Subject: [PATCH 002/100] - update to 3.8.9 - some patches not applicable anymore - experimental i18n extension patch doesn't work anymore --- .gitignore | 1 + sources | 2 +- v8-3.2.10-always-false.patch | 14 --------- v8-3.3.10-enable-experimental.patch | 2 +- v8.spec | 46 +++++++++++++++-------------- 5 files changed, 27 insertions(+), 38 deletions(-) delete mode 100644 v8-3.2.10-always-false.patch diff --git a/.gitignore b/.gitignore index b944aad..504d004 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /v8-3.0.0.1.tar.gz /v8-3.5.1.tar.bz2 /v8-3.3.10.tar.bz2 +/v8-3.8.9-20120127svn10526.tar.bz2 diff --git a/sources b/sources index ef53154..4eec8b4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bf7d1bd637b9fd28796cdc7c95ce04b5 v8-3.3.10.tar.bz2 +51a5bcd3d9299fbb63adf3de7f890faf v8-3.8.9-20120127svn10526.tar.bz2 diff --git a/v8-3.2.10-always-false.patch b/v8-3.2.10-always-false.patch deleted file mode 100644 index 92b30da..0000000 --- a/v8-3.2.10-always-false.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up v8-3.2.10/src/runtime.cc.always-false v8-3.2.10/src/runtime.cc ---- v8-3.2.10/src/runtime.cc.always-false 2011-06-10 11:05:03.000000000 -0400 -+++ v8-3.2.10/src/runtime.cc 2011-06-10 11:20:09.713526215 -0400 -@@ -4092,8 +4092,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_S - StrictModeFlag strict_mode = kNonStrictMode; - if (args.length() == 5) { - CONVERT_SMI_CHECKED(strict_unchecked, args[4]); -- RUNTIME_ASSERT(strict_unchecked == kStrictMode || -- strict_unchecked == kNonStrictMode); -+ // RUNTIME_ASSERT(strict_unchecked == kStrictMode || -+ // strict_unchecked == kNonStrictMode); - strict_mode = static_cast(strict_unchecked); - } - diff --git a/v8-3.3.10-enable-experimental.patch b/v8-3.3.10-enable-experimental.patch index 4c81e17..1b14815 100644 --- a/v8-3.3.10-enable-experimental.patch +++ b/v8-3.3.10-enable-experimental.patch @@ -26,7 +26,7 @@ diff -up v8-3.3.10/src/SConscript.experimental v8-3.3.10/src/SConscript print message sys.exit(1) @@ -328,6 +338,13 @@ def ConfigureObjectFiles(): - libraries_src = env.JS2C(['libraries.cc'], library_files, TYPE='CORE') + ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) + # Combine the experimental I18N JavaScript library files into a C++ file diff --git a/v8.spec b/v8.spec index 1d5873e..b56bb2e 100644 --- a/v8.spec +++ b/v8.spec @@ -9,29 +9,25 @@ # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions %global somajor 3 -%global sominor 3 -%global sobuild 10 +%global sominor 8 +%global sobuild 9 %global sover %{somajor}.%{sominor}.%{sobuild} %{!?python_sitelib: %global python_sitelib %(%{__python} \ -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 5%{?dist} +Release: 1.20120127svn10526%{?dist} Summary: JavaScript Engine Group: System Environment/Libraries License: BSD URL: http://code.google.com/p/v8 # No tarballs, pulled from svn # Checkout script is Source1 -Source0: v8-%{version}.tar.bz2 +Source0: v8-%{version}-20120127svn10526.tar.bz2 Source1: v8-daily-tarball.sh # Enable experimental i18n extension that chromium needs Patch0: v8-3.3.10-enable-experimental.patch -# Disable comparison check that gcc 4.5 thinks is always false -Patch1: v8-3.2.10-always-false.patch -# Fix language-matcher.cc compile -Patch2: v8-3.3.10-language-matcher-fix.patch # Remove unnecessary shebangs Patch3: v8-2.5.9-shebangs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -52,12 +48,14 @@ Requires: %{name} = %{version}-%{release} Development headers and libraries for v8. %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 -b .experimental -%patch1 -p1 -b .always-false -%patch2 -p1 -b .fix +%setup -q -n %{name}-%{version}-20120127svn10526 +#patch0 -p1 -b .experimental %patch3 -p1 -b .shebang +#sed -i '/break-iterator.cc/d' src/SConscript +#sed -i '/collator.cc/d' src/SConscript +sed -i '/extensions\/experimental\//d' src/SConscript + # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct @@ -71,13 +69,15 @@ find . \( -name \*.cc -o -name \*.h -o -name \*.py \) -a -executable \ %build -export GCC_VERSION="44" -scons library=shared snapshots=on \ +export GCC_VERSION="46" +export COMPRESSION="off" +scons library=shared snapshots=on verbose=on \ %ifarch x86_64 arch=x64 \ %endif visibility=default \ -env=CCFLAGS:"-fPIC" +env=CCFLAGS:"-fPIC" \ +%{?_smp_mflags} %if 0%{?fedora} > 15 export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu-i18n` @@ -95,7 +95,6 @@ g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8 obj/release/preparse-data.os \ obj/release/preparser-api.os \ obj/release/preparser.os \ - obj/release/scanner-base.os \ obj/release/token.os \ obj/release/unicode.os @@ -103,13 +102,13 @@ g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8 export RELEASE_BUILD_OBJS=`echo obj/release/*.os | sed 's|obj/release/preparser-api.os||g'` %ifarch arm -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/arm/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/arm/*.os $ICU_LINK_FLAGS %endif %ifarch %{ix86} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS %endif %ifarch x86_64 -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/x64/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/x64/*.os $ICU_LINK_FLAGS %endif # We need to do this so d8 can link against it. @@ -126,7 +125,7 @@ library=shared snapshots=on console=readline visibility=default || : # Sigh. I f*****g hate scons. rm -rf d8 -g++ $RPM_OPT_FLAGS -o d8 obj/release/d8-debug.os obj/release/d8-posix.os obj/release/d8-readline.os obj/release/d8.os obj/release/d8-js.os -lpthread -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lpthread -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS %install rm -rf %{buildroot} @@ -151,10 +150,8 @@ chmod -x %{buildroot}%{_includedir}/v8*.h mkdir -p %{buildroot}%{_includedir}/v8/extensions/experimental/ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ -install -p src/extensions/experimental/*.h %{buildroot}%{_includedir}/v8/extensions/experimental/ chmod -x %{buildroot}%{_includedir}/v8/extensions/*.h -chmod -x %{buildroot}%{_includedir}/v8/extensions/experimental/*.h # install Python JS minifier scripts for nodejs install -d %{buildroot}%{python_sitelib} @@ -182,6 +179,11 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Jan 27 2012 Thomas Spura - 3.8.9-1.20120127svn10526 +- update to 3.8.9 +- some patches not applicable anymore +- experimental i18n extension patch doesn't work anymore + * Sat Jan 14 2012 Fedora Release Engineering - 3.3.10-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 70afa7a8d47b867f423be6b160cfccc4b79717b5 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 20 Mar 2012 11:12:04 -0400 Subject: [PATCH 003/100] 3.7.12 + epoch for chromium --- .gitignore | 1 + sources | 2 +- v8-3.4.14-enable-experimental.patch | 61 ++++++ v8-3.4.14-fix-experimental-compile.patch | 243 +++++++++++++++++++++++ v8-3.4.14-i18n-js2c.patch | 40 ++++ v8.spec | 153 +++++++------- 6 files changed, 429 insertions(+), 71 deletions(-) create mode 100644 v8-3.4.14-enable-experimental.patch create mode 100644 v8-3.4.14-fix-experimental-compile.patch create mode 100644 v8-3.4.14-i18n-js2c.patch diff --git a/.gitignore b/.gitignore index 504d004..a0d992e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /v8-3.5.1.tar.bz2 /v8-3.3.10.tar.bz2 /v8-3.8.9-20120127svn10526.tar.bz2 +/v8-3.7.12.tar.bz2 diff --git a/sources b/sources index 4eec8b4..dc61ae0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -51a5bcd3d9299fbb63adf3de7f890faf v8-3.8.9-20120127svn10526.tar.bz2 +37676bdba884c1a28a57dd0a3aacb386 v8-3.7.12.tar.bz2 diff --git a/v8-3.4.14-enable-experimental.patch b/v8-3.4.14-enable-experimental.patch new file mode 100644 index 0000000..9a7b805 --- /dev/null +++ b/v8-3.4.14-enable-experimental.patch @@ -0,0 +1,61 @@ +diff -up v8-3.4.14-20110721svn8716/src/SConscript.experimental v8-3.4.14-20110721svn8716/src/SConscript +--- v8-3.4.14-20110721svn8716/src/SConscript.experimental 2011-07-21 11:02:27.000000000 -0400 ++++ v8-3.4.14-20110721svn8716/src/SConscript 2011-07-21 13:13:52.678543506 -0400 +@@ -134,6 +134,14 @@ SOURCES = { + zone.cc + extensions/gc-extension.cc + extensions/externalize-string-extension.cc ++ extensions/experimental/break-iterator.cc ++ extensions/experimental/collator.cc ++ extensions/experimental/datetime-format.cc ++ extensions/experimental/i18n-extension.cc ++ extensions/experimental/i18n-locale.cc ++ extensions/experimental/i18n-utils.cc ++ extensions/experimental/language-matcher.cc ++ extensions/experimental/number-format.cc + """), + 'arch:arm': Split(""" + arm/builtins-arm.cc +@@ -310,6 +318,10 @@ proxy.js + '''.split() + + ++I18N_LIBRARY_FILES = ''' ++extensions/experimental/i18n.js ++'''.split() ++ + def Abort(message): + print message + sys.exit(1) +@@ -348,6 +360,13 @@ def ConfigureObjectFiles(): + ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) + libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) + ++ # Combine the experimental I18N JavaScript library files into a C++ file ++ # and compile it. ++ i18n_library_files = [ s for s in I18N_LIBRARY_FILES ] ++ i18n_library_files.append('macros.py') ++ i18n_libraries_src = env.JS2C(['i18n-libraries.cc'], i18n_library_files, **BuildJS2CEnv('I18N')) ++ i18n_libraries_obj = context.ConfigureObject(env, i18n_libraries_src, CPPPATH=['.']) ++ + # Combine the experimental JavaScript library files into a C++ file + # and compile it. + experimental_library_files = [ s for s in EXPERIMENTAL_LIBRARY_FILES ] +@@ -373,7 +392,7 @@ def ConfigureObjectFiles(): + mksnapshot_env = env.Copy() + mksnapshot_env.Replace(**context.flags['mksnapshot']) + mksnapshot_src = 'mksnapshot.cc' +- mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') ++ mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, i18n_libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') + if context.use_snapshot: + if context.build_snapshot: + snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath) +@@ -382,7 +401,7 @@ def ConfigureObjectFiles(): + snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) + else: + snapshot_obj = empty_snapshot_obj +- library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj, snapshot_obj] ++ library_objs = [non_snapshot_files, libraries_obj, i18n_libraries_obj, experimental_libraries_obj, snapshot_obj] + return (library_objs, d8_objs, [mksnapshot], preparser_objs) + + diff --git a/v8-3.4.14-fix-experimental-compile.patch b/v8-3.4.14-fix-experimental-compile.patch new file mode 100644 index 0000000..5a85fd9 --- /dev/null +++ b/v8-3.4.14-fix-experimental-compile.patch @@ -0,0 +1,243 @@ +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc.BAD 2011-07-21 12:36:38.117525896 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc 2011-07-21 12:36:44.663541775 -0400 +@@ -25,7 +25,7 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/break-iterator.h" ++#include "extensions/experimental/break-iterator.h" + + #include + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h.BAD 2011-07-21 12:37:39.989539464 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h 2011-07-21 12:37:47.271546557 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_BREAK_ITERATOR_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_BREAK_ITERATOR_H_ + +-#include "include/v8.h" ++#include "v8.h" + + #include "unicode/uversion.h" + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc.BAD 2011-07-21 12:38:32.892541085 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc 2011-07-21 12:38:42.536540200 -0400 +@@ -25,7 +25,7 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/collator.h" ++#include "extensions/experimental/collator.h" + + #include "unicode/coll.h" + #include "unicode/locid.h" +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h.BAD 2011-07-21 12:40:38.695553065 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h 2011-07-21 12:40:46.604287238 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_COLLATOR_H + #define V8_EXTENSIONS_EXPERIMENTAL_COLLATOR_H_ + +-#include "include/v8.h" ++#include "v8.h" + + #include "unicode/uversion.h" + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc.BAD 2011-07-21 12:42:32.070546811 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc 2011-07-21 12:42:43.429540019 -0400 +@@ -25,11 +25,11 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/datetime-format.h" ++#include "extensions/experimental/datetime-format.h" + + #include + +-#include "src/extensions/experimental/i18n-utils.h" ++#include "extensions/experimental/i18n-utils.h" + #include "unicode/dtfmtsym.h" + #include "unicode/dtptngen.h" + #include "unicode/locid.h" +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h.BAD 2011-07-21 12:40:53.229295468 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h 2011-07-21 12:41:00.279541337 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_DATETIME_FORMAT_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_DATETIME_FORMAT_H_ + +-#include "include/v8.h" ++#include "v8.h" + + #include "unicode/uversion.h" + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc.BAD 2011-07-21 12:42:51.682535397 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc 2011-07-21 12:43:10.905542088 -0400 +@@ -25,14 +25,14 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/i18n-extension.h" ++#include "extensions/experimental/i18n-extension.h" + +-#include "src/extensions/experimental/break-iterator.h" +-#include "src/extensions/experimental/collator.h" +-#include "src/extensions/experimental/datetime-format.h" +-#include "src/extensions/experimental/i18n-locale.h" +-#include "src/extensions/experimental/i18n-natives.h" +-#include "src/extensions/experimental/number-format.h" ++#include "extensions/experimental/break-iterator.h" ++#include "extensions/experimental/collator.h" ++#include "extensions/experimental/datetime-format.h" ++#include "extensions/experimental/i18n-locale.h" ++#include "extensions/experimental/i18n-natives.h" ++#include "extensions/experimental/number-format.h" + + namespace v8 { + namespace internal { +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h.BAD 2011-07-21 12:41:13.170538335 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h 2011-07-21 12:41:20.023540712 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_I18N_EXTENSION_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_I18N_EXTENSION_H_ + +-#include "include/v8.h" ++#include "v8.h" + + namespace v8 { + namespace internal { +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc.BAD 2011-07-21 12:43:18.896539148 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc 2011-07-21 12:43:32.626538677 -0400 +@@ -25,10 +25,10 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/i18n-locale.h" ++#include "extensions/experimental/i18n-locale.h" + +-#include "src/extensions/experimental/i18n-utils.h" +-#include "src/extensions/experimental/language-matcher.h" ++#include "extensions/experimental/i18n-utils.h" ++#include "extensions/experimental/language-matcher.h" + #include "unicode/locid.h" + #include "unicode/uloc.h" + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h.BAD 2011-07-21 12:41:28.401292703 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h 2011-07-21 12:41:34.887302839 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_I18N_LOCALE_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_I18N_LOCALE_H_ + +-#include "include/v8.h" ++#include "v8.h" + + namespace v8 { + namespace internal { +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc.BAD 2011-07-21 12:43:40.641540032 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc 2011-07-21 12:43:47.258552856 -0400 +@@ -25,7 +25,7 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/i18n-utils.h" ++#include "extensions/experimental/i18n-utils.h" + + #include + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h.BAD 2011-07-21 12:41:47.436545325 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h 2011-07-21 12:41:53.749539656 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_I18N_UTILS_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_I18N_UTILS_H_ + +-#include "include/v8.h" ++#include "v8.h" + + #include "unicode/uversion.h" + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc.BAD 2011-07-21 12:43:55.484291257 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc 2011-07-21 12:47:31.316288453 -0400 +@@ -28,11 +28,11 @@ + // TODO(cira): Remove LanguageMatcher from v8 when ICU implements + // language matching API. + +-#include "src/extensions/experimental/language-matcher.h" ++#include "extensions/experimental/language-matcher.h" + + #include + +-#include "src/extensions/experimental/i18n-utils.h" ++#include "extensions/experimental/i18n-utils.h" + #include "unicode/datefmt.h" // For getAvailableLocales + #include "unicode/locid.h" + #include "unicode/uloc.h" +@@ -43,7 +43,7 @@ namespace internal { + const unsigned int LanguageMatcher::kLanguageWeight = 75; + const unsigned int LanguageMatcher::kScriptWeight = 20; + const unsigned int LanguageMatcher::kRegionWeight = 5; +-const unsigned int LanguageMatcher::kThreshold = 50; ++const int LanguageMatcher::kThreshold = 50; + const unsigned int LanguageMatcher::kPositionBonus = 1; + const char* const LanguageMatcher::kDefaultLocale = "root"; + +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h.BAD 2011-07-21 12:42:00.374537754 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h 2011-07-21 12:47:59.556286069 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_LANGUAGE_MATCHER_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_LANGUAGE_MATCHER_H_ + +-#include "include/v8.h" ++#include "v8.h" + + #include "unicode/uloc.h" + +@@ -76,7 +76,7 @@ class LanguageMatcher { + static const unsigned int kRegionWeight; + + // LocaleID match score has to be over this number to accept the match. +- static const unsigned int kThreshold; ++ static const int kThreshold; + + // For breaking ties in priority queue. + static const unsigned int kPositionBonus; +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc.BAD 2011-07-21 12:44:13.227297121 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc 2011-07-21 12:44:23.119292346 -0400 +@@ -25,11 +25,11 @@ + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-#include "src/extensions/experimental/number-format.h" ++#include "extensions/experimental/number-format.h" + + #include + +-#include "src/extensions/experimental/i18n-utils.h" ++#include "extensions/experimental/i18n-utils.h" + #include "unicode/dcfmtsym.h" + #include "unicode/decimfmt.h" + #include "unicode/locid.h" +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h.BAD 2011-07-21 12:42:15.678549139 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h 2011-07-21 12:42:22.940543222 -0400 +@@ -28,7 +28,7 @@ + #ifndef V8_EXTENSIONS_EXPERIMENTAL_NUMBER_FORMAT_H_ + #define V8_EXTENSIONS_EXPERIMENTAL_NUMBER_FORMAT_H_ + +-#include "include/v8.h" ++#include "v8.h" + + #include "unicode/uversion.h" + diff --git a/v8-3.4.14-i18n-js2c.patch b/v8-3.4.14-i18n-js2c.patch new file mode 100644 index 0000000..4665fff --- /dev/null +++ b/v8-3.4.14-i18n-js2c.patch @@ -0,0 +1,40 @@ +diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py.i18n-js2c v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py +--- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py.i18n-js2c 2011-07-21 14:39:22.402295140 -0400 ++++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py 2011-07-21 14:39:28.328285018 -0400 +@@ -85,7 +85,7 @@ HEADER_TEMPLATE = """\ + // want to make changes to this file you should either change the + // javascript source files or the i18n-js2c.py script. + +-#include "src/extensions/experimental/i18n-natives.h" ++#include "extensions/experimental/i18n-natives.h" + + namespace v8 { + namespace internal { +diff -up v8-3.4.14-20110721svn8716/src/SConscript.i18n-js2c v8-3.4.14-20110721svn8716/src/SConscript +--- v8-3.4.14-20110721svn8716/src/SConscript.i18n-js2c 2011-07-21 14:38:49.828400947 -0400 ++++ v8-3.4.14-20110721svn8716/src/SConscript 2011-07-21 14:38:49.869408897 -0400 +@@ -318,10 +318,6 @@ proxy.js + '''.split() + + +-I18N_LIBRARY_FILES = ''' +-extensions/experimental/i18n.js +-'''.split() +- + def Abort(message): + print message + sys.exit(1) +@@ -360,11 +356,8 @@ def ConfigureObjectFiles(): + ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) + libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) + +- # Combine the experimental I18N JavaScript library files into a C++ file +- # and compile it. +- i18n_library_files = [ s for s in I18N_LIBRARY_FILES ] +- i18n_library_files.append('macros.py') +- i18n_libraries_src = env.JS2C(['i18n-libraries.cc'], i18n_library_files, **BuildJS2CEnv('I18N')) ++ # Compile the experimental I18N JavaScript C++ file we generated outside. ++ i18n_libraries_src = 'i18n-libraries.cc' + i18n_libraries_obj = context.ConfigureObject(env, i18n_libraries_src, CPPPATH=['.']) + + # Combine the experimental JavaScript library files into a C++ file diff --git a/v8.spec b/v8.spec index b56bb2e..6c178de 100644 --- a/v8.spec +++ b/v8.spec @@ -1,38 +1,45 @@ # Hi Googlers! If you're looking in here for patches, nifty. -# You (and everyone else) are welcome to use any of my Chromium patches under the terms of the GPLv2 or later. -# You (and everyone else) are welcome to use any of my V8-specific patches under the terms of the BSD license. -# You (and everyone else) may NOT use my patches under any other terms. -# I hate to be a party-pooper here, but I really don't want to help Google make a proprietary browser. -# There are enough of those already. -# All copyrightable work in these spec files and patches is Copyright 2010 Tom Callaway +# You (and everyone else) are welcome to use any of my Chromium spec files and +# patches under the terms of the GPLv2 or later. +# You (and everyone else) are welcome to use any of my V8-specific spec files +# and patches under the terms of the BSD license. +# You (and everyone else) may NOT use my spec files or patches under any other +# terms. +# I hate to be a party-pooper here, but I really don't want to help Google +# make a proprietary browser. There are enough of those already. +# All copyrightable work in these spec files and patches is Copyright 2011 +# Tom Callaway # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions %global somajor 3 -%global sominor 8 -%global sobuild 9 +%global sominor 7 +%global sobuild 12 %global sover %{somajor}.%{sominor}.%{sobuild} -%{!?python_sitelib: %global python_sitelib %(%{__python} \ - -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -Name: v8 -Version: %{somajor}.%{sominor}.%{sobuild} -Release: 1.20120127svn10526%{?dist} -Summary: JavaScript Engine -Group: System Environment/Libraries -License: BSD -URL: http://code.google.com/p/v8 +# %%global svnver 20110721svn8716 + +Name: v8 +Version: %{somajor}.%{sominor}.%{sobuild} +Release: 3%{?dist} +Epoch: 1 +Summary: JavaScript Engine +Group: System Environment/Libraries +License: BSD +URL: http://code.google.com/p/v8 # No tarballs, pulled from svn # Checkout script is Source1 -Source0: v8-%{version}-20120127svn10526.tar.bz2 -Source1: v8-daily-tarball.sh +Source0: v8-%{version}.tar.bz2 +Source1: v8-daily-tarball.sh # Enable experimental i18n extension that chromium needs -Patch0: v8-3.3.10-enable-experimental.patch -# Remove unnecessary shebangs -Patch3: v8-2.5.9-shebangs.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExclusiveArch: %{ix86} x86_64 arm -BuildRequires: scons, readline-devel, libicu-devel +Patch0: v8-3.4.14-enable-experimental.patch +# Fix experimental extensions compile +Patch2: v8-3.4.14-fix-experimental-compile.patch +# Fix i18n.js to C conversion +Patch3: v8-3.4.14-i18n-js2c.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExclusiveArch: %{ix86} x86_64 arm +BuildRequires: scons, readline-devel, libicu-devel %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -40,24 +47,21 @@ in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 3rd edition. %package devel -Group: Development/Libraries -Summary: Development headers and libraries for v8 -Requires: %{name} = %{version}-%{release} +Group: Development/Libraries +Summary: Development headers and libraries for v8 +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel Development headers and libraries for v8. %prep -%setup -q -n %{name}-%{version}-20120127svn10526 -#patch0 -p1 -b .experimental -%patch3 -p1 -b .shebang - -#sed -i '/break-iterator.cc/d' src/SConscript -#sed -i '/collator.cc/d' src/SConscript -sed -i '/extensions\/experimental\//d' src/SConscript +%setup -q -n %{name}-%{version} +%patch0 -p1 -b .experimental +%patch2 -p1 -b .fix +%patch3 -p1 -b .i18n-js2c # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code -PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` +PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct # clear spurious executable bits @@ -67,19 +71,18 @@ find . \( -name \*.cc -o -name \*.h -o -name \*.py \) -a -executable \ chmod -x $FILE done - %build -export GCC_VERSION="46" -export COMPRESSION="off" -scons library=shared snapshots=on verbose=on \ +mkdir -p obj/release/ +python src/extensions/experimental/i18n-js2c.py obj/release/i18n-libraries.cc src/extensions/experimental/i18n.js src/macros.py +export GCC_VERSION="44" +scons library=shared snapshots=on \ %ifarch x86_64 arch=x64 \ %endif visibility=default \ -env=CCFLAGS:"-fPIC" \ -%{?_smp_mflags} +env=CCFLAGS:"-fPIC" -%if 0%{?fedora} > 15 +%if 0%{?fedora} >= 16 export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu-i18n` %else export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu` @@ -90,25 +93,35 @@ export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu` rm -rf libv8.so libv8preparser.so # Now, lets make it right. g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8preparser.so.%{somajor} \ - obj/release/allocation.os \ - obj/release/hashmap.os \ - obj/release/preparse-data.os \ - obj/release/preparser-api.os \ - obj/release/preparser.os \ - obj/release/token.os \ - obj/release/unicode.os + obj/release/allocation.os \ + obj/release/bignum.os \ + obj/release/bignum-dtoa.os \ + obj/release/cached-powers.os \ + obj/release/diy-fp.os \ + obj/release/dtoa.os \ + obj/release/fast-dtoa.os \ + obj/release/fixed-dtoa.os \ + obj/release/hashmap.os \ + obj/release/preparse-data.os \ + obj/release/preparser-api.os \ + obj/release/preparser.os \ + obj/release/scanner.os \ + obj/release/strtod.os \ + obj/release/token.os \ + obj/release/unicode.os \ + obj/release/utils.os # "obj/release/preparser-api.os" should not be included in the libv8.so file. export RELEASE_BUILD_OBJS=`echo obj/release/*.os | sed 's|obj/release/preparser-api.os||g'` %ifarch arm -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/arm/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/arm/*.os $ICU_LINK_FLAGS %endif %ifarch %{ix86} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS %endif %ifarch x86_64 -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/x64/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/x64/*.os $ICU_LINK_FLAGS %endif # We need to do this so d8 can link against it. @@ -125,7 +138,7 @@ library=shared snapshots=on console=readline visibility=default || : # Sigh. I f*****g hate scons. rm -rf d8 -g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lpthread -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS %install rm -rf %{buildroot} @@ -150,14 +163,20 @@ chmod -x %{buildroot}%{_includedir}/v8*.h mkdir -p %{buildroot}%{_includedir}/v8/extensions/experimental/ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ +install -p src/extensions/experimental/*.h %{buildroot}%{_includedir}/v8/extensions/experimental/ chmod -x %{buildroot}%{_includedir}/v8/extensions/*.h +chmod -x %{buildroot}%{_includedir}/v8/extensions/experimental/*.h # install Python JS minifier scripts for nodejs install -d %{buildroot}%{python_sitelib} +sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/jsmin.py +sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/js2c.py install -p -m0744 tools/jsmin.py %{buildroot}%{python_sitelib}/ +install -p -m0744 tools/js2c.py %{buildroot}%{python_sitelib}/ chmod -R -x %{buildroot}%{python_sitelib}/*.py* + %clean rm -rf %{buildroot} @@ -179,28 +198,22 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog -* Fri Jan 27 2012 Thomas Spura - 3.8.9-1.20120127svn10526 -- update to 3.8.9 -- some patches not applicable anymore -- experimental i18n extension patch doesn't work anymore +* Tue Mar 20 2012 Tom Callaway 3.7.12-3 +- merge changes from Fedora spec file, sync, add epoch -* Sat Jan 14 2012 Fedora Release Engineering - 3.3.10-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild +* Fri Feb 17 2012 Tom Callaway 3.7.12-2 +- add -Wno-error=strict-overflow for gcc 4.7 (hack, hack, hack) -* Sat Aug 27 2011 Matěj Cepl - 3.3.10-4 -- Make jsmin.py working. +* Mon Feb 13 2012 Tom Callaway 3.7.12-1 +- update to 3.7.12 -* Wed Aug 24 2011 Matěj Cepl - 3.3.10-3 -- A bit of cleanup, include also /usr/bin/j2sc when we have it. -- I don't see the reason why Python files shouldn't be in the - standard Python directories. +* Thu Nov 3 2011 Tom Callaway 3.5.10-1 +- update to 3.5.10 -* Wed Aug 23 2011 T.C. Hollingsworth 3.4.14-2 +- final 3.4.14 tag - include JavaScript minifier scripts in -devel -* Wed Aug 10 2011 Tom Callaway 3.3.10-1 -- tag 3.3.10 - * Fri Jun 10 2011 Tom Callaway 3.2.10-1 - tag 3.2.10 From d1ff5f351fdf5a19544cb27bbdd131817a1f0644 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 30 Mar 2012 10:37:05 -0500 Subject: [PATCH 004/100] use correct arm macros - use the correct abis for hard and soft float --- v8.spec | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/v8.spec b/v8.spec index 6c178de..a5c8672 100644 --- a/v8.spec +++ b/v8.spec @@ -21,7 +21,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -38,7 +38,7 @@ Patch2: v8-3.4.14-fix-experimental-compile.patch # Fix i18n.js to C conversion Patch3: v8-3.4.14-i18n-js2c.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExclusiveArch: %{ix86} x86_64 arm +ExclusiveArch: %{ix86} x86_64 %{arm} BuildRequires: scons, readline-devel, libicu-devel %description @@ -79,6 +79,12 @@ scons library=shared snapshots=on \ %ifarch x86_64 arch=x64 \ %endif +%ifarch armv7hl armv7hnl +armeabi=hard \ +%endif +%ifarch armv5tel armv6l armv7l +armeabi=soft \ +%endif visibility=default \ env=CCFLAGS:"-fPIC" @@ -114,7 +120,7 @@ g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8 # "obj/release/preparser-api.os" should not be included in the libv8.so file. export RELEASE_BUILD_OBJS=`echo obj/release/*.os | sed 's|obj/release/preparser-api.os||g'` -%ifarch arm +%ifarch %{arm} g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/arm/*.os $ICU_LINK_FLAGS %endif %ifarch %{ix86} @@ -198,6 +204,10 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Thu Mar 29 2012 Dennis Gilmore 1:3.7.12-4 +- use correct arm macros +- use the correct abis for hard and soft float + * Tue Mar 20 2012 Tom Callaway 3.7.12-3 - merge changes from Fedora spec file, sync, add epoch From 9ca068cd6acd25804dcfbe24f0e95ec898e09ebf Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 30 Mar 2012 10:49:25 -0500 Subject: [PATCH 005/100] make sure the right arm abi is used in the second call of scons --- v8.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index a5c8672..c8d6aa5 100644 --- a/v8.spec +++ b/v8.spec @@ -21,7 +21,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -139,6 +139,12 @@ scons d8 \ %ifarch x86_64 arch=x64 \ %endif +%ifarch armv7hl armv7hnl +armeabi=hard \ +%endif +%ifarch armv5tel armv6l armv7l +armeabi=soft \ +%endif library=shared snapshots=on console=readline visibility=default || : # Sigh. I f*****g hate scons. @@ -204,6 +210,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Mar 30 2012 Dennis Gilmore 1:3.7.12-5 +- make sure the right arm abi is used in the second call of scons + * Thu Mar 29 2012 Dennis Gilmore 1:3.7.12-4 - use correct arm macros - use the correct abis for hard and soft float From 0d6c012ffdd5bea966526f0ab2cb10764e5c2a3e Mon Sep 17 00:00:00 2001 From: Thomas Spura Date: Mon, 23 Apr 2012 17:39:06 +0200 Subject: [PATCH 006/100] rebuild for icu-49 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index c8d6aa5..7a552e1 100644 --- a/v8.spec +++ b/v8.spec @@ -21,7 +21,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -210,6 +210,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Apr 23 2012 Thomas Spura 1:3.7.12.6 +- rebuild for icu-49 + * Fri Mar 30 2012 Dennis Gilmore 1:3.7.12-5 - make sure the right arm abi is used in the second call of scons From a6356b5ba8f9ae7b69805addff525242c33ccff8 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 9 Jul 2012 14:36:39 -0400 Subject: [PATCH 007/100] 3.10.8 --- .gitignore | 1 + sources | 2 +- v8.spec | 34 +++++++++++++--------------------- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index a0d992e..7f02a53 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /v8-3.3.10.tar.bz2 /v8-3.8.9-20120127svn10526.tar.bz2 /v8-3.7.12.tar.bz2 +/v8-3.10.8.tar.bz2 diff --git a/sources b/sources index dc61ae0..746efba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -37676bdba884c1a28a57dd0a3aacb386 v8-3.7.12.tar.bz2 +7320523ca2eaafa55d657d8230a6d970 v8-3.10.8.tar.bz2 diff --git a/v8.spec b/v8.spec index 7a552e1..06d83a0 100644 --- a/v8.spec +++ b/v8.spec @@ -13,15 +13,15 @@ # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions %global somajor 3 -%global sominor 7 -%global sobuild 12 +%global sominor 10 +%global sobuild 8 %global sover %{somajor}.%{sominor}.%{sobuild} # %%global svnver 20110721svn8716 Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 6%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -31,12 +31,6 @@ URL: http://code.google.com/p/v8 # Checkout script is Source1 Source0: v8-%{version}.tar.bz2 Source1: v8-daily-tarball.sh -# Enable experimental i18n extension that chromium needs -Patch0: v8-3.4.14-enable-experimental.patch -# Fix experimental extensions compile -Patch2: v8-3.4.14-fix-experimental-compile.patch -# Fix i18n.js to C conversion -Patch3: v8-3.4.14-i18n-js2c.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: %{ix86} x86_64 %{arm} BuildRequires: scons, readline-devel, libicu-devel @@ -56,9 +50,6 @@ Development headers and libraries for v8. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -b .experimental -%patch2 -p1 -b .fix -%patch3 -p1 -b .i18n-js2c # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` @@ -73,7 +64,6 @@ find . \( -name \*.cc -o -name \*.h -o -name \*.py \) -a -executable \ %build mkdir -p obj/release/ -python src/extensions/experimental/i18n-js2c.py obj/release/i18n-libraries.cc src/extensions/experimental/i18n.js src/macros.py export GCC_VERSION="44" scons library=shared snapshots=on \ %ifarch x86_64 @@ -107,7 +97,6 @@ g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8 obj/release/dtoa.os \ obj/release/fast-dtoa.os \ obj/release/fixed-dtoa.os \ - obj/release/hashmap.os \ obj/release/preparse-data.os \ obj/release/preparser-api.os \ obj/release/preparser.os \ @@ -121,13 +110,13 @@ g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8 export RELEASE_BUILD_OBJS=`echo obj/release/*.os | sed 's|obj/release/preparser-api.os||g'` %ifarch %{arm} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/arm/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/arm/*.os $ICU_LINK_FLAGS %endif %ifarch %{ix86} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS %endif %ifarch x86_64 -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/x64/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/x64/*.os $ICU_LINK_FLAGS %endif # We need to do this so d8 can link against it. @@ -173,12 +162,10 @@ popd chmod -x %{buildroot}%{_includedir}/v8*.h -mkdir -p %{buildroot}%{_includedir}/v8/extensions/experimental/ +mkdir -p %{buildroot}%{_includedir}/v8/extensions/ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ -install -p src/extensions/experimental/*.h %{buildroot}%{_includedir}/v8/extensions/experimental/ chmod -x %{buildroot}%{_includedir}/v8/extensions/*.h -chmod -x %{buildroot}%{_includedir}/v8/extensions/experimental/*.h # install Python JS minifier scripts for nodejs install -d %{buildroot}%{python_sitelib} @@ -188,7 +175,6 @@ install -p -m0744 tools/jsmin.py %{buildroot}%{python_sitelib}/ install -p -m0744 tools/js2c.py %{buildroot}%{python_sitelib}/ chmod -R -x %{buildroot}%{python_sitelib}/*.py* - %clean rm -rf %{buildroot} @@ -210,6 +196,12 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Jul 6 2012 Tom Callaway 1:3.10.8-1 +- update to 3.10.8 (chromium 20) + +* Tue Jun 12 2012 Tom Callaway 1:3.9.24-1 +- update to 3.9.24 (chromium 19) + * Mon Apr 23 2012 Thomas Spura 1:3.7.12.6 - rebuild for icu-49 From 29b5832c3d525d04b17dded854c16256419114bf Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 9 Jul 2012 21:37:14 -0400 Subject: [PATCH 008/100] 3.10.8 --- sources | 2 +- v8.spec | 164 +++++++++++++++++++++++++++++++++----------------------- 2 files changed, 99 insertions(+), 67 deletions(-) diff --git a/sources b/sources index ef53154..746efba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bf7d1bd637b9fd28796cdc7c95ce04b5 v8-3.3.10.tar.bz2 +7320523ca2eaafa55d657d8230a6d970 v8-3.10.8.tar.bz2 diff --git a/v8.spec b/v8.spec index 3c2ef0f..06d83a0 100644 --- a/v8.spec +++ b/v8.spec @@ -1,42 +1,39 @@ # Hi Googlers! If you're looking in here for patches, nifty. -# You (and everyone else) are welcome to use any of my Chromium patches under the terms of the GPLv2 or later. -# You (and everyone else) are welcome to use any of my V8-specific patches under the terms of the BSD license. -# You (and everyone else) may NOT use my patches under any other terms. -# I hate to be a party-pooper here, but I really don't want to help Google make a proprietary browser. -# There are enough of those already. -# All copyrightable work in these spec files and patches is Copyright 2010 Tom Callaway +# You (and everyone else) are welcome to use any of my Chromium spec files and +# patches under the terms of the GPLv2 or later. +# You (and everyone else) are welcome to use any of my V8-specific spec files +# and patches under the terms of the BSD license. +# You (and everyone else) may NOT use my spec files or patches under any other +# terms. +# I hate to be a party-pooper here, but I really don't want to help Google +# make a proprietary browser. There are enough of those already. +# All copyrightable work in these spec files and patches is Copyright 2011 +# Tom Callaway # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions %global somajor 3 -%global sominor 3 -%global sobuild 10 +%global sominor 10 +%global sobuild 8 %global sover %{somajor}.%{sominor}.%{sobuild} -%{!?python_sitelib: %global python_sitelib %(%{__python} \ - -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -Name: v8 -Version: %{somajor}.%{sominor}.%{sobuild} -Release: 4%{?dist} -Summary: JavaScript Engine -Group: System Environment/Libraries -License: BSD -URL: http://code.google.com/p/v8 +# %%global svnver 20110721svn8716 + +Name: v8 +Version: %{somajor}.%{sominor}.%{sobuild} +Release: 1%{?dist} +Epoch: 1 +Summary: JavaScript Engine +Group: System Environment/Libraries +License: BSD +URL: http://code.google.com/p/v8 # No tarballs, pulled from svn # Checkout script is Source1 -Source0: v8-%{version}.tar.bz2 -Source1: v8-daily-tarball.sh -# Enable experimental i18n extension that chromium needs -Patch0: v8-3.3.10-enable-experimental.patch -# Disable comparison check that gcc 4.5 thinks is always false -Patch1: v8-3.2.10-always-false.patch -# Fix language-matcher.cc compile -Patch2: v8-3.3.10-language-matcher-fix.patch -# Remove unnecessary shebangs -Patch3: v8-2.5.9-shebangs.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExclusiveArch: %{ix86} x86_64 arm -BuildRequires: scons, readline-devel, libicu-devel +Source0: v8-%{version}.tar.bz2 +Source1: v8-daily-tarball.sh +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +ExclusiveArch: %{ix86} x86_64 %{arm} +BuildRequires: scons, readline-devel, libicu-devel %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -44,22 +41,18 @@ in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 3rd edition. %package devel -Group: Development/Libraries -Summary: Development headers and libraries for v8 -Requires: %{name} = %{version}-%{release} +Group: Development/Libraries +Summary: Development headers and libraries for v8 +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel Development headers and libraries for v8. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -b .experimental -%patch1 -p1 -b .always-false -%patch2 -p1 -b .fix -%patch3 -p1 -b .shebang # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code -PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` +PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct # clear spurious executable bits @@ -69,17 +62,23 @@ find . \( -name \*.cc -o -name \*.h -o -name \*.py \) -a -executable \ chmod -x $FILE done - %build +mkdir -p obj/release/ export GCC_VERSION="44" scons library=shared snapshots=on \ %ifarch x86_64 arch=x64 \ %endif +%ifarch armv7hl armv7hnl +armeabi=hard \ +%endif +%ifarch armv5tel armv6l armv7l +armeabi=soft \ +%endif visibility=default \ env=CCFLAGS:"-fPIC" -%if 0%{?fedora} > 15 +%if 0%{?fedora} >= 16 export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu-i18n` %else export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu` @@ -90,26 +89,34 @@ export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu` rm -rf libv8.so libv8preparser.so # Now, lets make it right. g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8preparser.so.%{somajor} \ - obj/release/allocation.os \ - obj/release/hashmap.os \ - obj/release/preparse-data.os \ - obj/release/preparser-api.os \ - obj/release/preparser.os \ - obj/release/scanner-base.os \ - obj/release/token.os \ - obj/release/unicode.os + obj/release/allocation.os \ + obj/release/bignum.os \ + obj/release/bignum-dtoa.os \ + obj/release/cached-powers.os \ + obj/release/diy-fp.os \ + obj/release/dtoa.os \ + obj/release/fast-dtoa.os \ + obj/release/fixed-dtoa.os \ + obj/release/preparse-data.os \ + obj/release/preparser-api.os \ + obj/release/preparser.os \ + obj/release/scanner.os \ + obj/release/strtod.os \ + obj/release/token.os \ + obj/release/unicode.os \ + obj/release/utils.os # "obj/release/preparser-api.os" should not be included in the libv8.so file. export RELEASE_BUILD_OBJS=`echo obj/release/*.os | sed 's|obj/release/preparser-api.os||g'` -%ifarch arm -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/arm/*.os $ICU_LINK_FLAGS +%ifarch %{arm} +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/arm/*.os $ICU_LINK_FLAGS %endif %ifarch %{ix86} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS %endif %ifarch x86_64 -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/extensions/experimental/*.os obj/release/x64/*.os $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/x64/*.os $ICU_LINK_FLAGS %endif # We need to do this so d8 can link against it. @@ -121,12 +128,18 @@ scons d8 \ %ifarch x86_64 arch=x64 \ %endif +%ifarch armv7hl armv7hnl +armeabi=hard \ +%endif +%ifarch armv5tel armv6l armv7l +armeabi=soft \ +%endif library=shared snapshots=on console=readline visibility=default || : # Sigh. I f*****g hate scons. rm -rf d8 -g++ $RPM_OPT_FLAGS -o d8 obj/release/d8-debug.os obj/release/d8-posix.os obj/release/d8-readline.os obj/release/d8.os obj/release/d8-js.os -lpthread -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS +g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS %install rm -rf %{buildroot} @@ -149,16 +162,17 @@ popd chmod -x %{buildroot}%{_includedir}/v8*.h -mkdir -p %{buildroot}%{_includedir}/v8/extensions/experimental/ +mkdir -p %{buildroot}%{_includedir}/v8/extensions/ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ -install -p src/extensions/experimental/*.h %{buildroot}%{_includedir}/v8/extensions/experimental/ chmod -x %{buildroot}%{_includedir}/v8/extensions/*.h -chmod -x %{buildroot}%{_includedir}/v8/extensions/experimental/*.h # install Python JS minifier scripts for nodejs install -d %{buildroot}%{python_sitelib} +sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/jsmin.py +sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/js2c.py install -p -m0744 tools/jsmin.py %{buildroot}%{python_sitelib}/ +install -p -m0744 tools/js2c.py %{buildroot}%{python_sitelib}/ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %clean @@ -182,20 +196,38 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog -* Sat Aug 27 2011 Matěj Cepl - 3.3.10-4 -- Make jsmin.py working. +* Fri Jul 6 2012 Tom Callaway 1:3.10.8-1 +- update to 3.10.8 (chromium 20) -* Wed Aug 24 2011 Matěj Cepl - 3.3.10-3 -- A bit of cleanup, include also /usr/bin/j2sc when we have it. -- I don't see the reason why Python files shouldn't be in the - standard Python directories. +* Tue Jun 12 2012 Tom Callaway 1:3.9.24-1 +- update to 3.9.24 (chromium 19) -* Wed Aug 23 2011 T.C. Hollingsworth 1:3.7.12.6 +- rebuild for icu-49 + +* Fri Mar 30 2012 Dennis Gilmore 1:3.7.12-5 +- make sure the right arm abi is used in the second call of scons + +* Thu Mar 29 2012 Dennis Gilmore 1:3.7.12-4 +- use correct arm macros +- use the correct abis for hard and soft float + +* Tue Mar 20 2012 Tom Callaway 3.7.12-3 +- merge changes from Fedora spec file, sync, add epoch + +* Fri Feb 17 2012 Tom Callaway 3.7.12-2 +- add -Wno-error=strict-overflow for gcc 4.7 (hack, hack, hack) + +* Mon Feb 13 2012 Tom Callaway 3.7.12-1 +- update to 3.7.12 + +* Thu Nov 3 2011 Tom Callaway 3.5.10-1 +- update to 3.5.10 + +* Mon Sep 26 2011 Tom Callaway 3.4.14-2 +- final 3.4.14 tag - include JavaScript minifier scripts in -devel -* Wed Aug 10 2011 Tom Callaway 3.3.10-1 -- tag 3.3.10 - * Fri Jun 10 2011 Tom Callaway 3.2.10-1 - tag 3.2.10 From b85299e30183b305e43dca499b893230b406ab30 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 21:21:08 -0500 Subject: [PATCH 009/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 06d83a0..13c36a3 100644 --- a/v8.spec +++ b/v8.spec @@ -21,7 +21,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -196,6 +196,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 1:3.10.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jul 6 2012 Tom Callaway 1:3.10.8-1 - update to 3.10.8 (chromium 20) From 22544c5ce2cbfb762decb6627df963c74274b162 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 10 Dec 2012 15:19:24 -0500 Subject: [PATCH 010/100] 3.13.7.5 --- sources | 2 +- v8.spec | 30 ++++++++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/sources b/sources index 746efba..5c74ba3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7320523ca2eaafa55d657d8230a6d970 v8-3.10.8.tar.bz2 +9355d2a122f127471bdec26c4634c890 v8-3.13.7.5.tar.bz2 diff --git a/v8.spec b/v8.spec index 06d83a0..40e327d 100644 --- a/v8.spec +++ b/v8.spec @@ -12,25 +12,24 @@ # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions +# Hey, now there are four digits. What do they mean? Popsicle. %global somajor 3 -%global sominor 10 -%global sobuild 8 +%global sominor 13 +%global sobuild 7 +%global sotiny 5 %global sover %{somajor}.%{sominor}.%{sobuild} # %%global svnver 20110721svn8716 Name: v8 -Version: %{somajor}.%{sominor}.%{sobuild} +Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries License: BSD URL: http://code.google.com/p/v8 -# No tarballs, pulled from svn -# Checkout script is Source1 -Source0: v8-%{version}.tar.bz2 -Source1: v8-daily-tarball.sh +Source0: http://commondatastorage.googleapis.com/chromium-browser-official/v8-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: %{ix86} x86_64 %{arm} BuildRequires: scons, readline-devel, libicu-devel @@ -124,6 +123,7 @@ ln -sf libv8.so.%{sover} libv8.so ln -sf libv8preparser.so.%{sover} libv8preparser.so # This will fail to link d8 because it doesn't use the icu libs. +# Don't build d8 shared. Stupid Google. Hate. scons d8 \ %ifarch x86_64 arch=x64 \ @@ -134,12 +134,14 @@ armeabi=hard \ %ifarch armv5tel armv6l armv7l armeabi=soft \ %endif -library=shared snapshots=on console=readline visibility=default || : +snapshots=on console=readline visibility=default || : +# library=shared snapshots=on console=readline visibility=default || : # Sigh. I f*****g hate scons. -rm -rf d8 +# But gyp is worse. +# rm -rf d8 -g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS +# g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS %install rm -rf %{buildroot} @@ -196,6 +198,14 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Tue Dec 4 2012 Tom Callaway - 1:3.13.7.5-1 +- update to 3.13.7.5 (needed for chromium 23) +- Resolves multiple security issues (CVE-2012-5120, CVE-2012-5128) +- d8 is now using a static libv8, resolves bz 881973) + +* Sun Jul 22 2012 Fedora Release Engineering - 1:3.10.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jul 6 2012 Tom Callaway 1:3.10.8-1 - update to 3.10.8 (chromium 20) From f5e200a4f883f2a623e253ee094ac70883d04066 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 10 Dec 2012 15:20:38 -0500 Subject: [PATCH 011/100] 3.13.7.5 --- .gitignore | 1 + sources | 2 +- v8.spec | 29 ++++++++++++++++++----------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 7f02a53..0e16d0e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /v8-3.8.9-20120127svn10526.tar.bz2 /v8-3.7.12.tar.bz2 /v8-3.10.8.tar.bz2 +/v8-3.13.7.5.tar.bz2 diff --git a/sources b/sources index 746efba..5c74ba3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7320523ca2eaafa55d657d8230a6d970 v8-3.10.8.tar.bz2 +9355d2a122f127471bdec26c4634c890 v8-3.13.7.5.tar.bz2 diff --git a/v8.spec b/v8.spec index 13c36a3..40e327d 100644 --- a/v8.spec +++ b/v8.spec @@ -12,25 +12,24 @@ # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions +# Hey, now there are four digits. What do they mean? Popsicle. %global somajor 3 -%global sominor 10 -%global sobuild 8 +%global sominor 13 +%global sobuild 7 +%global sotiny 5 %global sover %{somajor}.%{sominor}.%{sobuild} # %%global svnver 20110721svn8716 Name: v8 -Version: %{somajor}.%{sominor}.%{sobuild} -Release: 2%{?dist} +Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries License: BSD URL: http://code.google.com/p/v8 -# No tarballs, pulled from svn -# Checkout script is Source1 -Source0: v8-%{version}.tar.bz2 -Source1: v8-daily-tarball.sh +Source0: http://commondatastorage.googleapis.com/chromium-browser-official/v8-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: %{ix86} x86_64 %{arm} BuildRequires: scons, readline-devel, libicu-devel @@ -124,6 +123,7 @@ ln -sf libv8.so.%{sover} libv8.so ln -sf libv8preparser.so.%{sover} libv8preparser.so # This will fail to link d8 because it doesn't use the icu libs. +# Don't build d8 shared. Stupid Google. Hate. scons d8 \ %ifarch x86_64 arch=x64 \ @@ -134,12 +134,14 @@ armeabi=hard \ %ifarch armv5tel armv6l armv7l armeabi=soft \ %endif -library=shared snapshots=on console=readline visibility=default || : +snapshots=on console=readline visibility=default || : +# library=shared snapshots=on console=readline visibility=default || : # Sigh. I f*****g hate scons. -rm -rf d8 +# But gyp is worse. +# rm -rf d8 -g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS +# g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS %install rm -rf %{buildroot} @@ -196,6 +198,11 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Tue Dec 4 2012 Tom Callaway - 1:3.13.7.5-1 +- update to 3.13.7.5 (needed for chromium 23) +- Resolves multiple security issues (CVE-2012-5120, CVE-2012-5128) +- d8 is now using a static libv8, resolves bz 881973) + * Sun Jul 22 2012 Fedora Release Engineering - 1:3.10.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From ea068532546358ffa7fdfbf2280d1c527dea9eed Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Sat, 26 Jan 2013 13:39:21 -0700 Subject: [PATCH 012/100] rebuild for icu-50 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 40e327d..e16be9f 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -198,6 +198,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Sat Jan 26 2013 T.C. Hollingsworth - 1:3.13.7.5-2 +- rebuild for icu-50 + * Tue Dec 4 2012 Tom Callaway - 1:3.13.7.5-1 - update to 3.13.7.5 (needed for chromium 23) - Resolves multiple security issues (CVE-2012-5120, CVE-2012-5128) From 1836bd1db4f7b779df32bb6f2b41c1e509135ec6 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Sat, 26 Jan 2013 13:57:30 -0700 Subject: [PATCH 013/100] ignore new GCC 4.8 warning --- v8.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index e16be9f..4789ce4 100644 --- a/v8.spec +++ b/v8.spec @@ -51,7 +51,7 @@ Development headers and libraries for v8. %setup -q -n %{name}-%{version} # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code -PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` +PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct # clear spurious executable bits @@ -200,6 +200,7 @@ rm -rf %{buildroot} %changelog * Sat Jan 26 2013 T.C. Hollingsworth - 1:3.13.7.5-2 - rebuild for icu-50 +- ignore new GCC 4.8 warning * Tue Dec 4 2012 Tom Callaway - 1:3.13.7.5-1 - update to 3.13.7.5 (needed for chromium 23) From c89353be6a59ed6f71bec95194d9978cd11f3f62 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 11 Mar 2013 16:01:31 -0400 Subject: [PATCH 014/100] Update to v8 3.14.5.7 for Node.js 0.10.0 --- .gitignore | 1 + sources | 2 +- v8.spec | 20 +++++++++++++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0e16d0e..9430e9b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /v8-3.7.12.tar.bz2 /v8-3.10.8.tar.bz2 /v8-3.13.7.5.tar.bz2 +/v8-3.14.5.7.tar.bz2 diff --git a/sources b/sources index 5c74ba3..5573fa3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9355d2a122f127471bdec26c4634c890 v8-3.13.7.5.tar.bz2 +0e4805a87832ac58b53accc23e1ff8d0 v8-3.14.5.7.tar.bz2 diff --git a/v8.spec b/v8.spec index 4789ce4..68b7f2c 100644 --- a/v8.spec +++ b/v8.spec @@ -14,16 +14,16 @@ # For 1.3+, we use the three digit versions # Hey, now there are four digits. What do they mean? Popsicle. %global somajor 3 -%global sominor 13 -%global sobuild 7 -%global sotiny 5 +%global sominor 14 +%global sobuild 5 +%global sotiny 7 %global sover %{somajor}.%{sominor}.%{sobuild} # %%global svnver 20110721svn8716 Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -64,6 +64,9 @@ find . \( -name \*.cc -o -name \*.h -o -name \*.py \) -a -executable \ %build mkdir -p obj/release/ export GCC_VERSION="44" + +# SCons is going away, but for now build with +# I_know_I_should_build_with_GYP=yes scons library=shared snapshots=on \ %ifarch x86_64 arch=x64 \ @@ -75,7 +78,8 @@ armeabi=hard \ armeabi=soft \ %endif visibility=default \ -env=CCFLAGS:"-fPIC" +env=CCFLAGS:"-fPIC" \ +I_know_I_should_build_with_GYP=yes %if 0%{?fedora} >= 16 export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu-i18n` @@ -124,7 +128,10 @@ ln -sf libv8preparser.so.%{sover} libv8preparser.so # This will fail to link d8 because it doesn't use the icu libs. # Don't build d8 shared. Stupid Google. Hate. +# SCons is going away, but for now build with +# I_know_I_should_build_with_GYP=yes scons d8 \ +I_know_I_should_build_with_GYP=yes \ %ifarch x86_64 arch=x64 \ %endif @@ -198,6 +205,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Mar 11 2013 Stephen Gallagher - 1:3.14.5.7-3 +- Update to v8 3.14.5.7 for Node.js 0.10.0 + * Sat Jan 26 2013 T.C. Hollingsworth - 1:3.13.7.5-2 - rebuild for icu-50 - ignore new GCC 4.8 warning From 6f495ce76dacd737f328f0dfb3434e26f856cb7e Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Thu, 21 Mar 2013 17:45:18 -0700 Subject: [PATCH 015/100] new upstream release 3.14.5.8 --- .gitignore | 1 + sources | 1 + v8.spec | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9430e9b..772f3f5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /v8-3.10.8.tar.bz2 /v8-3.13.7.5.tar.bz2 /v8-3.14.5.7.tar.bz2 +/v8-3.14.5.8.tar.bz2 diff --git a/sources b/sources index 5573fa3..9d13f3b 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 0e4805a87832ac58b53accc23e1ff8d0 v8-3.14.5.7.tar.bz2 +2aafad43bcb64cb68e3224bc16628ff7 v8-3.14.5.8.tar.bz2 diff --git a/v8.spec b/v8.spec index 68b7f2c..dd5d1d0 100644 --- a/v8.spec +++ b/v8.spec @@ -16,14 +16,14 @@ %global somajor 3 %global sominor 14 %global sobuild 5 -%global sotiny 7 +%global sotiny 8 %global sover %{somajor}.%{sominor}.%{sobuild} # %%global svnver 20110721svn8716 Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 3%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -205,6 +205,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Mar 22 2013 T.C. Hollingsworth - 1:3.14.5.8-1 +- new upstream release 3.14.5.8 + * Mon Mar 11 2013 Stephen Gallagher - 1:3.14.5.7-3 - Update to v8 3.14.5.7 for Node.js 0.10.0 From 5e2ffd5246ebafc3265519c9e3ecd68889de6aa5 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Thu, 21 Mar 2013 17:53:58 -0700 Subject: [PATCH 016/100] backport security fix for remote DoS via crafted javascript (RHBZ#924495; CVE-2013-2632) --- v8-3.14.5.8-CVE-2013-2634.patch | 134 ++++++++++++++++++++++++++++++++ v8.spec | 5 ++ 2 files changed, 139 insertions(+) create mode 100644 v8-3.14.5.8-CVE-2013-2634.patch diff --git a/v8-3.14.5.8-CVE-2013-2634.patch b/v8-3.14.5.8-CVE-2013-2634.patch new file mode 100644 index 0000000..6fdafce --- /dev/null +++ b/v8-3.14.5.8-CVE-2013-2634.patch @@ -0,0 +1,134 @@ +From 5b1d2144ebd47ea768ca5b3cfcda830433c88efe Mon Sep 17 00:00:00 2001 +From: "T.C. Hollingsworth" +Date: Thu, 21 Mar 2013 17:34:19 -0700 +Subject: [PATCH] backport fix for CVE-2013-2632 from SVN r13964 + +--- + src/objects-inl.h | 3 ++- + src/objects.h | 7 +++++-- + src/parser.cc | 4 ++-- + src/parser.h | 5 ----- + src/stub-cache.cc | 8 ++++---- + 5 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/src/objects-inl.h b/src/objects-inl.h +index ea5a93f..4834fa6 100644 +--- a/src/objects-inl.h ++++ b/src/objects-inl.h +@@ -3500,8 +3500,9 @@ Code::Flags Code::ComputeFlags(Kind kind, + kind == CALL_IC || + kind == STORE_IC || + kind == KEYED_STORE_IC); ++ ASSERT(argc <= Code::kMaxArguments); + // Compute the bit mask. +- int bits = KindField::encode(kind) ++ unsigned int bits = KindField::encode(kind) + | ICStateField::encode(ic_state) + | TypeField::encode(type) + | ExtraICStateField::encode(extra_ic_state) +diff --git a/src/objects.h b/src/objects.h +index 755dd42..47d7757 100644 +--- a/src/objects.h ++++ b/src/objects.h +@@ -4180,8 +4180,8 @@ class Code: public HeapObject { + // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that + // enumeration type has correct value range (see Issue 830 for more details). + enum Flags { +- FLAGS_MIN_VALUE = kMinInt, +- FLAGS_MAX_VALUE = kMaxInt ++ FLAGS_MIN_VALUE = 0, ++ FLAGS_MAX_VALUE = kMaxUInt32 + }; + + #define CODE_KIND_LIST(V) \ +@@ -4644,6 +4644,9 @@ class Code: public HeapObject { + // Signed field cannot be encoded using the BitField class. + static const int kArgumentsCountShift = 14; + static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); ++ static const int kArgumentsBits = ++ PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1; ++ static const int kMaxArguments = (1 << kArgumentsBits) - 1; + + // This constant should be encodable in an ARM instruction. + static const int kFlagsNotUsedInLookup = +diff --git a/src/parser.cc b/src/parser.cc +index 03e4b03..6da414a 100644 +--- a/src/parser.cc ++++ b/src/parser.cc +@@ -4243,7 +4243,7 @@ ZoneList* Parser::ParseArguments(bool* ok) { + while (!done) { + Expression* argument = ParseAssignmentExpression(true, CHECK_OK); + result->Add(argument, zone()); +- if (result->length() > kMaxNumFunctionParameters) { ++ if (result->length() > Code::kMaxArguments) { + ReportMessageAt(scanner().location(), "too_many_arguments", + Vector::empty()); + *ok = false; +@@ -4420,7 +4420,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle function_name, + + top_scope_->DeclareParameter(param_name, VAR); + num_parameters++; +- if (num_parameters > kMaxNumFunctionParameters) { ++ if (num_parameters > Code::kMaxArguments) { + ReportMessageAt(scanner().location(), "too_many_parameters", + Vector::empty()); + *ok = false; +diff --git a/src/parser.h b/src/parser.h +index 93fd1b8..e36a9b3 100644 +--- a/src/parser.h ++++ b/src/parser.h +@@ -449,11 +449,6 @@ class Parser { + Vector > args); + + private: +- // Limit on number of function parameters is chosen arbitrarily. +- // Code::Flags uses only the low 17 bits of num-parameters to +- // construct a hashable id, so if more than 2^17 are allowed, this +- // should be checked. +- static const int kMaxNumFunctionParameters = 32766; + static const int kMaxNumFunctionLocals = 131071; // 2^17-1 + + enum Mode { +diff --git a/src/stub-cache.cc b/src/stub-cache.cc +index 4119147..8490c7e 100644 +--- a/src/stub-cache.cc ++++ b/src/stub-cache.cc +@@ -617,7 +617,7 @@ Handle StubCache::ComputeCallConstant(int argc, + Handle code = + compiler.CompileCallConstant(object, holder, function, name, check); + code->set_check_type(check); +- ASSERT_EQ(flags, code->flags()); ++ ASSERT(flags == code->flags()); + PROFILE(isolate_, + CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); + GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); +@@ -655,7 +655,7 @@ Handle StubCache::ComputeCallField(int argc, + Handle code = + compiler.CompileCallField(Handle::cast(object), + holder, index, name); +- ASSERT_EQ(flags, code->flags()); ++ ASSERT(flags == code->flags()); + PROFILE(isolate_, + CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); + GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); +@@ -692,7 +692,7 @@ Handle StubCache::ComputeCallInterceptor(int argc, + Handle code = + compiler.CompileCallInterceptor(Handle::cast(object), + holder, name); +- ASSERT_EQ(flags, code->flags()); ++ ASSERT(flags == code->flags()); + PROFILE(isolate(), + CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); + GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); +@@ -721,7 +721,7 @@ Handle StubCache::ComputeCallGlobal(int argc, + CallStubCompiler compiler(isolate(), argc, kind, extra_state, cache_holder); + Handle code = + compiler.CompileCallGlobal(receiver, holder, cell, function, name); +- ASSERT_EQ(flags, code->flags()); ++ ASSERT(flags == code->flags()); + PROFILE(isolate(), + CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); + GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); +-- +1.8.1.4 + diff --git a/v8.spec b/v8.spec index dd5d1d0..94c8558 100644 --- a/v8.spec +++ b/v8.spec @@ -34,6 +34,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: %{ix86} x86_64 %{arm} BuildRequires: scons, readline-devel, libicu-devel +#backport fix for CVE-2013-2634 (RHBZ#924495) +Patch1: v8-3.14.5.8-CVE-2013-2634.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -49,6 +52,7 @@ Development headers and libraries for v8. %prep %setup -q -n %{name}-%{version} +%patch1 -p1 # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` @@ -207,6 +211,7 @@ rm -rf %{buildroot} %changelog * Fri Mar 22 2013 T.C. Hollingsworth - 1:3.14.5.8-1 - new upstream release 3.14.5.8 +- backport security fix for remote DoS via crafted javascript (RHBZ#924495; CVE-2013-2632) * Mon Mar 11 2013 Stephen Gallagher - 1:3.14.5.7-3 - Update to v8 3.14.5.7 for Node.js 0.10.0 From f0909e73965d376ff94056f7b4839a3ee5e53478 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Mon, 6 May 2013 16:41:23 +0200 Subject: [PATCH 017/100] Fix ownership of include directory (#958729) --- v8.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 94c8558..7d8b9f1 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -204,11 +204,15 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root,-) %{_includedir}/*.h +%dir %{_includedir}/v8/ %{_includedir}/v8/extensions/ %{_libdir}/*.so %{python_sitelib}/j*.py* %changelog +* Mon May 06 2013 Stanislav Ochotnicky - 1:3.14.5.8-2 +- Fix ownership of include directory (#958729) + * Fri Mar 22 2013 T.C. Hollingsworth - 1:3.14.5.8-1 - new upstream release 3.14.5.8 - backport security fix for remote DoS via crafted javascript (RHBZ#924495; CVE-2013-2632) From ee9255d44115a1f9148ef9c0d913e8544c4adb0a Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Tue, 28 May 2013 22:07:52 -0700 Subject: [PATCH 018/100] new upstream release 3.14.5.10 --- .gitignore | 1 + sources | 3 +-- v8.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 772f3f5..6acdc49 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /v8-3.13.7.5.tar.bz2 /v8-3.14.5.7.tar.bz2 /v8-3.14.5.8.tar.bz2 +/v8-3.14.5.10.tar.bz2 diff --git a/sources b/sources index 9d13f3b..0ed3ff1 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -0e4805a87832ac58b53accc23e1ff8d0 v8-3.14.5.7.tar.bz2 -2aafad43bcb64cb68e3224bc16628ff7 v8-3.14.5.8.tar.bz2 +d4e3a038ad387fd7b75d40a89e231ef7 v8-3.14.5.10.tar.bz2 diff --git a/v8.spec b/v8.spec index 7d8b9f1..dd4b038 100644 --- a/v8.spec +++ b/v8.spec @@ -16,14 +16,14 @@ %global somajor 3 %global sominor 14 %global sobuild 5 -%global sotiny 8 +%global sotiny 10 %global sover %{somajor}.%{sominor}.%{sobuild} # %%global svnver 20110721svn8716 Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 2%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -210,6 +210,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Wed May 29 2013 T.C. Hollingsworth - 1:3.14.5.10-1 +- new upstream release 3.14.5.10 + * Mon May 06 2013 Stanislav Ochotnicky - 1:3.14.5.8-2 - Fix ownership of include directory (#958729) From eccaf3ba101105547a03d51234791830b7727d1c Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Fri, 2 Aug 2013 13:04:50 -0700 Subject: [PATCH 019/100] backport fix for remote DoS or unspecified other impact via type confusion (RHBZ#991116; CVE-2013-2882) --- v8-3.14.5.10-CVE-2013-2882.patch | 55 ++++++++++++++++++++++++++++++++ v8.spec | 10 +++++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-CVE-2013-2882.patch diff --git a/v8-3.14.5.10-CVE-2013-2882.patch b/v8-3.14.5.10-CVE-2013-2882.patch new file mode 100644 index 0000000..b14dbb5 --- /dev/null +++ b/v8-3.14.5.10-CVE-2013-2882.patch @@ -0,0 +1,55 @@ +From 18e43f925d5d502b7531f40e4a1becba56089303 Mon Sep 17 00:00:00 2001 +From: "mstarzinger@chromium.org" +Date: Mon, 15 Jul 2013 11:41:41 +0000 +Subject: [PATCH] Use internal array as API function cache. + +R=yangguo@chromium.org +BUG=chromium:260106 +TEST=cctest/test-api/Regress260106 + +Review URL: https://codereview.chromium.org/19159003 + +git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 +--- + src/apinatives.js | 2 +- + test/cctest/test-api.cc | 11 +++++++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/apinatives.js b/src/apinatives.js +index 79b41dd..adefab6 100644 +--- a/src/apinatives.js ++++ b/src/apinatives.js +@@ -37,7 +37,7 @@ function CreateDate(time) { + } + + +-var kApiFunctionCache = {}; ++var kApiFunctionCache = new InternalArray(); + var functionCache = kApiFunctionCache; + + +diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc +index 728a8f7..bcd28bd 100644 +--- a/test/cctest/test-api.cc ++++ b/test/cctest/test-api.cc +@@ -17707,6 +17707,17 @@ THREADED_TEST(Regress157124) { + } + + ++THREADED_TEST(Regress260106) { ++ LocalContext context; ++ v8::HandleScope scope(context->GetIsolate()); ++ Local templ = FunctionTemplate::New(DummyCallHandler); ++ CompileRun("for (var i = 0; i < 128; i++) Object.prototype[i] = 0;"); ++ Local function = templ->GetFunction(); ++ CHECK(!function.IsEmpty()); ++ CHECK(function->IsFunction()); ++} ++ ++ + #ifndef WIN32 + class ThreadInterruptTest { + public: +-- +1.8.3.1 + diff --git a/v8.spec b/v8.spec index dd4b038..4b66451 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -37,6 +37,9 @@ BuildRequires: scons, readline-devel, libicu-devel #backport fix for CVE-2013-2634 (RHBZ#924495) Patch1: v8-3.14.5.8-CVE-2013-2634.patch +#backport fix for CVE-2013-2882 (RHBZ#991116) +Patch2: v8-3.14.5.10-CVE-2013-2882.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -53,6 +56,7 @@ Development headers and libraries for v8. %prep %setup -q -n %{name}-%{version} %patch1 -p1 +%patch2 -p1 # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` @@ -210,6 +214,10 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Aug 02 2013 T.C. Hollingsworth - 1:3.14.5.10-2 +- backport fix for remote DoS or unspecified other impact via type confusion + (RHBZ#991116; CVE-2013-2882) + * Wed May 29 2013 T.C. Hollingsworth - 1:3.14.5.10-1 - new upstream release 3.14.5.10 From 0177f64edda76802516c0bd6dba356a216191207 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Fri, 2 Aug 2013 13:04:50 -0700 Subject: [PATCH 020/100] backport fix for out-of-bounds read DoS (RHBZ#1039889; CVE-2013-6640) --- v8.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 4b66451..9a304d2 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -40,6 +40,9 @@ Patch1: v8-3.14.5.8-CVE-2013-2634.patch #backport fix for CVE-2013-2882 (RHBZ#991116) Patch2: v8-3.14.5.10-CVE-2013-2882.patch +#backport fix for CVE-2013-6640 (RHBZ#1039889) +Patch3: v8-3.14.5.10-CVE-2013-6640.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -57,6 +60,7 @@ Development headers and libraries for v8. %setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` @@ -214,6 +218,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Dec 13 2013 T.C. Hollingsworth - 1:3.14.5.10-3 +- backport fix for out-of-bounds read DoS (RHBZ#1039889; CVE-2013-6640) + * Fri Aug 02 2013 T.C. Hollingsworth - 1:3.14.5.10-2 - backport fix for remote DoS or unspecified other impact via type confusion (RHBZ#991116; CVE-2013-2882) From e24c8b7efe72b92264cd2e6cd04c10f229e1676b Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Fri, 13 Dec 2013 11:53:24 -0700 Subject: [PATCH 021/100] actually commit the patch --- v8-3.14.5.10-CVE-2013-6640.patch | 316 +++++++++++++++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100644 v8-3.14.5.10-CVE-2013-6640.patch diff --git a/v8-3.14.5.10-CVE-2013-6640.patch b/v8-3.14.5.10-CVE-2013-6640.patch new file mode 100644 index 0000000..1a2a420 --- /dev/null +++ b/v8-3.14.5.10-CVE-2013-6640.patch @@ -0,0 +1,316 @@ +From 520f94a1da96b0f1fd3d0e0c0b82e4d7c1e7d58f Mon Sep 17 00:00:00 2001 +From: "T.C. Hollingsworth" +Date: Fri, 13 Dec 2013 00:45:27 -0700 +Subject: [PATCH] Limit size of dehoistable array indices + +backported from upstream r17801 +--- + src/elements-kind.cc | 30 ++++++++++++++++ + src/elements-kind.h | 2 ++ + src/hydrogen-instructions.h | 9 +++++ + src/hydrogen.cc | 2 +- + src/lithium.cc | 30 ---------------- + src/lithium.h | 3 -- + test/mjsunit/regress/regress-crbug-319835.js | 51 ++++++++++++++++++++++++++++ + test/mjsunit/regress/regress-crbug-319860.js | 47 +++++++++++++++++++++++++ + 8 files changed, 140 insertions(+), 34 deletions(-) + create mode 100644 test/mjsunit/regress/regress-crbug-319835.js + create mode 100644 test/mjsunit/regress/regress-crbug-319860.js + +diff --git a/src/elements-kind.cc b/src/elements-kind.cc +index 655a23b..c93a602 100644 +--- a/src/elements-kind.cc ++++ b/src/elements-kind.cc +@@ -35,6 +35,36 @@ namespace v8 { + namespace internal { + + ++int ElementsKindToShiftSize(ElementsKind elements_kind) { ++ switch (elements_kind) { ++ case EXTERNAL_BYTE_ELEMENTS: ++ case EXTERNAL_PIXEL_ELEMENTS: ++ case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: ++ return 0; ++ case EXTERNAL_SHORT_ELEMENTS: ++ case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: ++ return 1; ++ case EXTERNAL_INT_ELEMENTS: ++ case EXTERNAL_UNSIGNED_INT_ELEMENTS: ++ case EXTERNAL_FLOAT_ELEMENTS: ++ return 2; ++ case EXTERNAL_DOUBLE_ELEMENTS: ++ case FAST_DOUBLE_ELEMENTS: ++ case FAST_HOLEY_DOUBLE_ELEMENTS: ++ return 3; ++ case FAST_SMI_ELEMENTS: ++ case FAST_ELEMENTS: ++ case FAST_HOLEY_SMI_ELEMENTS: ++ case FAST_HOLEY_ELEMENTS: ++ case DICTIONARY_ELEMENTS: ++ case NON_STRICT_ARGUMENTS_ELEMENTS: ++ return kPointerSizeLog2; ++ } ++ UNREACHABLE(); ++ return 0; ++} ++ ++ + void PrintElementsKind(FILE* out, ElementsKind kind) { + ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); + PrintF(out, "%s", accessor->name()); +diff --git a/src/elements-kind.h b/src/elements-kind.h +index 3be7711..c5d9df8 100644 +--- a/src/elements-kind.h ++++ b/src/elements-kind.h +@@ -77,6 +77,8 @@ const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1; + const int kFastElementsKindCount = LAST_FAST_ELEMENTS_KIND - + FIRST_FAST_ELEMENTS_KIND + 1; + ++int ElementsKindToShiftSize(ElementsKind elements_kind); ++ + void PrintElementsKind(FILE* out, ElementsKind kind); + + ElementsKind GetInitialFastElementsKind(); +diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h +index 015212d..a1e5b97 100644 +--- a/src/hydrogen-instructions.h ++++ b/src/hydrogen-instructions.h +@@ -4240,6 +4240,7 @@ class ArrayInstructionInterface { + virtual HValue* GetKey() = 0; + virtual void SetKey(HValue* key) = 0; + virtual void SetIndexOffset(uint32_t index_offset) = 0; ++ virtual int MaxIndexOffsetBits() = 0; + virtual bool IsDehoisted() = 0; + virtual void SetDehoisted(bool is_dehoisted) = 0; + virtual ~ArrayInstructionInterface() { }; +@@ -4274,6 +4275,7 @@ class HLoadKeyedFastElement + void SetIndexOffset(uint32_t index_offset) { + bit_field_ = IndexOffsetField::update(bit_field_, index_offset); + } ++ int MaxIndexOffsetBits() { return 25; } + HValue* GetKey() { return key(); } + void SetKey(HValue* key) { SetOperandAt(1, key); } + bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } +@@ -4343,6 +4345,7 @@ class HLoadKeyedFastDoubleElement + HValue* dependency() { return OperandAt(2); } + uint32_t index_offset() { return index_offset_; } + void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } ++ int MaxIndexOffsetBits() { return 25; } + HValue* GetKey() { return key(); } + void SetKey(HValue* key) { SetOperandAt(1, key); } + bool IsDehoisted() { return is_dehoisted_; } +@@ -4420,6 +4423,7 @@ class HLoadKeyedSpecializedArrayElement + ElementsKind elements_kind() const { return elements_kind_; } + uint32_t index_offset() { return index_offset_; } + void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } ++ int MaxIndexOffsetBits() { return 25; } + HValue* GetKey() { return key(); } + void SetKey(HValue* key) { SetOperandAt(1, key); } + bool IsDehoisted() { return is_dehoisted_; } +@@ -4595,6 +4599,7 @@ class HStoreKeyedFastElement + } + uint32_t index_offset() { return index_offset_; } + void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } ++ int MaxIndexOffsetBits() { return 25; } + HValue* GetKey() { return key(); } + void SetKey(HValue* key) { SetOperandAt(1, key); } + bool IsDehoisted() { return is_dehoisted_; } +@@ -4648,6 +4653,7 @@ class HStoreKeyedFastDoubleElement + HValue* value() { return OperandAt(2); } + uint32_t index_offset() { return index_offset_; } + void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } ++ int MaxIndexOffsetBits() { return 25; } + HValue* GetKey() { return key(); } + void SetKey(HValue* key) { SetOperandAt(1, key); } + bool IsDehoisted() { return is_dehoisted_; } +@@ -4706,6 +4712,9 @@ class HStoreKeyedSpecializedArrayElement + ElementsKind elements_kind() const { return elements_kind_; } + uint32_t index_offset() { return index_offset_; } + void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } ++ int MaxIndexOffsetBits() { ++ return 31 - ElementsKindToShiftSize(elements_kind_); ++ } + HValue* GetKey() { return key(); } + void SetKey(HValue* key) { SetOperandAt(1, key); } + bool IsDehoisted() { return is_dehoisted_; } +diff --git a/src/hydrogen.cc b/src/hydrogen.cc +index 8393e51..e3f79ee 100644 +--- a/src/hydrogen.cc ++++ b/src/hydrogen.cc +@@ -3737,7 +3737,7 @@ static void DehoistArrayIndex(ArrayInstructionInterface* array_operation) { + int32_t value = constant->Integer32Value() * sign; + // We limit offset values to 30 bits because we want to avoid the risk of + // overflows when the offset is added to the object header size. +- if (value >= 1 << 30 || value < 0) return; ++ if (value >= 1 << array_operation->MaxIndexOffsetBits() || value < 0) return; + array_operation->SetKey(subexpression); + if (index->HasNoUses()) { + index->DeleteAndReplaceWith(NULL); +diff --git a/src/lithium.cc b/src/lithium.cc +index eb2198d..1232bf1 100644 +--- a/src/lithium.cc ++++ b/src/lithium.cc +@@ -227,36 +227,6 @@ void LPointerMap::PrintTo(StringStream* stream) { + } + + +-int ElementsKindToShiftSize(ElementsKind elements_kind) { +- switch (elements_kind) { +- case EXTERNAL_BYTE_ELEMENTS: +- case EXTERNAL_PIXEL_ELEMENTS: +- case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: +- return 0; +- case EXTERNAL_SHORT_ELEMENTS: +- case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: +- return 1; +- case EXTERNAL_INT_ELEMENTS: +- case EXTERNAL_UNSIGNED_INT_ELEMENTS: +- case EXTERNAL_FLOAT_ELEMENTS: +- return 2; +- case EXTERNAL_DOUBLE_ELEMENTS: +- case FAST_DOUBLE_ELEMENTS: +- case FAST_HOLEY_DOUBLE_ELEMENTS: +- return 3; +- case FAST_SMI_ELEMENTS: +- case FAST_ELEMENTS: +- case FAST_HOLEY_SMI_ELEMENTS: +- case FAST_HOLEY_ELEMENTS: +- case DICTIONARY_ELEMENTS: +- case NON_STRICT_ARGUMENTS_ELEMENTS: +- return kPointerSizeLog2; +- } +- UNREACHABLE(); +- return 0; +-} +- +- + LLabel* LChunk::GetLabel(int block_id) const { + HBasicBlock* block = graph_->blocks()->at(block_id); + int first_instruction = block->first_instruction_index(); +diff --git a/src/lithium.h b/src/lithium.h +index 089926e..a29d9d0 100644 +--- a/src/lithium.h ++++ b/src/lithium.h +@@ -704,9 +704,6 @@ class LChunk: public ZoneObject { + }; + + +-int ElementsKindToShiftSize(ElementsKind elements_kind); +- +- + } } // namespace v8::internal + + #endif // V8_LITHIUM_H_ +diff --git a/test/mjsunit/regress/regress-crbug-319835.js b/test/mjsunit/regress/regress-crbug-319835.js +new file mode 100644 +index 0000000..48f871f +--- /dev/null ++++ b/test/mjsunit/regress/regress-crbug-319835.js +@@ -0,0 +1,51 @@ ++// Copyright 2013 the V8 project authors. All rights reserved. ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following ++// disclaimer in the documentation and/or other materials provided ++// with the distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived ++// from this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// Flags: --allow-natives-syntax ++ ++try {} catch(e) {} // No need to optimize the top level. ++ ++var size = 0x20000; ++var a = new Float64Array(size); ++var training = new Float64Array(10); ++function store(a, index) { ++ var offset = 0x20000000; ++ for (var i = 0; i < 1; i++) { ++ a[index + offset] = 0xcc; ++ } ++} ++ ++store(training, -0x20000000); ++store(training, -0x20000000 + 1); ++store(training, -0x20000000); ++store(training, -0x20000000 + 1); ++%OptimizeFunctionOnNextCall(store); ++ ++// Segfault maybe? ++for (var i = -0x20000000; i < -0x20000000 + size; i++) { ++ store(a, i); ++} +diff --git a/test/mjsunit/regress/regress-crbug-319860.js b/test/mjsunit/regress/regress-crbug-319860.js +new file mode 100644 +index 0000000..b81fb85 +--- /dev/null ++++ b/test/mjsunit/regress/regress-crbug-319860.js +@@ -0,0 +1,47 @@ ++// Copyright 2013 the V8 project authors. All rights reserved. ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following ++// disclaimer in the documentation and/or other materials provided ++// with the distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived ++// from this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// Flags: --allow-natives-syntax ++ ++function read(a, index) { ++ var offset = 0x2000000; ++ var result; ++ for (var i = 0; i < 1; i++) { ++ result = a[index + offset]; ++ } ++ return result; ++} ++ ++var a = new Int8Array(0x2000001); ++read(a, 0); ++read(a, 0); ++%OptimizeFunctionOnNextCall(read); ++ ++// Segfault maybe? ++for (var i = 0; i > -1000000; --i) { ++ read(a, i); ++} +-- +1.8.4.2 + From d3e10708eb61e1caf3e2c54764ba60f6788b9e13 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Mon, 27 Jan 2014 15:57:16 -0700 Subject: [PATCH 022/100] backport fix for enumeration for objects with lots of properties --- v8-3.14.5.10-enumeration.patch | 30 ++++++++++++++++++++++++++++++ v8.spec | 10 +++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-enumeration.patch diff --git a/v8-3.14.5.10-enumeration.patch b/v8-3.14.5.10-enumeration.patch new file mode 100644 index 0000000..4dea2a5 --- /dev/null +++ b/v8-3.14.5.10-enumeration.patch @@ -0,0 +1,30 @@ +From 196184d332ba2d2defc56ad0b37653659a7d3ec0 Mon Sep 17 00:00:00 2001 +From: "svenpanne@chromium.org" +Date: Fri, 9 Nov 2012 11:30:05 +0000 +Subject: [PATCH] v8: backport codereview.chromium.org/11362182 + +Keep the number of descriptors below +DescriptorArray::kMaxNumberOfDescriptors even for accessors + +Review URL: https://codereview.chromium.org/11362182 +--- + src/objects.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/objects.cc b/src/objects.cc +--- a/src/objects.cc ++++ b/src/objects.cc +@@ -4453,7 +4453,9 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name, + // to do a lookup, which seems to be a bit of overkill. + Heap* heap = GetHeap(); + bool only_attribute_changes = getter->IsNull() && setter->IsNull(); +- if (HasFastProperties() && !only_attribute_changes) { ++ if (HasFastProperties() && !only_attribute_changes && ++ (map()->NumberOfOwnDescriptors() < ++ DescriptorArray::kMaxNumberOfDescriptors)) { + MaybeObject* getterOk = heap->undefined_value(); + if (!getter->IsNull()) { + getterOk = DefineFastAccessor(name, ACCESSOR_GETTER, getter, attributes); +-- +1.8.5.1 + diff --git a/v8.spec b/v8.spec index 9a304d2..7cc3a87 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -43,6 +43,10 @@ Patch2: v8-3.14.5.10-CVE-2013-2882.patch #backport fix for CVE-2013-6640 (RHBZ#1039889) Patch3: v8-3.14.5.10-CVE-2013-6640.patch +#backport fix for enumeration for objects with lots of properties +# https://codereview.chromium.org/11362182 +Patch4: v8-3.14.5.10-enumeration.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -61,6 +65,7 @@ Development headers and libraries for v8. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` @@ -218,6 +223,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Jan 27 2014 T.C. Hollingsworth - 1:3.14.5.10-4 +- backport fix for enumeration for objects with lots of properties + * Fri Dec 13 2013 T.C. Hollingsworth - 1:3.14.5.10-3 - backport fix for out-of-bounds read DoS (RHBZ#1039889; CVE-2013-6640) From 49c577cdcaf7dc7e0892ac18f94c266f68d429d3 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Thu, 13 Feb 2014 17:39:08 -0700 Subject: [PATCH 023/100] rebuild for icu-52 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 7cc3a87..2a88a51 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -223,6 +223,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Feb 14 2014 T.C. Hollingsworth - 1:3.14.5.10-5 +- rebuild for icu-52 + * Mon Jan 27 2014 T.C. Hollingsworth - 1:3.14.5.10-4 - backport fix for enumeration for objects with lots of properties From 3d7deedb88134439d8736a840107280dc0dc0723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hr=C4=8Dka?= Date: Mon, 24 Feb 2014 09:47:46 +0100 Subject: [PATCH 024/100] Backport CVE-2013-6650 incorrect handling of popular pages --- v8-3.14.5.10-CVE-2013-6650.patch | 80 ++++++++++++++++++++++++++++++++ v8.spec | 10 +++- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-CVE-2013-6650.patch diff --git a/v8-3.14.5.10-CVE-2013-6650.patch b/v8-3.14.5.10-CVE-2013-6650.patch new file mode 100644 index 0000000..d44811f --- /dev/null +++ b/v8-3.14.5.10-CVE-2013-6650.patch @@ -0,0 +1,80 @@ +From 3928813f014d3cdaed83fefc3a454078272f114b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hr=C4=8Dka?= +Date: Tue, 18 Feb 2014 00:23:04 +0100 +Subject: [PATCH] Backport Fix for CVE-2013-6650 Original patch + https://code.google.com/p/v8/source/detail?r=18483 + +Resolve: rhbz#1059070 +--- + src/store-buffer.cc | 2 +- + test/mjsunit/regress/regress-331444.js | 45 ++++++++++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+), 1 deletion(-) + create mode 100644 test/mjsunit/regress/regress-331444.js + +diff --git a/src/store-buffer.cc b/src/store-buffer.cc +index 66488ae..b9055f8 100644 +--- a/src/store-buffer.cc ++++ b/src/store-buffer.cc +@@ -242,7 +242,7 @@ void StoreBuffer::ExemptPopularPages(int prime_sample_step, int threshold) { + containing_chunk = MemoryChunk::FromAnyPointerAddress(addr); + } + int old_counter = containing_chunk->store_buffer_counter(); +- if (old_counter == threshold) { ++ if (old_counter >= threshold) { + containing_chunk->set_scan_on_scavenge(true); + created_new_scan_on_scavenge_pages = true; + } +diff --git a/test/mjsunit/regress/regress-331444.js b/test/mjsunit/regress/regress-331444.js +new file mode 100644 +index 0000000..3df0a08 +--- /dev/null ++++ b/test/mjsunit/regress/regress-331444.js +@@ -0,0 +1,45 @@ ++// Copyright 2014 the V8 project authors. All rights reserved. ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following ++// disclaimer in the documentation and/or other materials provided ++// with the distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived ++// from this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// Flags: --expose-gc ++ ++ ++function boom() { ++ var args = []; ++ for (var i = 0; i < 125000; i++) ++ args.push(i); ++ return Array.apply(Array, args); ++} ++var array = boom(); ++function fib(n) { ++ var f0 = 0, f1 = 1; ++ for (; n > 0; n = n - 1) { ++ f0 + f1; ++ f0 = array; ++ } ++} ++fib(12); +-- +1.8.3.1 + diff --git a/v8.spec b/v8.spec index 2a88a51..e85be91 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -47,6 +47,10 @@ Patch3: v8-3.14.5.10-CVE-2013-6640.patch # https://codereview.chromium.org/11362182 Patch4: v8-3.14.5.10-enumeration.patch +#backport fix for CVE-2013-6640 (RHBZ#1059070) +Patch5: v8-3.14.5.10-CVE-2013-6650.patch + + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -66,6 +70,7 @@ Development headers and libraries for v8. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` @@ -223,6 +228,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Feb 24 2014 Tomas Hrcka - 1:3.14.5.10-6 +- Backport fix for incorrect handling of popular pages (RHBZ#1059070; CVE-2013-6640) + * Fri Feb 14 2014 T.C. Hollingsworth - 1:3.14.5.10-5 - rebuild for icu-52 From 6c39dd7a94b3ad0616753da3543dff9883a7b957 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Tue, 18 Mar 2014 15:45:38 -0700 Subject: [PATCH 025/100] backport fix for unsigned integer arithmetic (RHBZ#1077136; CVE-2014-1704) --- v8-3.14.5.10-CVE-2014-1704-1.patch | 77 ++++++++++++++++++++++++++++++ v8.spec | 9 +++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-CVE-2014-1704-1.patch diff --git a/v8-3.14.5.10-CVE-2014-1704-1.patch b/v8-3.14.5.10-CVE-2014-1704-1.patch new file mode 100644 index 0000000..2df5230 --- /dev/null +++ b/v8-3.14.5.10-CVE-2014-1704-1.patch @@ -0,0 +1,77 @@ +From bf973073d98660edf35e01e6984029e46eb85368 Mon Sep 17 00:00:00 2001 +From: "dslomov@chromium.org" + +Date: Mon, 13 Jan 2014 13:00:09 +0000 +Subject: [PATCH] Use unsigned integer arithmetic in Zone::NewExpand. + + BUG=328202 + R=jkummerow@chromium.org + LOG=N + + Review URL: https://codereview.chromium.org/108783005 + + git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@18564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 +--- + src/zone.cc | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) + +diff --git a/src/zone.cc b/src/zone.cc +index 51b8113..c12978f 100644 +--- a/src/zone.cc ++++ b/src/zone.cc +@@ -175,25 +175,31 @@ Address Zone::NewExpand(int size) { + // except that we employ a maximum segment size when we delete. This + // is to avoid excessive malloc() and free() overhead. + Segment* head = segment_head_; +- int old_size = (head == NULL) ? 0 : head->size(); +- static const int kSegmentOverhead = sizeof(Segment) + kAlignment; +- int new_size_no_overhead = size + (old_size << 1); +- int new_size = kSegmentOverhead + new_size_no_overhead; ++ const size_t old_size = (head == NULL) ? 0 : head->size(); ++ static const size_t kSegmentOverhead = sizeof(Segment) + kAlignment; ++ const size_t new_size_no_overhead = size + (old_size << 1); ++ size_t new_size = kSegmentOverhead + new_size_no_overhead; ++ const size_t min_new_size = kSegmentOverhead + static_cast(size); + // Guard against integer overflow. +- if (new_size_no_overhead < size || new_size < kSegmentOverhead) { ++ if (new_size_no_overhead < static_cast(size) || ++ new_size < static_cast(kSegmentOverhead)) { + V8::FatalProcessOutOfMemory("Zone"); + return NULL; + } +- if (new_size < kMinimumSegmentSize) { ++ if (new_size < static_cast(kMinimumSegmentSize)) { + new_size = kMinimumSegmentSize; +- } else if (new_size > kMaximumSegmentSize) { ++ } else if (new_size > static_cast(kMaximumSegmentSize)) { + // Limit the size of new segments to avoid growing the segment size + // exponentially, thus putting pressure on contiguous virtual address space. + // All the while making sure to allocate a segment large enough to hold the + // requested size. +- new_size = Max(kSegmentOverhead + size, kMaximumSegmentSize); ++ new_size = Max(min_new_size, static_cast(kMaximumSegmentSize)); + } +- Segment* segment = NewSegment(new_size); ++ if (new_size > INT_MAX) { ++ V8::FatalProcessOutOfMemory("Zone"); ++ return NULL; ++ } ++ Segment* segment = NewSegment(static_cast(new_size)); + if (segment == NULL) { + V8::FatalProcessOutOfMemory("Zone"); + return NULL; +@@ -203,7 +209,10 @@ Address Zone::NewExpand(int size) { + Address result = RoundUp(segment->start(), kAlignment); + position_ = result + size; + // Check for address overflow. +- if (position_ < result) { ++ // (Should not happen since the segment is guaranteed to accomodate ++ // size bytes + header and alignment padding) ++ if (reinterpret_cast(position_) ++ < reinterpret_cast(result)) { + V8::FatalProcessOutOfMemory("Zone"); + return NULL; + } +-- +1.8.5.3 + diff --git a/v8.spec b/v8.spec index e85be91..9d9b387 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -50,6 +50,10 @@ Patch4: v8-3.14.5.10-enumeration.patch #backport fix for CVE-2013-6640 (RHBZ#1059070) Patch5: v8-3.14.5.10-CVE-2013-6650.patch +#backport only applicable fix for CVE-2014-1704 (RHBZ#1077136) +#the other two patches don't affect this version of v8 +Patch6: v8-3.14.5.10-CVE-2014-1704-1.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -228,6 +232,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Tue Mar 18 2014 T.C. Hollingsworth - 1:3.14.5.10-7 +- backport fix for unsigned integer arithmetic (RHBZ#1077136; CVE-2014-1704) + * Mon Feb 24 2014 Tomas Hrcka - 1:3.14.5.10-6 - Backport fix for incorrect handling of popular pages (RHBZ#1059070; CVE-2013-6640) From 62db431402b90b49c5f53e03f1ebcaa9c843078f Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Tue, 18 Mar 2014 15:49:17 -0700 Subject: [PATCH 026/100] apply the patch --- v8.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/v8.spec b/v8.spec index 9d9b387..963e9dc 100644 --- a/v8.spec +++ b/v8.spec @@ -75,6 +75,7 @@ Development headers and libraries for v8. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` From aff59a05b06ef9124155ad61c3e01807063bbe90 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Fri, 2 May 2014 17:48:17 -0700 Subject: [PATCH 027/100] use clock_gettime() instead of gettimeofday() increases V8 performance dramatically on virtual machines --- v8-3.14.5.10-use-clock_gettime.patch | 122 +++++++++++++++++++++++++++ v8.spec | 22 ++++- 2 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 v8-3.14.5.10-use-clock_gettime.patch diff --git a/v8-3.14.5.10-use-clock_gettime.patch b/v8-3.14.5.10-use-clock_gettime.patch new file mode 100644 index 0000000..cb25591 --- /dev/null +++ b/v8-3.14.5.10-use-clock_gettime.patch @@ -0,0 +1,122 @@ +From f9ced08de30c37838756e8227bd091f80ad9cafa Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Thu, 24 Apr 2014 04:27:40 +0200 +Subject: [PATCH] deps: make v8 use CLOCK_REALTIME_COARSE + +Date.now() indirectly calls gettimeofday() on Linux and that's a system +call that is extremely expensive on virtualized systems when the host +operating system has to emulate access to the hardware clock. + +Case in point: output from `perf record -c 10000 -e cycles:u -g -i` +for a benchmark/http_simple bytes/8 benchmark with a light load of +50 concurrent clients: + + 53.69% node node [.] v8::internal::OS::TimeCurrentMillis() + | + --- v8::internal::OS::TimeCurrentMillis() + | + |--99.77%-- v8::internal::Runtime_DateCurrentTime(v8::internal::Arguments, v8::internal::Isolate*) + | 0x23587880618e + +That's right - over half of user time spent inside the V8 function that +calls gettimeofday(). + +Notably, nearly all system time gets attributed to acpi_pm_read(), the +kernel function that reads the ACPI power management timer: + + 32.49% node [kernel.kallsyms] [k] acpi_pm_read + | + --- acpi_pm_read + | + |--98.40%-- __getnstimeofday + | getnstimeofday + | | + | |--71.61%-- do_gettimeofday + | | sys_gettimeofday + | | system_call_fastpath + | | 0x7fffbbaf6dbc + | | | + | | |--98.72%-- v8::internal::OS::TimeCurrentMillis() + +The cost of the gettimeofday() system call is normally measured in +nanoseconds but we were seeing 100 us averages and spikes >= 1000 us. +The numbers were so bad, my initial hunch was that the node process was +continuously getting rescheduled inside the system call... + +v8::internal::OS::TimeCurrentMillis()'s most frequent caller is +v8::internal::Runtime_DateCurrentTime(), the V8 run-time function +that's behind Date.now(). The timeout handling logic in lib/http.js +and lib/net.js calls into lib/timers.js and that module will happily +call Date.now() hundreds or even thousands of times per second. +If you saw exports._unrefActive() show up in --prof output a lot, +now you know why. + +That's why this commit makes V8 switch over to clock_gettime() on Linux. +In particular, it checks if CLOCK_REALTIME_COARSE is available and has +a resolution <= 1 ms because in that case the clock_gettime() call can +be fully serviced from the vDSO. + +It speeds up the aforementioned benchmark by about 100% on the affected +systems and should go a long way toward addressing the latency issues +that StrongLoop customers have been reporting. + +This patch will be upstreamed as a CR against V8 3.26. I'm sending it +as a pull request for v0.10 first because that's what our users are +running and because the delta between 3.26 and 3.14 is too big to +reasonably back-port the patch. I'll open a pull request for the +master branch once the CR lands upstream. + +Signed-off-by: Trevor Norris +Signed-off-by: Fedor Indutny +--- + src/platform-posix.cc | 26 ++++++++++++++++++++++---- + 1 file changed, 22 insertions(+), 4 deletions(-) + +diff --git a/src/platform-posix.cc b/src/platform-posix.cc +index ad74eba..3c86868 100644 +--- a/src/platform-posix.cc ++++ b/src/platform-posix.cc +@@ -188,19 +188,37 @@ int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { + + + double OS::TimeCurrentMillis() { +- struct timeval tv; +- if (gettimeofday(&tv, NULL) < 0) return 0.0; +- return (static_cast(tv.tv_sec) * 1000) + +- (static_cast(tv.tv_usec) / 1000); ++ return static_cast(Ticks()) / 1000; + } + + + int64_t OS::Ticks() { ++#if defined(__linux__) ++ static clockid_t clock_id = static_cast(-1); ++ struct timespec spec; ++ if (clock_id == static_cast(-1)) { ++ // CLOCK_REALTIME_COARSE may not be defined by the system headers but ++ // might still be supported by the kernel so use the clock id directly. ++ // Only use CLOCK_REALTIME_COARSE when its granularity <= 1 ms. ++ const clockid_t clock_realtime_coarse = 5; ++ if (clock_getres(clock_realtime_coarse, &spec) == 0 && ++ spec.tv_nsec <= 1000 * 1000) { ++ clock_id = clock_realtime_coarse; ++ } else { ++ clock_id = CLOCK_REALTIME; ++ } ++ } ++ if (clock_gettime(clock_id, &spec) != 0) { ++ return 0; // Not really possible. ++ } ++ return static_cast(spec.tv_sec) * 1000000 + (spec.tv_nsec / 1000); ++#else + // gettimeofday has microsecond resolution. + struct timeval tv; + if (gettimeofday(&tv, NULL) < 0) + return 0; + return (static_cast(tv.tv_sec) * 1000000) + tv.tv_usec; ++#endif + } + + +-- +1.9.1 diff --git a/v8.spec b/v8.spec index 963e9dc..1819a6d 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -54,6 +54,12 @@ Patch5: v8-3.14.5.10-CVE-2013-6650.patch #the other two patches don't affect this version of v8 Patch6: v8-3.14.5.10-CVE-2014-1704-1.patch +# use clock_gettime() instead of gettimeofday(), which increases performance +# dramatically on virtual machines +# https://github.com/joyent/node/commit/f9ced08de30c37838756e8227bd091f80ad9cafa +# see above link or head of patch for complete rationale +Patch7: v8-3.14.5.10-use-clock_gettime.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -76,9 +82,17 @@ Development headers and libraries for v8. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 + +#Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) +%if (0%{?rhel} > 6 || 0%{?fedora} > 18) +%global lrt %{nil} +%else +%global lrt -lrt +%endif # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code -PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` +PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS %{lrt} -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct # clear spurious executable bits @@ -233,6 +247,10 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Sat May 03 2014 T.C. Hollingsworth - 1:3.14.5.10-8 +- use clock_gettime() instead of gettimeofday(), which increases V8 performance + dramatically on virtual machines + * Tue Mar 18 2014 T.C. Hollingsworth - 1:3.14.5.10-7 - backport fix for unsigned integer arithmetic (RHBZ#1077136; CVE-2014-1704) From 9146923baa0a12bcdfd5a3b85bfec4000eb9ccd4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:12:10 -0500 Subject: [PATCH 028/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 1819a6d..bce5a3a 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -247,6 +247,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 1:3.14.5.10-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sat May 03 2014 T.C. Hollingsworth - 1:3.14.5.10-8 - use clock_gettime() instead of gettimeofday(), which increases V8 performance dramatically on virtual machines From 63b7c6109c1c92fd048d70dce9413aff924a8250 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Wed, 18 Jun 2014 23:51:18 -0700 Subject: [PATCH 029/100] fix corner case in integer comparisons (v8 bug#2416; nodejs bug#7528) --- v8-3.14.5.10-x64-compare-stubs.patch | 116 +++++++++++++++++++++++++++ v8.spec | 13 ++- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-x64-compare-stubs.patch diff --git a/v8-3.14.5.10-x64-compare-stubs.patch b/v8-3.14.5.10-x64-compare-stubs.patch new file mode 100644 index 0000000..bf7c542 --- /dev/null +++ b/v8-3.14.5.10-x64-compare-stubs.patch @@ -0,0 +1,116 @@ +From a960d1707a0038bfa5546c669b5b63c35bdb75c5 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Fri, 2 May 2014 22:44:45 +0400 +Subject: [PATCH] deps: backport 23f2736a from v8 upstream + +Original text: + + Fix corner case in x64 compare stubs. + + BUG=v8:2416 + + Review URL: https://codereview.chromium.org/11413087 + +fix #7528 +--- + src/x64/code-stubs-x64.cc | 2 +- + test/mjsunit/regress/regress-2416.js | 75 ++++++++++++++++++++++++++++ + 2 files changed, 76 insertions(+), 1 deletion(-) + create mode 100644 test/mjsunit/regress/regress-2416.js + +diff --git a/src/x64/code-stubs-x64.cc b/deps/v8/src/x64/code-stubs-x64.cc +index f0f9c5d..9ad0167 100644 +--- a/src/x64/code-stubs-x64.cc ++++ b/src/x64/code-stubs-x64.cc +@@ -5580,7 +5580,7 @@ void ICCompareStub::GenerateSmis(MacroAssembler* masm) { + __ subq(rdx, rax); + __ j(no_overflow, &done, Label::kNear); + // Correct sign of result in case of overflow. +- __ SmiNot(rdx, rdx); ++ __ not_(rdx); + __ bind(&done); + __ movq(rax, rdx); + } +diff --git a/test/mjsunit/regress/regress-2416.js b/deps/v8/test/mjsunit/regress/regress-2416.js +new file mode 100644 +index 0000000..02afeb9 +--- /dev/null ++++ b/test/mjsunit/regress/regress-2416.js +@@ -0,0 +1,75 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following ++// disclaimer in the documentation and/or other materials provided ++// with the distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived ++// from this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++assertFalse(2147483647 < -2147483648) ++assertFalse(2147483647 <= -2147483648) ++assertFalse(2147483647 == -2147483648) ++assertTrue(2147483647 >= -2147483648) ++assertTrue(2147483647 > -2147483648) ++ ++assertTrue(-2147483648 < 2147483647) ++assertTrue(-2147483648 <= 2147483647) ++assertFalse(-2147483648 == 2147483647) ++assertFalse(-2147483648 >= 2147483647) ++assertFalse(-2147483648 > 2147483647) ++ ++assertFalse(2147483647 < 2147483647) ++assertTrue(2147483647 <= 2147483647) ++assertTrue(2147483647 == 2147483647) ++assertTrue(2147483647 >= 2147483647) ++assertFalse(2147483647 > 2147483647) ++ ++assertFalse(-2147483648 < -2147483648) ++assertTrue(-2147483648 <= -2147483648) ++assertTrue(-2147483648 == -2147483648) ++assertTrue(-2147483648 >= -2147483648) ++assertFalse(-2147483648 > -2147483648) ++ ++ ++assertFalse(1073741823 < -1073741824) ++assertFalse(1073741823 <= -1073741824) ++assertFalse(1073741823 == -1073741824) ++assertTrue(1073741823 >= -1073741824) ++assertTrue(1073741823 > -1073741824) ++ ++assertTrue(-1073741824 < 1073741823) ++assertTrue(-1073741824 <= 1073741823) ++assertFalse(-1073741824 == 1073741823) ++assertFalse(-1073741824 >= 1073741823) ++assertFalse(-1073741824 > 1073741823) ++ ++assertFalse(1073741823 < 1073741823) ++assertTrue(1073741823 <= 1073741823) ++assertTrue(1073741823 == 1073741823) ++assertTrue(1073741823 >= 1073741823) ++assertFalse(1073741823 > 1073741823) ++ ++assertFalse(-1073741824 < -1073741824) ++assertTrue(-1073741824 <= -1073741824) ++assertTrue(-1073741824 == -1073741824) ++assertTrue(-1073741824 >= -1073741824) ++assertFalse(-1073741824 > -1073741824) +-- +1.9.3 diff --git a/v8.spec b/v8.spec index 1819a6d..49a3d52 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -60,6 +60,13 @@ Patch6: v8-3.14.5.10-CVE-2014-1704-1.patch # see above link or head of patch for complete rationale Patch7: v8-3.14.5.10-use-clock_gettime.patch +# fix corner case in x64 compare stubs +# fixes bug resulting in an incorrect result when comparing certain integers +# (e.g. 2147483647 > -2147483648 is false instead of true) +# https://code.google.com/p/v8/issues/detail?id=2416 +# https://github.com/joyent/node/issues/7528 +Patch8: v8-3.14.5.10-x64-compare-stubs.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -83,6 +90,7 @@ Development headers and libraries for v8. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 #Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) %if (0%{?rhel} > 6 || 0%{?fedora} > 18) @@ -247,6 +255,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Thu Jun 19 2014 T.C. Hollingsworth - 1:3.14.5.10-9 +- fix corner case in integer comparisons (v8 bug#2416; nodejs bug#7528) + * Sat May 03 2014 T.C. Hollingsworth - 1:3.14.5.10-8 - use clock_gettime() instead of gettimeofday(), which increases V8 performance dramatically on virtual machines From c762358c3530057e8d58ac4913eabcef42193501 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Thu, 31 Jul 2014 16:58:40 -0700 Subject: [PATCH 030/100] backport security fix for memory corruption and stack overflow (RHBZ#1125464) https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ --- ...4.5.10-mem-corruption-stack-overflow.patch | 33 +++++++++++++++++++ v8.spec | 11 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-mem-corruption-stack-overflow.patch diff --git a/v8-3.14.5.10-mem-corruption-stack-overflow.patch b/v8-3.14.5.10-mem-corruption-stack-overflow.patch new file mode 100644 index 0000000..452464b --- /dev/null +++ b/v8-3.14.5.10-mem-corruption-stack-overflow.patch @@ -0,0 +1,33 @@ +From 530af9cb8e700e7596b3ec812bad123c9fa06356 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Wed, 30 Jul 2014 15:33:52 -0700 +Subject: [PATCH] v8: Interrupts must not mask stack overflow. + +Backport of https://codereview.chromium.org/339883002 +--- + src/isolate.h | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/isolate.h b/src/isolate.h +index b90191d..2769ca7 100644 +--- a/src/isolate.h ++++ b/src/isolate.h +@@ -1392,14 +1392,9 @@ class StackLimitCheck BASE_EMBEDDED { + public: + explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } + +- bool HasOverflowed() const { ++ inline bool HasOverflowed() const { + StackGuard* stack_guard = isolate_->stack_guard(); +- // Stack has overflowed in C++ code only if stack pointer exceeds the C++ +- // stack guard and the limits are not set to interrupt values. +- // TODO(214): Stack overflows are ignored if a interrupt is pending. This +- // code should probably always use the initial C++ limit. +- return (reinterpret_cast(this) < stack_guard->climit()) && +- stack_guard->IsStackOverflow(); ++ return reinterpret_cast(this) < stack_guard->real_climit(); + } + private: + Isolate* isolate_; +-- +2.0.3 diff --git a/v8.spec b/v8.spec index d5b232c..4731146 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -67,6 +67,10 @@ Patch7: v8-3.14.5.10-use-clock_gettime.patch # https://github.com/joyent/node/issues/7528 Patch8: v8-3.14.5.10-x64-compare-stubs.patch +# backport security fix for memory corruption/stack overflow (RHBZ#1125464) +# https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ +# https://github.com/joyent/node/commit/530af9cb8e700e7596b3ec812bad123c9fa06356 +Patch9: v8-3.14.5.10-mem-corruption-stack-overflow.patch %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -91,6 +95,7 @@ Development headers and libraries for v8. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 #Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) %if (0%{?rhel} > 6 || 0%{?fedora} > 18) @@ -255,6 +260,10 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Thu Jul 31 2014 T.C. Hollingsworth - 1:3.14.5.10-11 +- backport security fix for memory corruption and stack overflow (RHBZ#1125464) + https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ + * Thu Jun 19 2014 T.C. Hollingsworth - 1:3.14.5.10-10 - fix corner case in integer comparisons (v8 bug#2416; nodejs bug#7528) From a53c43e8e983a53553db5a59bc46e6da5cd41f78 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Thu, 31 Jul 2014 17:11:19 -0700 Subject: [PATCH 031/100] backport fix for x64 MathMinMax for negative untagged int32 arguments. An untagged int32 has zeros in the upper half even if it is negative. Using cmpq to compare such numbers will incorrectly ignore the sign. --- v8-3.14.5.10-x64-MathMinMax.patch | 105 ++++++++++++++++++++++++++++++ v8.spec | 10 +++ 2 files changed, 115 insertions(+) create mode 100644 v8-3.14.5.10-x64-MathMinMax.patch diff --git a/v8-3.14.5.10-x64-MathMinMax.patch b/v8-3.14.5.10-x64-MathMinMax.patch new file mode 100644 index 0000000..e7b167d --- /dev/null +++ b/v8-3.14.5.10-x64-MathMinMax.patch @@ -0,0 +1,105 @@ +From 3530fa9cd09f8db8101c4649cab03bcdf760c434 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Fri, 21 Dec 2012 17:52:00 +0000 +Subject: [PATCH] deps: backport 4ed5fde4f from v8 upstream + +Original commit message: + + Fix x64 MathMinMax for negative untagged int32 arguments. + + An untagged int32 has zeros in the upper half even if it is negative. + Using cmpq to compare such numbers will incorrectly ignore the sign. + + BUG=164442 + R=mvstanton@chromium.org + + Review URL: https://chromiumcodereview.appspot.com/11665007 + + git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 + +Signed-off-by: Fedor Indutny +--- + src/x64/lithium-codegen-x64.cc | 6 ++-- + test/mjsunit/regress/regress-164442.js | 45 ++++++++++++++++++++++++++ + 2 files changed, 48 insertions(+), 3 deletions(-) + create mode 100644 test/mjsunit/regress/regress-164442.js + +diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc +index b461e62..ff01f44 100644 +--- a/src/x64/lithium-codegen-x64.cc ++++ b/src/x64/lithium-codegen-x64.cc +@@ -1457,17 +1457,17 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) { + if (right->IsConstantOperand()) { + Immediate right_imm = + Immediate(ToInteger32(LConstantOperand::cast(right))); +- __ cmpq(left_reg, right_imm); ++ __ cmpl(left_reg, right_imm); + __ j(condition, &return_left, Label::kNear); + __ movq(left_reg, right_imm); + } else if (right->IsRegister()) { + Register right_reg = ToRegister(right); +- __ cmpq(left_reg, right_reg); ++ __ cmpl(left_reg, right_reg); + __ j(condition, &return_left, Label::kNear); + __ movq(left_reg, right_reg); + } else { + Operand right_op = ToOperand(right); +- __ cmpq(left_reg, right_op); ++ __ cmpl(left_reg, right_op); + __ j(condition, &return_left, Label::kNear); + __ movq(left_reg, right_op); + } +diff --git a/test/mjsunit/regress/regress-164442.js b/test/mjsunit/regress/regress-164442.js +new file mode 100644 +index 0000000..1160d87 +--- /dev/null ++++ b/test/mjsunit/regress/regress-164442.js +@@ -0,0 +1,45 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are ++// met: ++// ++// * Redistributions of source code must retain the above copyright ++// notice, this list of conditions and the following disclaimer. ++// * Redistributions in binary form must reproduce the above ++// copyright notice, this list of conditions and the following ++// disclaimer in the documentation and/or other materials provided ++// with the distribution. ++// * Neither the name of Google Inc. nor the names of its ++// contributors may be used to endorse or promote products derived ++// from this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++// Flags: --allow-natives-syntax ++ ++// Should not take a very long time (n^2 algorithms are bad) ++ ++ ++function ensureNotNegative(x) { ++ return Math.max(0, x | 0); ++} ++ ++ ++ensureNotNegative(1); ++ensureNotNegative(2); ++ ++%OptimizeFunctionOnNextCall(ensureNotNegative); ++ ++var r = ensureNotNegative(-1); ++ ++assertEquals(0, r); +-- +2.0.3 + diff --git a/v8.spec b/v8.spec index 4731146..83a36fb 100644 --- a/v8.spec +++ b/v8.spec @@ -72,6 +72,13 @@ Patch8: v8-3.14.5.10-x64-compare-stubs.patch # https://github.com/joyent/node/commit/530af9cb8e700e7596b3ec812bad123c9fa06356 Patch9: v8-3.14.5.10-mem-corruption-stack-overflow.patch +# backport bugfix for x64 MathMinMax: +# Fix x64 MathMinMax for negative untagged int32 arguments. +# An untagged int32 has zeros in the upper half even if it is negative. +# Using cmpq to compare such numbers will incorrectly ignore the sign. +# https://github.com/joyent/node/commit/3530fa9cd09f8db8101c4649cab03bcdf760c434 +Patch10: v8-3.14.5.10-x64-MathMinMax.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -96,6 +103,7 @@ Development headers and libraries for v8. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 #Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) %if (0%{?rhel} > 6 || 0%{?fedora} > 18) @@ -263,6 +271,8 @@ rm -rf %{buildroot} * Thu Jul 31 2014 T.C. Hollingsworth - 1:3.14.5.10-11 - backport security fix for memory corruption and stack overflow (RHBZ#1125464) https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ +- backport bug fix for x64 MathMinMax for negative untagged int32 arguments. + https://github.com/joyent/node/commit/3530fa9cd09f8db8101c4649cab03bcdf760c434 * Thu Jun 19 2014 T.C. Hollingsworth - 1:3.14.5.10-10 - fix corner case in integer comparisons (v8 bug#2416; nodejs bug#7528) From 268ed1e2625e8885ca37932fda9181700b0a421f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 07:24:33 +0000 Subject: [PATCH 032/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 83a36fb..a4a0bbc 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -268,6 +268,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 1:3.14.5.10-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Thu Jul 31 2014 T.C. Hollingsworth - 1:3.14.5.10-11 - backport security fix for memory corruption and stack overflow (RHBZ#1125464) https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ From e2584be14421754d5439bf01777facbed1394c98 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 26 Aug 2014 13:57:46 +0200 Subject: [PATCH 033/100] rebuild for ICU 53.1 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index a4a0bbc..8d8182c 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 12%{?dist} +Release: 13%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -268,6 +268,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Tue Aug 26 2014 David Tardon - 1:3.14.5.10-13 +- rebuild for ICU 53.1 + * Mon Aug 18 2014 Fedora Release Engineering - 1:3.14.5.10-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 643e7db07d4b0d35d30650c025e1a0a99e7564f1 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Wed, 17 Sep 2014 19:35:04 -0700 Subject: [PATCH 034/100] nodejs 0.10.31/0.10.32 backport roundup - backport bugfix that eliminates unused-local-typedefs warning - backport security fix: Fix Hydrogen bounds check elimination (CVE-2013-6668; RHBZ#1086120) - backport fix to segfault caused by the above patch --- v8-3.14.5.10-CVE-2013-6668-segfault.patch | 60 ++++++ v8-3.14.5.10-CVE-2013-6668.patch | 186 +++++++++++++++++++ v8-3.14.5.10-interrupts-stack-overflow.patch | 31 ++++ v8-3.14.5.10-unused-local-typedefs.patch | 39 ++++ v8.spec | 24 ++- 5 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-CVE-2013-6668-segfault.patch create mode 100644 v8-3.14.5.10-CVE-2013-6668.patch create mode 100644 v8-3.14.5.10-interrupts-stack-overflow.patch create mode 100644 v8-3.14.5.10-unused-local-typedefs.patch diff --git a/v8-3.14.5.10-CVE-2013-6668-segfault.patch b/v8-3.14.5.10-CVE-2013-6668-segfault.patch new file mode 100644 index 0000000..8e3d600 --- /dev/null +++ b/v8-3.14.5.10-CVE-2013-6668-segfault.patch @@ -0,0 +1,60 @@ +From 3122e0eae64c5ab494b29d0a9cadef902d93f1f9 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Fri, 22 Aug 2014 03:59:35 +0400 +Subject: [PATCH] deps: fix up v8 after fd80a3 + +fd80a31e0697d6317ce8c2d289575399f4e06d21 has introduced a segfault +during redundant boundary check elimination (#8208). + +The problem consists of two parts: + + 1. Abscense of instruction iterator in + `EliminateRedundantBoundsChecks`. It was present in recent v8, but + wasn't considered important at the time of backport. However, since + the function is changing instructions order in block, it is + important to not rely at `i->next()` at the end of the loop. + 2. Too strict ASSERT in `MoveIndexIfNecessary`. It is essentially a + backport of a45c96ab from v8's upstream. See + https://github.com/v8/v8/commit/a45c96ab for details. + +fix #8208 +--- + src/hydrogen.cc | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/hydrogen.cc b/src/hydrogen.cc +index 50d8e49..18a6b60 100644 +--- a/src/hydrogen.cc ++++ b/src/hydrogen.cc +@@ -3546,7 +3546,11 @@ class BoundsCheckBbData: public ZoneObject { + void MoveIndexIfNecessary(HValue* index_raw, + HBoundsCheck* insert_before, + HInstruction* end_of_scan_range) { +- ASSERT(index_raw->IsAdd() || index_raw->IsSub()); ++ if (!index_raw->IsAdd() && !index_raw->IsSub()) { ++ // index_raw can be HAdd(index_base, offset), HSub(index_base, offset), ++ // or index_base directly. In the latter case, no need to move anything. ++ return; ++ } + HBinaryOperation* index = + HArithmeticBinaryOperation::cast(index_raw); + HValue* left_input = index->left(); +@@ -3581,7 +3585,6 @@ class BoundsCheckBbData: public ZoneObject { + HBoundsCheck* tighter_check) { + ASSERT(original_check->length() == tighter_check->length()); + MoveIndexIfNecessary(tighter_check->index(), original_check, tighter_check); +- original_check->ReplaceAllUsesWith(original_check->index()); + original_check->SetOperandAt(0, tighter_check->index()); + } + }; +@@ -3624,7 +3627,9 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb, + BoundsCheckTable* table) { + BoundsCheckBbData* bb_data_list = NULL; + +- for (HInstruction* i = bb->first(); i != NULL; i = i->next()) { ++ HInstruction* next; ++ for (HInstruction* i = bb->first(); i != NULL; i = next) { ++ next = i->next(); + if (!i->IsBoundsCheck()) continue; + + HBoundsCheck* check = HBoundsCheck::cast(i); diff --git a/v8-3.14.5.10-CVE-2013-6668.patch b/v8-3.14.5.10-CVE-2013-6668.patch new file mode 100644 index 0000000..fe5cb6d --- /dev/null +++ b/v8-3.14.5.10-CVE-2013-6668.patch @@ -0,0 +1,186 @@ +From fd80a31e0697d6317ce8c2d289575399f4e06d21 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Thu, 14 Aug 2014 19:29:28 +0400 +Subject: [PATCH] deps: backport 5f836c from v8 upstream + +Original commit message: + + Fix Hydrogen bounds check elimination + + When combining bounds checks, they must all be moved before the first load/store + that they are guarding. + + BUG=chromium:344186 + LOG=y + R=svenpanne@chromium.org + + Review URL: https://codereview.chromium.org/172093002 + + git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 + +fix #8070 +--- + src/hydrogen.cc | 106 +++++++++++++++++++++++------------------------- + 1 file changed, 50 insertions(+), 56 deletions(-) + +diff --git a/src/hydrogen.cc b/src/hydrogen.cc +index e3f79ee..50d8e49 100644 +--- a/src/hydrogen.cc ++++ b/src/hydrogen.cc +@@ -3487,13 +3487,7 @@ class BoundsCheckBbData: public ZoneObject { + keep_new_check = true; + upper_check_ = new_check; + } else { +- BuildOffsetAdd(upper_check_, +- &added_upper_index_, +- &added_upper_offset_, +- Key()->IndexBase(), +- new_check->index()->representation(), +- new_offset); +- upper_check_->SetOperandAt(0, added_upper_index_); ++ TightenCheck(upper_check_, new_check); + } + } else if (new_offset < lower_offset_) { + lower_offset_ = new_offset; +@@ -3501,28 +3495,27 @@ class BoundsCheckBbData: public ZoneObject { + keep_new_check = true; + lower_check_ = new_check; + } else { +- BuildOffsetAdd(lower_check_, +- &added_lower_index_, +- &added_lower_offset_, +- Key()->IndexBase(), +- new_check->index()->representation(), +- new_offset); +- lower_check_->SetOperandAt(0, added_lower_index_); ++ TightenCheck(lower_check_, new_check); + } + } else { +- ASSERT(false); ++ // Should never have called CoverCheck() in this case. ++ UNREACHABLE(); + } + + if (!keep_new_check) { + new_check->DeleteAndReplaceWith(NULL); ++ } else { ++ HBoundsCheck* first_check = new_check == lower_check_ ? upper_check_ ++ : lower_check_; ++ // The length is guaranteed to be live at first_check. ++ ASSERT(new_check->length() == first_check->length()); ++ HInstruction* old_position = new_check->next(); ++ new_check->Unlink(); ++ new_check->InsertAfter(first_check); ++ MoveIndexIfNecessary(new_check->index(), new_check, old_position); + } + } + +- void RemoveZeroOperations() { +- RemoveZeroAdd(&added_lower_index_, &added_lower_offset_); +- RemoveZeroAdd(&added_upper_index_, &added_upper_offset_); +- } +- + BoundsCheckBbData(BoundsCheckKey* key, + int32_t lower_offset, + int32_t upper_offset, +@@ -3537,10 +3530,6 @@ class BoundsCheckBbData: public ZoneObject { + basic_block_(bb), + lower_check_(lower_check), + upper_check_(upper_check), +- added_lower_index_(NULL), +- added_lower_offset_(NULL), +- added_upper_index_(NULL), +- added_upper_offset_(NULL), + next_in_bb_(next_in_bb), + father_in_dt_(father_in_dt) { } + +@@ -3551,44 +3540,50 @@ class BoundsCheckBbData: public ZoneObject { + HBasicBlock* basic_block_; + HBoundsCheck* lower_check_; + HBoundsCheck* upper_check_; +- HAdd* added_lower_index_; +- HConstant* added_lower_offset_; +- HAdd* added_upper_index_; +- HConstant* added_upper_offset_; + BoundsCheckBbData* next_in_bb_; + BoundsCheckBbData* father_in_dt_; + +- void BuildOffsetAdd(HBoundsCheck* check, +- HAdd** add, +- HConstant** constant, +- HValue* original_value, +- Representation representation, +- int32_t new_offset) { +- HConstant* new_constant = new(BasicBlock()->zone()) +- HConstant(new_offset, Representation::Integer32()); +- if (*add == NULL) { +- new_constant->InsertBefore(check); +- // Because of the bounds checks elimination algorithm, the index is always +- // an HAdd or an HSub here, so we can safely cast to an HBinaryOperation. +- HValue* context = HBinaryOperation::cast(check->index())->context(); +- *add = new(BasicBlock()->zone()) HAdd(context, +- original_value, +- new_constant); +- (*add)->AssumeRepresentation(representation); +- (*add)->InsertBefore(check); +- } else { +- new_constant->InsertBefore(*add); +- (*constant)->DeleteAndReplaceWith(new_constant); ++ void MoveIndexIfNecessary(HValue* index_raw, ++ HBoundsCheck* insert_before, ++ HInstruction* end_of_scan_range) { ++ ASSERT(index_raw->IsAdd() || index_raw->IsSub()); ++ HBinaryOperation* index = ++ HArithmeticBinaryOperation::cast(index_raw); ++ HValue* left_input = index->left(); ++ HValue* right_input = index->right(); ++ bool must_move_index = false; ++ bool must_move_left_input = false; ++ bool must_move_right_input = false; ++ for (HInstruction* cursor = end_of_scan_range; cursor != insert_before;) { ++ if (cursor == left_input) must_move_left_input = true; ++ if (cursor == right_input) must_move_right_input = true; ++ if (cursor == index) must_move_index = true; ++ if (cursor->previous() == NULL) { ++ cursor = cursor->block()->dominator()->end(); ++ } else { ++ cursor = cursor->previous(); ++ } + } +- *constant = new_constant; +- } + +- void RemoveZeroAdd(HAdd** add, HConstant** constant) { +- if (*add != NULL && (*constant)->Integer32Value() == 0) { +- (*add)->DeleteAndReplaceWith((*add)->left()); +- (*constant)->DeleteAndReplaceWith(NULL); ++ // The BCE algorithm only selects mergeable bounds checks that share ++ // the same "index_base", so we'll only ever have to move constants. ++ if (must_move_left_input) { ++ HConstant::cast(left_input)->Unlink(); ++ HConstant::cast(left_input)->InsertBefore(index); ++ } ++ if (must_move_right_input) { ++ HConstant::cast(right_input)->Unlink(); ++ HConstant::cast(right_input)->InsertBefore(index); + } + } ++ ++ void TightenCheck(HBoundsCheck* original_check, ++ HBoundsCheck* tighter_check) { ++ ASSERT(original_check->length() == tighter_check->length()); ++ MoveIndexIfNecessary(tighter_check->index(), original_check, tighter_check); ++ original_check->ReplaceAllUsesWith(original_check->index()); ++ original_check->SetOperandAt(0, tighter_check->index()); ++ } + }; + + +@@ -3683,7 +3678,6 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb, + for (BoundsCheckBbData* data = bb_data_list; + data != NULL; + data = data->NextInBasicBlock()) { +- data->RemoveZeroOperations(); + if (data->FatherInDominatorTree()) { + table->Insert(data->Key(), data->FatherInDominatorTree(), zone()); + } else { diff --git a/v8-3.14.5.10-interrupts-stack-overflow.patch b/v8-3.14.5.10-interrupts-stack-overflow.patch new file mode 100644 index 0000000..049b4df --- /dev/null +++ b/v8-3.14.5.10-interrupts-stack-overflow.patch @@ -0,0 +1,31 @@ +From 530af9cb8e700e7596b3ec812bad123c9fa06356 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Wed, 30 Jul 2014 15:33:52 -0700 +Subject: [PATCH] v8: Interrupts must not mask stack overflow. + +Backport of https://codereview.chromium.org/339883002 +--- + src/isolate.h | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/isolate.h b/src/isolate.h +index b90191d..2769ca7 100644 +--- a/src/isolate.h ++++ b/src/isolate.h +@@ -1392,14 +1392,9 @@ class StackLimitCheck BASE_EMBEDDED { + public: + explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } + +- bool HasOverflowed() const { ++ inline bool HasOverflowed() const { + StackGuard* stack_guard = isolate_->stack_guard(); +- // Stack has overflowed in C++ code only if stack pointer exceeds the C++ +- // stack guard and the limits are not set to interrupt values. +- // TODO(214): Stack overflows are ignored if a interrupt is pending. This +- // code should probably always use the initial C++ limit. +- return (reinterpret_cast(this) < stack_guard->climit()) && +- stack_guard->IsStackOverflow(); ++ return reinterpret_cast(this) < stack_guard->real_climit(); + } + private: + Isolate* isolate_; diff --git a/v8-3.14.5.10-unused-local-typedefs.patch b/v8-3.14.5.10-unused-local-typedefs.patch new file mode 100644 index 0000000..c168875 --- /dev/null +++ b/v8-3.14.5.10-unused-local-typedefs.patch @@ -0,0 +1,39 @@ +From 53b4accb6e5747b156be91a2b90f42607e33a7cc Mon Sep 17 00:00:00 2001 +From: Timothy J Fontaine +Date: Mon, 4 Aug 2014 13:43:50 -0700 +Subject: [PATCH] v8: Fix compliation with GCC 4.8 + +Supresses a very loud warning from GCC 4.8 about unused typedefs + +Original url https://codereview.chromium.org/69413002 +--- + src/checks.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/checks.h b/src/checks.h +index d0a0c2b..4396ada 100644 +--- a/src/checks.h ++++ b/src/checks.h +@@ -230,6 +230,13 @@ inline void CheckNonEqualsHelper(const char* file, + #define CHECK_LE(a, b) CHECK((a) <= (b)) + + ++#if defined(__clang__) || defined(__GNUC__) ++# define V8_UNUSED __attribute__((unused)) ++#else ++# define V8_UNUSED ++#endif ++ ++ + // This is inspired by the static assertion facility in boost. This + // is pretty magical. If it causes you trouble on a platform you may + // find a fix in the boost code. +@@ -248,7 +255,7 @@ template class StaticAssertionHelper { }; + #define STATIC_CHECK(test) \ + typedef \ + StaticAssertionHelper((test))>)> \ +- SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) ++ SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) V8_UNUSED + + + extern bool FLAG_enable_slow_asserts; diff --git a/v8.spec b/v8.spec index 83a36fb..ebbefd6 100644 --- a/v8.spec +++ b/v8.spec @@ -79,6 +79,20 @@ Patch9: v8-3.14.5.10-mem-corruption-stack-overflow.patch # https://github.com/joyent/node/commit/3530fa9cd09f8db8101c4649cab03bcdf760c434 Patch10: v8-3.14.5.10-x64-MathMinMax.patch +# backport bugfix that eliminates unused-local-typedefs warning +# https://github.com/joyent/node/commit/53b4accb6e5747b156be91a2b90f42607e33a7cc +Patch11: v8-3.14.5.10-unused-local-typedefs.patch + +# backport security fix: Fix Hydrogen bounds check elimination +# resolves CVE-2013-6668 (RHBZ#1086120) +# https://github.com/joyent/node/commit/fd80a31e0697d6317ce8c2d289575399f4e06d21 +Patch12: v8-3.14.5.10-CVE-2013-6668.patch + +# backport fix to segfault caused by the above patch +# https://github.com/joyent/node/commit/3122e0eae64c5ab494b29d0a9cadef902d93f1f9 +Patch13: v8-3.14.5.10-CVE-2013-6668-segfault.patch + + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -104,6 +118,9 @@ Development headers and libraries for v8. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 #Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) %if (0%{?rhel} > 6 || 0%{?fedora} > 18) @@ -113,7 +130,7 @@ Development headers and libraries for v8. %endif # -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code -PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS %{lrt} -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` +PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS %{lrt} -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct # clear spurious executable bits @@ -268,6 +285,11 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Wed Sep 17 2014 T.C. Hollingsworth - 1:3.14.5.10-12 +- backport bugfix that eliminates unused-local-typedefs warning +- backport security fix: Fix Hydrogen bounds check elimination (CVE-2013-6668; RHBZ#1086120) +- backport fix to segfault caused by the above patch + * Thu Jul 31 2014 T.C. Hollingsworth - 1:3.14.5.10-11 - backport security fix for memory corruption and stack overflow (RHBZ#1125464) https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ From 284f7bc089b1d7cecb9ad64c0623eb62817289e6 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 2 Dec 2014 15:31:42 -0500 Subject: [PATCH 035/100] use system valgrind header (1141483) --- v8-3.14.5.10-system-valgrind.patch | 44 ++++++++++++++++++++++++++++++ v8.spec | 13 ++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-system-valgrind.patch 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 + #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 + #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 - 1:3.14.5.10-15 +- use system valgrind header (bz1141483) + * Wed Sep 17 2014 T.C. Hollingsworth - 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) From b54ed0729b2ed3b75be6a996ba239a2f74099c29 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 26 Jan 2015 17:14:13 +0100 Subject: [PATCH 036/100] rebuild for ICU 54.1 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 570ec2c..12c8eda 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 15%{?dist} +Release: 16%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -293,6 +293,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Jan 26 2015 David Tardon - 1:3.14.5.10-16 +- rebuild for ICU 54.1 + * Tue Dec 2 2014 Tom Callaway - 1:3.14.5.10-15 - use system valgrind header (bz1141483) From e4755738a485286973972965a6686adb5ecf94da Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Thu, 19 Feb 2015 00:38:15 -0700 Subject: [PATCH 037/100] backports for nodejs 0.10.36 --- v8-3.14.5.10-abort-uncaught-exception.patch | 139 ++++++++++++++++++++ v8-3.14.5.10-busy-loop.patch | 137 +++++++++++++++++++ v8-3.14.5.10-profiler-log.patch | 43 ++++++ v8-3.14.5.10-unhandled-ReferenceError.patch | 37 ++++++ v8.spec | 30 ++++- 5 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-abort-uncaught-exception.patch create mode 100644 v8-3.14.5.10-busy-loop.patch create mode 100644 v8-3.14.5.10-profiler-log.patch create mode 100644 v8-3.14.5.10-unhandled-ReferenceError.patch diff --git a/v8-3.14.5.10-abort-uncaught-exception.patch b/v8-3.14.5.10-abort-uncaught-exception.patch new file mode 100644 index 0000000..b2f2a08 --- /dev/null +++ b/v8-3.14.5.10-abort-uncaught-exception.patch @@ -0,0 +1,139 @@ +From fbff7054a47551387a99244e2cf0631f30406798 Mon Sep 17 00:00:00 2001 +From: Trevor Norris +Date: Tue, 18 Nov 2014 16:37:54 -0800 +Subject: [PATCH] v8: add api for aborting on uncaught exception + +Add v8::Isolate::SetAbortOnUncaughtException() so the user can be +notified when an uncaught exception has bubbled. + +PR-URL: https://github.com/joyent/node/pull/8666 +Reviewed-by: Trevor Norris +--- + include/v8.h | 11 +++++++++++ + src/api.cc | 5 +++++ + src/isolate.cc | 33 +++++++++++++++++++++++---------- + src/isolate.h | 5 +++++ + 4 files changed, 44 insertions(+), 10 deletions(-) + +diff --git a/include/v8.h b/include/v8.h +index 71a0d01..e229ed9 100644 +--- a/include/v8.h ++++ b/include/v8.h +@@ -2842,6 +2842,17 @@ class V8EXPORT Isolate { + static Isolate* GetCurrent(); + + /** ++ * Custom callback used by embedders to help V8 determine if it should abort ++ * when it throws and no internal handler can catch the exception. ++ * If FLAG_abort_on_uncaught_exception is true, then V8 will abort if either: ++ * - no custom callback is set. ++ * - the custom callback set returns true. ++ * Otherwise it won't abort. ++ */ ++ typedef bool (*abort_on_uncaught_exception_t)(); ++ void SetAbortOnUncaughtException(abort_on_uncaught_exception_t callback); ++ ++ /** + * Methods below this point require holding a lock (using Locker) in + * a multi-threaded environment. + */ +diff --git a/src/api.cc b/src/api.cc +index 96d564f..4b1aa67 100644 +--- a/src/api.cc ++++ b/src/api.cc +@@ -5550,6 +5550,11 @@ void Isolate::Enter() { + isolate->Enter(); + } + ++void Isolate::SetAbortOnUncaughtException( ++ abort_on_uncaught_exception_t callback) { ++ i::Isolate* isolate = reinterpret_cast(this); ++ isolate->SetAbortOnUncaughtException(callback); ++} + + void Isolate::Exit() { + i::Isolate* isolate = reinterpret_cast(this); +diff --git a/src/isolate.cc b/src/isolate.cc +index 5a5293e..0b38616 100644 +--- a/src/isolate.cc ++++ b/src/isolate.cc +@@ -1152,18 +1152,26 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) { + thread_local_top()->pending_message_end_pos_ = location->end_pos(); + } + +- // If the abort-on-uncaught-exception flag is specified, abort on any +- // exception not caught by JavaScript, even when an external handler is +- // present. This flag is intended for use by JavaScript developers, so +- // print a user-friendly stack trace (not an internal one). ++ // If the abort-on-uncaught-exception flag is specified, and if the ++ // exception is not caught by JavaScript (even when an external handler is ++ // present). + if (fatal_exception_depth == 0 && + FLAG_abort_on_uncaught_exception && + (report_exception || can_be_caught_externally)) { +- fatal_exception_depth++; +- fprintf(stderr, "%s\n\nFROM\n", +- *MessageHandler::GetLocalizedMessage(message_obj)); +- PrintCurrentStackTrace(stderr); +- OS::Abort(); ++ // If the embedder didn't specify a custom uncaught exception callback, ++ // or if the custom callback determined that V8 should abort, then ++ // abort ++ bool should_abort = !abort_on_uncaught_exception_callback_ || ++ abort_on_uncaught_exception_callback_(); ++ if (should_abort) { ++ fatal_exception_depth++; ++ // This flag is intended for use by JavaScript developers, so ++ // print a user-friendly stack trace (not an internal one). ++ fprintf(stderr, "%s\n\nFROM\n", ++ *MessageHandler::GetLocalizedMessage(message_obj)); ++ PrintCurrentStackTrace(stderr); ++ OS::Abort(); ++ } + } + } else if (location != NULL && !location->script().is_null()) { + // We are bootstrapping and caught an error where the location is set +@@ -1339,6 +1347,10 @@ void Isolate::SetCaptureStackTraceForUncaughtExceptions( + stack_trace_for_uncaught_exceptions_options_ = options; + } + ++void Isolate::SetAbortOnUncaughtException( ++ v8::Isolate::abort_on_uncaught_exception_t callback) { ++ abort_on_uncaught_exception_callback_ = callback; ++} + + bool Isolate::is_out_of_memory() { + if (has_pending_exception()) { +@@ -1534,7 +1546,8 @@ Isolate::Isolate() + date_cache_(NULL), + context_exit_happened_(false), + deferred_handles_head_(NULL), +- optimizing_compiler_thread_(this) { ++ optimizing_compiler_thread_(this), ++ abort_on_uncaught_exception_callback_(NULL) { + TRACE_ISOLATE(constructor); + + memset(isolate_addresses_, 0, +diff --git a/src/isolate.h b/src/isolate.h +index 2769ca7..8719aa1 100644 +--- a/src/isolate.h ++++ b/src/isolate.h +@@ -692,6 +692,9 @@ class Isolate { + int frame_limit, + StackTrace::StackTraceOptions options); + ++ typedef bool (*abort_on_uncaught_exception_t)(); ++ void SetAbortOnUncaughtException(abort_on_uncaught_exception_t callback); ++ + // Tells whether the current context has experienced an out of memory + // exception. + bool is_out_of_memory(); +@@ -1292,6 +1295,8 @@ class Isolate { + DeferredHandles* deferred_handles_head_; + OptimizingCompilerThread optimizing_compiler_thread_; + ++ abort_on_uncaught_exception_t abort_on_uncaught_exception_callback_; ++ + friend class ExecutionAccess; + friend class HandleScopeImplementer; + friend class IsolateInitializer; diff --git a/v8-3.14.5.10-busy-loop.patch b/v8-3.14.5.10-busy-loop.patch new file mode 100644 index 0000000..fcc906c --- /dev/null +++ b/v8-3.14.5.10-busy-loop.patch @@ -0,0 +1,137 @@ +From 6ebd85e10535dfaa9181842fe73834e51d4d3e6c Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Thu, 27 Nov 2014 07:15:54 +0100 +Subject: [PATCH] v8: don't busy loop in cpu profiler thread + +Reduce the overhead of the CPU profiler by replacing sched_yield() with +nanosleep() in V8's tick event processor thread. The former only yields +the CPU when there is another process scheduled on the same CPU. + +Before this commit, the thread would effectively busy loop and consume +100% CPU time. By forcing a one nanosecond sleep period rounded up to +the task scheduler's granularity (about 50 us on Linux), CPU usage for +the processor thread now hovers around 10-20% for a busy application. + +PR-URL: https://github.com/joyent/node/pull/8789 +Ref: https://github.com/strongloop/strong-agent/issues/3 +Reviewed-by: Trevor Norris +--- + src/platform-freebsd.cc | 5 ----- + src/platform-linux.cc | 5 ----- + src/platform-macos.cc | 5 ----- + src/platform-openbsd.cc | 5 ----- + src/platform-posix.cc | 6 ++++++ + src/platform-solaris.cc | 5 ----- + tools/gyp/v8.gyp | 2 +- + 7 files changed, 7 insertions(+), 26 deletions(-) + +diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc +index 511759c..5c90c6b 100644 +--- a/src/platform-freebsd.cc ++++ b/src/platform-freebsd.cc +@@ -539,11 +539,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { + } + + +-void Thread::YieldCPU() { +- sched_yield(); +-} +- +- + class FreeBSDMutex : public Mutex { + public: + FreeBSDMutex() { +diff --git a/src/platform-linux.cc b/src/platform-linux.cc +index beb2cce..3d6b304 100644 +--- a/src/platform-linux.cc ++++ b/src/platform-linux.cc +@@ -812,11 +812,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { + } + + +-void Thread::YieldCPU() { +- sched_yield(); +-} +- +- + class LinuxMutex : public Mutex { + public: + LinuxMutex() { +diff --git a/src/platform-macos.cc b/src/platform-macos.cc +index a216f6e..e54e3e4 100644 +--- a/src/platform-macos.cc ++++ b/src/platform-macos.cc +@@ -640,11 +640,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { + } + + +-void Thread::YieldCPU() { +- sched_yield(); +-} +- +- + class MacOSMutex : public Mutex { + public: + MacOSMutex() { +diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc +index 408d4dc..72167de 100644 +--- a/src/platform-openbsd.cc ++++ b/src/platform-openbsd.cc +@@ -593,11 +593,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { + } + + +-void Thread::YieldCPU() { +- sched_yield(); +-} +- +- + class OpenBSDMutex : public Mutex { + public: + OpenBSDMutex() { +diff --git a/src/platform-posix.cc b/src/platform-posix.cc +index 5c3529d..8aecd56 100644 +--- a/src/platform-posix.cc ++++ b/src/platform-posix.cc +@@ -392,6 +392,12 @@ void OS::StrNCpy(Vector dest, const char* src, size_t n) { + } + + ++void Thread::YieldCPU() { ++ const timespec delay = { 0, 1 }; ++ nanosleep(&delay, NULL); ++} ++ ++ + // ---------------------------------------------------------------------------- + // POSIX socket support. + // +diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc +index 07718fe..4e95ecc 100644 +--- a/src/platform-solaris.cc ++++ b/src/platform-solaris.cc +@@ -527,11 +527,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { + } + + +-void Thread::YieldCPU() { +- sched_yield(); +-} +- +- + class SolarisMutex : public Mutex { + public: + SolarisMutex() { +diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp +index 71cf366..c304925 100644 +--- a/tools/gyp/v8.gyp ++++ b/tools/gyp/v8.gyp +@@ -715,7 +715,7 @@ + ['OS=="solaris"', { + 'link_settings': { + 'libraries': [ +- '-lsocket -lnsl', ++ '-lsocket -lnsl -lrt', + ]}, + 'sources': [ + '../../src/platform-solaris.cc', diff --git a/v8-3.14.5.10-profiler-log.patch b/v8-3.14.5.10-profiler-log.patch new file mode 100644 index 0000000..2530e54 --- /dev/null +++ b/v8-3.14.5.10-profiler-log.patch @@ -0,0 +1,43 @@ +From 431eb172f97434a3b0868a610bc14d8ff7d9efd9 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Fri, 16 Jan 2015 13:44:42 +0100 +Subject: [PATCH] deps: log V8 version in profiler log file + +Patch from issue 800293002 authored by ben@strongloop.com + +Review URL: https://codereview.chromium.org/806143002 + +PR-URL: https://github.com/joyent/node/pull/9043 +Reviewed-by: Trevor Norris +Reviewed-By: Timothy J Fontaine +--- + src/log-utils.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/log-utils.cc b/src/log-utils.cc +index 5e607da..622cc51 100644 +--- a/src/log-utils.cc ++++ b/src/log-utils.cc +@@ -29,6 +29,7 @@ + + #include "log-utils.h" + #include "string-stream.h" ++#include "version.h" + + namespace v8 { + namespace internal { +@@ -136,6 +137,14 @@ void Log::Initialize() { + } + } + } ++ ++ if (output_handle_ != NULL) { ++ LogMessageBuilder msg(logger_); ++ msg.Append("v8-version,%d,%d,%d,%d,%d\n", Version::GetMajor(), ++ Version::GetMinor(), Version::GetBuild(), Version::GetPatch(), ++ Version::IsCandidate()); ++ msg.WriteToLogFile(); ++ } + } + + diff --git a/v8-3.14.5.10-unhandled-ReferenceError.patch b/v8-3.14.5.10-unhandled-ReferenceError.patch new file mode 100644 index 0000000..7762fa8 --- /dev/null +++ b/v8-3.14.5.10-unhandled-ReferenceError.patch @@ -0,0 +1,37 @@ +From 0ff51c6e063e3eea9e4d9ea68edc82d935626fc7 Mon Sep 17 00:00:00 2001 +From: Julien Gilli +Date: Fri, 28 Nov 2014 15:33:35 -0800 +Subject: [PATCH] deps: backport 2ad2237 from v8 upstream + +Original commit message: + +Fix Unhandled ReferenceError in debug-debugger.js + +This fixes following exception in Sky on attempt to set a breakpoint +"Unhandled: Uncaught ReferenceError: break_point is not defined" +I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode. + +BUG=None +LOG=N +R=yangguo@chromium.org + +Review URL: https://codereview.chromium.org/741683002 + +Cr-Commit-Position: refs/heads/master@{#25415} +--- + src/debug-debugger.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/debug-debugger.js b/src/debug-debugger.js +index dfad902..a27961f 100644 +--- a/src/debug-debugger.js ++++ b/src/debug-debugger.js +@@ -442,7 +442,7 @@ ScriptBreakPoint.prototype.set = function (script) { + if (position === null) return; + + // Create a break point object and set the break point. +- break_point = MakeBreakPoint(position, this); ++ var break_point = MakeBreakPoint(position, this); + break_point.setIgnoreCount(this.ignoreCount()); + var actual_position = %SetScriptBreakPoint(script, position, break_point); + if (IS_UNDEFINED(actual_position)) { diff --git a/v8.spec b/v8.spec index 12c8eda..45b05ec 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 16%{?dist} +Release: 17%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -97,6 +97,27 @@ Patch13: v8-3.14.5.10-CVE-2013-6668-segfault.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1141483 Patch14: v8-3.14.5.10-system-valgrind.patch +# Fix issues with abort on uncaught exception +# https://github.com/joyent/node/pull/8666 +# https://github.com/joyent/node/issues/8631 +# https://github.com/joyent/node/issues/8630 +Patch15: v8-3.14.5.10-abort-uncaught-exception.patch + +# Fix unhandled ReferenceError in debug-debugger.js +# https://github.com/joyent/node/commit/0ff51c6e063e3eea9e4d9ea68edc82d935626fc7 +# https://codereview.chromium.org/741683002 +Patch16: v8-3.14.5.10-unhandled-ReferenceError.patch + +# Don't busy loop in CPU profiler thread +# https://github.com/joyent/node/pull/8789 +Patch17: v8-3.14.5.10-busy-loop.patch + +# Log V8 version in profiler log file +# (needed for compatibility with profiler tools) +# https://github.com/joyent/node/pull/9043 +# https://codereview.chromium.org/806143002 +Patch18: v8-3.14.5.10-profiler-log.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -126,6 +147,10 @@ Development headers and libraries for v8. %patch12 -p1 %patch13 -p1 %patch14 -p1 -b .system-valgrind +%patch15 -p1 -b .abort-uncaught-exception +%patch16 -p1 -b .unhandled-ReferenceError +%patch17 -p1 -b .busy-loop +%patch18 -p1 -b .profiler-log # Do not need this lying about. rm -rf src/third_party/valgrind @@ -293,6 +318,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Thu Feb 19 2015 T.C. Hollingsworth - 1:3.14.5.10-17 +- backports for nodejs 0.10.36 + * Mon Jan 26 2015 David Tardon - 1:3.14.5.10-16 - rebuild for ICU 54.1 From 46891f12366e414a4894a9688cc43d34646bf84f Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 23 Apr 2015 15:12:32 -0400 Subject: [PATCH 038/100] fix for CVE-2014-3152 --- v8-3.4.14-CVE-2014-3152.patch | 13 +++++++++++++ v8.spec | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 v8-3.4.14-CVE-2014-3152.patch diff --git a/v8-3.4.14-CVE-2014-3152.patch b/v8-3.4.14-CVE-2014-3152.patch new file mode 100644 index 0000000..a399c79 --- /dev/null +++ b/v8-3.4.14-CVE-2014-3152.patch @@ -0,0 +1,13 @@ +diff -up v8-3.14.5.10/src/arm/lithium-codegen-arm.cc.cve20143152 v8-3.14.5.10/src/arm/lithium-codegen-arm.cc +--- v8-3.14.5.10/src/arm/lithium-codegen-arm.cc.cve20143152 2015-04-23 14:51:20.095648219 -0400 ++++ v8-3.14.5.10/src/arm/lithium-codegen-arm.cc 2015-04-23 14:53:28.834149299 -0400 +@@ -3034,7 +3034,8 @@ MemOperand LCodeGen::PrepareKeyedOperand + return MemOperand(base, scratch0(), LSL, shift_size); + } else { + ASSERT_EQ(-1, shift_size); +- return MemOperand(base, scratch0(), LSR, 1); ++ // key can be negative, so using ASR here. ++ return MemOperand(base, scratch0(), ASR, 1); + } + } + diff --git a/v8.spec b/v8.spec index 45b05ec..eb77fb1 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 17%{?dist} +Release: 18%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -118,6 +118,11 @@ Patch17: v8-3.14.5.10-busy-loop.patch # https://codereview.chromium.org/806143002 Patch18: v8-3.14.5.10-profiler-log.patch +# Fix CVE in ARM code +# https://bugzilla.redhat.com/show_bug.cgi?id=1101057 +# https://codereview.chromium.org/219473002 +Patch19: v8-3.4.14-CVE-2014-3152.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -151,6 +156,7 @@ Development headers and libraries for v8. %patch16 -p1 -b .unhandled-ReferenceError %patch17 -p1 -b .busy-loop %patch18 -p1 -b .profiler-log +%patch19 -p1 -b .cve20143152 # Do not need this lying about. rm -rf src/third_party/valgrind @@ -318,6 +324,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Thu Apr 23 2015 Tom Callaway - 1:3.14.5.10-18 +- backport security fix for ARM - CVE-2014-3152 + * Thu Feb 19 2015 T.C. Hollingsworth - 1:3.14.5.10-17 - backports for nodejs 0.10.36 From 5997566d5ea222329840f2424c0278b7a8a3cbb9 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sat, 25 Apr 2015 13:17:14 -0400 Subject: [PATCH 039/100] Remove mp3 support to fix FTBFS, thanks Igor Gnatenko --- MuseScore-2.0.0-remove-mp3-support.patch | 71 ++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 MuseScore-2.0.0-remove-mp3-support.patch diff --git a/MuseScore-2.0.0-remove-mp3-support.patch b/MuseScore-2.0.0-remove-mp3-support.patch new file mode 100644 index 0000000..6517102 --- /dev/null +++ b/MuseScore-2.0.0-remove-mp3-support.patch @@ -0,0 +1,71 @@ +diff -uNr MuseScore-2.0.0/CMakeLists.txt MuseScore-2.0.0.lame/CMakeLists.txt +--- MuseScore-2.0.0/CMakeLists.txt 2015-04-25 17:25:27.105930823 +0300 ++++ MuseScore-2.0.0.lame/CMakeLists.txt 2015-04-25 17:07:45.879356577 +0300 +@@ -44,7 +44,6 @@ + include (UsePkgConfig1) + include (TargetDoc) + include (FindPulseAudio) +-include (FindLame) + include (GetCompilerVersion) + include (CreatePrecompiledHeader) + +@@ -436,7 +435,6 @@ + ${OGG_INCDIR} + ${VORBIS_INCDIR} + ${SNDFILE_INCDIR} +- ${LAME_INCLUDE_DIR} + ) + + ## +diff -uNr MuseScore-2.0.0/mscore/CMakeLists.txt MuseScore-2.0.0.lame/mscore/CMakeLists.txt +--- MuseScore-2.0.0/mscore/CMakeLists.txt 2015-04-25 17:25:27.093930461 +0300 ++++ MuseScore-2.0.0.lame/mscore/CMakeLists.txt 2015-04-25 17:07:32.514973070 +0300 +@@ -226,7 +226,7 @@ + importgtp.cpp importgtp-gp4.cpp importgtp-gp5.cpp importgtp-gp6.cpp fotomode.cpp drumtools.cpp + selinstrument.cpp texteditor.cpp editstafftype.cpp texttools.cpp + editpitch.cpp editstringdata.cpp editraster.cpp pianotools.cpp mediadialog.cpp +- workspace.cpp exportmp3.cpp chordview.cpp ++ workspace.cpp chordview.cpp + album.cpp albummanager.cpp + textstyle.cpp + lineproperties.cpp stafftextproperties.cpp splitstaff.cpp +diff -uNr MuseScore-2.0.0/mscore/file.cpp MuseScore-2.0.0.lame/mscore/file.cpp +--- MuseScore-2.0.0/mscore/file.cpp 2015-03-21 10:32:54.000000000 +0300 ++++ MuseScore-2.0.0.lame/mscore/file.cpp 2015-04-25 17:24:16.761808110 +0300 +@@ -1537,7 +1537,6 @@ + fl.append(tr("FLAC Audio (*.flac)")); + fl.append(tr("Ogg Vorbis Audio (*.ogg)")); + #endif +- fl.append(tr("MP3 Audio (*.mp3)")); + fl.append(tr("Standard MIDI File (*.mid)")); + fl.append(tr("MusicXML File (*.xml)")); + fl.append(tr("Compressed MusicXML File (*.mxl)")); +@@ -1601,7 +1600,6 @@ + fl.append(tr("FLAC Audio (*.flac)")); + fl.append(tr("Ogg Vorbis Audio (*.ogg)")); + #endif +- fl.append(tr("MP3 Audio (*.mp3)")); + fl.append(tr("Standard MIDI File (*.mid)")); + fl.append(tr("MusicXML File (*.xml)")); + fl.append(tr("Compressed MusicXML File (*.mxl)")); +@@ -1797,8 +1795,6 @@ + else if (ext == "wav" || ext == "flac" || ext == "ogg") + rv = saveAudio(cs, fn); + #endif +- else if (ext == "mp3") +- rv = saveMp3(cs, fn); + else if (ext == "spos") { + // save positions of segments + rv = savePositions(cs, fn, true); +diff -uNr MuseScore-2.0.0/mscore/musescore.cpp MuseScore-2.0.0.lame/mscore/musescore.cpp +--- MuseScore-2.0.0/mscore/musescore.cpp 2015-03-21 10:32:54.000000000 +0300 ++++ MuseScore-2.0.0.lame/mscore/musescore.cpp 2015-04-25 17:22:52.616268923 +0300 +@@ -2140,8 +2140,6 @@ + if (fn.endsWith(".wav") || fn.endsWith(".ogg") || fn.endsWith(".flac")) + return mscore->saveAudio(cs, fn); + #endif +- if (fn.endsWith(".mp3")) +- return mscore->saveMp3(cs, fn); + if (fn.endsWith(".spos")) + return savePositions(cs, fn, true); + if (fn.endsWith(".mpos")) From a1a7cfa803733a4dd1f66db15d75791987fc1e98 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 8 Jun 2015 13:20:12 -0400 Subject: [PATCH 040/100] split off python subpackage --- v8.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index eb77fb1..f0672ee 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 18%{?dist} +Release: 19%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -136,6 +136,13 @@ Requires: %{name} = %{epoch}:%{version}-%{release} %description devel Development headers and libraries for v8. +%package python +Summary: Python libraries from v8 +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description python +Python libraries from v8. + %prep %setup -q -n %{name}-%{version} %patch1 -p1 @@ -321,9 +328,14 @@ rm -rf %{buildroot} %dir %{_includedir}/v8/ %{_includedir}/v8/extensions/ %{_libdir}/*.so + +%files python %{python_sitelib}/j*.py* %changelog +* Mon Jun 8 2015 Tom Callaway - 1:3.14.5.10-19 +- split off python subpackage (bz 959145) + * Thu Apr 23 2015 Tom Callaway - 1:3.14.5.10-18 - backport security fix for ARM - CVE-2014-3152 From d7852d38d36b3cff21940934e3036beb5b93804f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:46:42 +0000 Subject: [PATCH 041/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index f0672ee..3094899 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 19%{?dist} +Release: 20%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -333,6 +333,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 1:3.14.5.10-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Jun 8 2015 Tom Callaway - 1:3.14.5.10-19 - split off python subpackage (bz 959145) From b84e0abc555363f8fd5f89c35db4f646a2a3c7ff Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 21 Sep 2015 13:43:43 -0400 Subject: [PATCH 042/100] add REPLACE_INVALID_UTF8 bits for nodejs --- v8-3.14.5.10-REPLACE_INVALID_UTF8.patch | 195 ++++++++++++++++++++++++ v8.spec | 9 +- 2 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 v8-3.14.5.10-REPLACE_INVALID_UTF8.patch diff --git a/v8-3.14.5.10-REPLACE_INVALID_UTF8.patch b/v8-3.14.5.10-REPLACE_INVALID_UTF8.patch new file mode 100644 index 0000000..28db0dd --- /dev/null +++ b/v8-3.14.5.10-REPLACE_INVALID_UTF8.patch @@ -0,0 +1,195 @@ +diff -up v8-3.14.5.10/include/v8.h.riu v8-3.14.5.10/include/v8.h +--- v8-3.14.5.10/include/v8.h.riu 2015-09-21 13:31:44.871068685 -0400 ++++ v8-3.14.5.10/include/v8.h 2015-09-21 13:32:08.884868178 -0400 +@@ -1076,7 +1076,11 @@ class String : public Primitive { + NO_OPTIONS = 0, + HINT_MANY_WRITES_EXPECTED = 1, + NO_NULL_TERMINATION = 2, +- PRESERVE_ASCII_NULL = 4 ++ PRESERVE_ASCII_NULL = 4, ++ // Used by WriteUtf8 to replace orphan surrogate code units with the ++ // unicode replacement character. Needs to be set to guarantee valid UTF-8 ++ // output. ++ REPLACE_INVALID_UTF8 = 8 + }; + + // 16-bit character codes. +diff -up v8-3.14.5.10/src/api.cc.riu v8-3.14.5.10/src/api.cc +--- v8-3.14.5.10/src/api.cc.riu 2015-09-21 13:33:24.604235945 -0400 ++++ v8-3.14.5.10/src/api.cc 2015-09-21 13:37:21.428258540 -0400 +@@ -3759,7 +3759,8 @@ static int RecursivelySerializeToUtf8(i: + int end, + int recursion_budget, + int32_t previous_character, +- int32_t* last_character) { ++ int32_t* last_character, ++ bool replace_invalid_utf8) { + int utf8_bytes = 0; + while (true) { + if (string->IsAsciiRepresentation()) { +@@ -3775,7 +3776,10 @@ static int RecursivelySerializeToUtf8(i: + for (int i = start; i < end; i++) { + uint16_t character = data[i]; + current += +- unibrow::Utf8::Encode(current, character, previous_character); ++ unibrow::Utf8::Encode(current, ++ character, ++ previous_character, ++ replace_invalid_utf8); + previous_character = character; + } + *last_character = previous_character; +@@ -3788,7 +3792,10 @@ static int RecursivelySerializeToUtf8(i: + for (int i = start; i < end; i++) { + uint16_t character = data[i]; + current += +- unibrow::Utf8::Encode(current, character, previous_character); ++ unibrow::Utf8::Encode(current, ++ character, ++ previous_character, ++ replace_invalid_utf8); + previous_character = character; + } + *last_character = previous_character; +@@ -3824,7 +3831,8 @@ static int RecursivelySerializeToUtf8(i: + boundary, + recursion_budget - 1, + previous_character, +- &previous_character); ++ &previous_character, ++ replace_invalid_utf8); + if (extra_utf8_bytes < 0) return extra_utf8_bytes; + buffer += extra_utf8_bytes; + utf8_bytes += extra_utf8_bytes; +@@ -3879,7 +3887,10 @@ int String::WriteUtf8(char* buffer, + return len; + } + +- if (capacity == -1 || capacity / 3 >= string_length) { ++ bool replace_invalid_utf8 = (options & REPLACE_INVALID_UTF8); ++ int max16BitCodeUnitSize = unibrow::Utf8::kMax16BitCodeUnitSize; ++ ++ if (capacity == -1 || capacity / max16BitCodeUnitSize >= string_length) { + int32_t previous = unibrow::Utf16::kNoPreviousCharacter; + const int kMaxRecursion = 100; + int utf8_bytes = +@@ -3889,7 +3900,8 @@ int String::WriteUtf8(char* buffer, + string_length, + kMaxRecursion, + previous, +- &previous); ++ &previous, ++ replace_invalid_utf8); + if (utf8_bytes >= 0) { + // Success serializing with recursion. + if ((options & NO_NULL_TERMINATION) == 0 && +@@ -3942,14 +3954,16 @@ int String::WriteUtf8(char* buffer, + char intermediate[unibrow::Utf8::kMaxEncodedSize]; + for (; i < len && pos < capacity; i++) { + i::uc32 c = write_input_buffer.GetNext(); +- if (unibrow::Utf16::IsTrailSurrogate(c) && +- unibrow::Utf16::IsLeadSurrogate(previous)) { ++ if (unibrow::Utf16::IsSurrogatePair(previous, c)) { + // We can't use the intermediate buffer here because the encoding + // of surrogate pairs is done under assumption that you can step + // back and fix the UTF8 stream. Luckily we only need space for one + // more byte, so there is always space. + ASSERT(pos < capacity); +- int written = unibrow::Utf8::Encode(buffer + pos, c, previous); ++ int written = unibrow::Utf8::Encode(buffer + pos, ++ c, ++ previous, ++ replace_invalid_utf8); + ASSERT(written == 1); + pos += written; + nchars++; +@@ -3957,7 +3971,8 @@ int String::WriteUtf8(char* buffer, + int written = + unibrow::Utf8::Encode(intermediate, + c, +- unibrow::Utf16::kNoPreviousCharacter); ++ unibrow::Utf16::kNoPreviousCharacter, ++ replace_invalid_utf8); + if (pos + written <= capacity) { + for (int j = 0; j < written; j++) { + buffer[pos + j] = intermediate[j]; +diff -up v8-3.14.5.10/src/unicode.h.riu v8-3.14.5.10/src/unicode.h +--- v8-3.14.5.10/src/unicode.h.riu 2015-09-21 13:38:50.617513839 -0400 ++++ v8-3.14.5.10/src/unicode.h 2015-09-21 13:40:32.019667163 -0400 +@@ -117,6 +117,9 @@ class Buffer { + + class Utf16 { + public: ++ static inline bool IsSurrogatePair(int lead, int trail) { ++ return IsLeadSurrogate(lead) && IsTrailSurrogate(trail); ++ } + static inline bool IsLeadSurrogate(int code) { + if (code == kNoPreviousCharacter) return false; + return (code & 0xfc00) == 0xd800; +@@ -152,13 +155,19 @@ class Utf16 { + class Utf8 { + public: + static inline uchar Length(uchar chr, int previous); +- static inline unsigned Encode( +- char* out, uchar c, int previous); ++ static inline unsigned Encode(char* out, ++ uchar c, ++ int previous, ++ bool replace_invalid = false); + static const byte* ReadBlock(Buffer str, byte* buffer, + unsigned capacity, unsigned* chars_read, unsigned* offset); + static uchar CalculateValue(const byte* str, + unsigned length, + unsigned* cursor); ++ ++ ++ // The unicode replacement character, used to signal invalid unicode ++ // sequences (e.g. an orphan surrogate) when converting to a UTF-8 encoding. + static const uchar kBadChar = 0xFFFD; + static const unsigned kMaxEncodedSize = 4; + static const unsigned kMaxOneByteChar = 0x7f; +@@ -170,6 +179,9 @@ class Utf8 { + // that match are coded as a 4 byte UTF-8 sequence. + static const unsigned kBytesSavedByCombiningSurrogates = 2; + static const unsigned kSizeOfUnmatchedSurrogate = 3; ++ // The maximum size a single UTF-16 code unit may take up when encoded as ++ // UTF-8. ++ static const unsigned kMax16BitCodeUnitSize = 3; + + private: + template friend class Utf8InputBuffer; +diff -up v8-3.14.5.10/src/unicode-inl.h.riu v8-3.14.5.10/src/unicode-inl.h +--- v8-3.14.5.10/src/unicode-inl.h.riu 2015-09-21 13:37:36.002136853 -0400 ++++ v8-3.14.5.10/src/unicode-inl.h 2015-09-21 13:38:41.566589411 -0400 +@@ -79,7 +79,10 @@ template int Mapping> 12); + str[1] = 0x80 | ((c >> 6) & kMask); diff --git a/v8.spec b/v8.spec index 3094899..4e389eb 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 20%{?dist} +Release: 21%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -123,6 +123,9 @@ Patch18: v8-3.14.5.10-profiler-log.patch # https://codereview.chromium.org/219473002 Patch19: v8-3.4.14-CVE-2014-3152.patch +# Add REPLACE_INVALID_UTF8 handling that nodejs needs +Patch20: v8-3.14.5.10-REPLACE_INVALID_UTF8.patch + %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript @@ -164,6 +167,7 @@ Python libraries from v8. %patch17 -p1 -b .busy-loop %patch18 -p1 -b .profiler-log %patch19 -p1 -b .cve20143152 +%patch20 -p1 -b .riu # Do not need this lying about. rm -rf src/third_party/valgrind @@ -333,6 +337,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon Sep 21 2015 Tom Callaway - 1:3.14.5.10-21 +- add REPLACE_INVALID_UTF8 code needed for nodejs + * Fri Jun 19 2015 Fedora Release Engineering - 1:3.14.5.10-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 6b5bab3aae87299aebc009ed86de64846b5bd88d Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 28 Oct 2015 14:09:04 +0100 Subject: [PATCH 043/100] rebuild for ICU 56.1 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 4e389eb..af0e463 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 21%{?dist} +Release: 22%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -337,6 +337,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Wed Oct 28 2015 David Tardon - 1:3.14.5.10-22 +- rebuild for ICU 56.1 + * Mon Sep 21 2015 Tom Callaway - 1:3.14.5.10-21 - add REPLACE_INVALID_UTF8 code needed for nodejs From 7ae6b86b4ae5d9c831d772ab818a077c21450d5d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 22 Dec 2015 00:43:40 +0100 Subject: [PATCH 044/100] Revert "Remove mp3 support to fix FTBFS, thanks Igor Gnatenko" This reverts commit 5997566d5ea222329840f2424c0278b7a8a3cbb9. This is a patch for MuseScore, not v8. --- MuseScore-2.0.0-remove-mp3-support.patch | 71 ------------------------ 1 file changed, 71 deletions(-) delete mode 100644 MuseScore-2.0.0-remove-mp3-support.patch diff --git a/MuseScore-2.0.0-remove-mp3-support.patch b/MuseScore-2.0.0-remove-mp3-support.patch deleted file mode 100644 index 6517102..0000000 --- a/MuseScore-2.0.0-remove-mp3-support.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -uNr MuseScore-2.0.0/CMakeLists.txt MuseScore-2.0.0.lame/CMakeLists.txt ---- MuseScore-2.0.0/CMakeLists.txt 2015-04-25 17:25:27.105930823 +0300 -+++ MuseScore-2.0.0.lame/CMakeLists.txt 2015-04-25 17:07:45.879356577 +0300 -@@ -44,7 +44,6 @@ - include (UsePkgConfig1) - include (TargetDoc) - include (FindPulseAudio) --include (FindLame) - include (GetCompilerVersion) - include (CreatePrecompiledHeader) - -@@ -436,7 +435,6 @@ - ${OGG_INCDIR} - ${VORBIS_INCDIR} - ${SNDFILE_INCDIR} -- ${LAME_INCLUDE_DIR} - ) - - ## -diff -uNr MuseScore-2.0.0/mscore/CMakeLists.txt MuseScore-2.0.0.lame/mscore/CMakeLists.txt ---- MuseScore-2.0.0/mscore/CMakeLists.txt 2015-04-25 17:25:27.093930461 +0300 -+++ MuseScore-2.0.0.lame/mscore/CMakeLists.txt 2015-04-25 17:07:32.514973070 +0300 -@@ -226,7 +226,7 @@ - importgtp.cpp importgtp-gp4.cpp importgtp-gp5.cpp importgtp-gp6.cpp fotomode.cpp drumtools.cpp - selinstrument.cpp texteditor.cpp editstafftype.cpp texttools.cpp - editpitch.cpp editstringdata.cpp editraster.cpp pianotools.cpp mediadialog.cpp -- workspace.cpp exportmp3.cpp chordview.cpp -+ workspace.cpp chordview.cpp - album.cpp albummanager.cpp - textstyle.cpp - lineproperties.cpp stafftextproperties.cpp splitstaff.cpp -diff -uNr MuseScore-2.0.0/mscore/file.cpp MuseScore-2.0.0.lame/mscore/file.cpp ---- MuseScore-2.0.0/mscore/file.cpp 2015-03-21 10:32:54.000000000 +0300 -+++ MuseScore-2.0.0.lame/mscore/file.cpp 2015-04-25 17:24:16.761808110 +0300 -@@ -1537,7 +1537,6 @@ - fl.append(tr("FLAC Audio (*.flac)")); - fl.append(tr("Ogg Vorbis Audio (*.ogg)")); - #endif -- fl.append(tr("MP3 Audio (*.mp3)")); - fl.append(tr("Standard MIDI File (*.mid)")); - fl.append(tr("MusicXML File (*.xml)")); - fl.append(tr("Compressed MusicXML File (*.mxl)")); -@@ -1601,7 +1600,6 @@ - fl.append(tr("FLAC Audio (*.flac)")); - fl.append(tr("Ogg Vorbis Audio (*.ogg)")); - #endif -- fl.append(tr("MP3 Audio (*.mp3)")); - fl.append(tr("Standard MIDI File (*.mid)")); - fl.append(tr("MusicXML File (*.xml)")); - fl.append(tr("Compressed MusicXML File (*.mxl)")); -@@ -1797,8 +1795,6 @@ - else if (ext == "wav" || ext == "flac" || ext == "ogg") - rv = saveAudio(cs, fn); - #endif -- else if (ext == "mp3") -- rv = saveMp3(cs, fn); - else if (ext == "spos") { - // save positions of segments - rv = savePositions(cs, fn, true); -diff -uNr MuseScore-2.0.0/mscore/musescore.cpp MuseScore-2.0.0.lame/mscore/musescore.cpp ---- MuseScore-2.0.0/mscore/musescore.cpp 2015-03-21 10:32:54.000000000 +0300 -+++ MuseScore-2.0.0.lame/mscore/musescore.cpp 2015-04-25 17:22:52.616268923 +0300 -@@ -2140,8 +2140,6 @@ - if (fn.endsWith(".wav") || fn.endsWith(".ogg") || fn.endsWith(".flac")) - return mscore->saveAudio(cs, fn); - #endif -- if (fn.endsWith(".mp3")) -- return mscore->saveMp3(cs, fn); - if (fn.endsWith(".spos")) - return savePositions(cs, fn, true); - if (fn.endsWith(".mpos")) From 45ab8c38e32e31b4d57614bd6c3c326d1bc1161a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 02:30:34 +0000 Subject: [PATCH 045/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index af0e463..0f7a593 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 22%{?dist} +Release: 23%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -337,6 +337,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 1:3.14.5.10-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Oct 28 2015 David Tardon - 1:3.14.5.10-22 - rebuild for ICU 56.1 From 3875347460004455e37f5b9877c9a4d0a544dc01 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 15 Apr 2016 20:16:57 +0200 Subject: [PATCH 046/100] rebuild for ICU 57.1 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 0f7a593..cbe6b98 100644 --- a/v8.spec +++ b/v8.spec @@ -23,7 +23,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 23%{?dist} +Release: 24%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -337,6 +337,9 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Fri Apr 15 2016 David Tardon - 1:3.14.5.10-24 +- rebuild for ICU 57.1 + * Fri Feb 05 2016 Fedora Release Engineering - 1:3.14.5.10-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 0ae0a878fc51406ab49a2eafe997a0979a762b35 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 9 May 2016 11:27:21 -0400 Subject: [PATCH 047/100] update to current code, disable arm --- .gitignore | 1 + sources | 2 +- v8-4.10.91-system_icu.patch | 14 ++ v8-5.2.197-readdir-fix.patch | 27 +++ v8.spec | 352 +++++++++++------------------------ 5 files changed, 155 insertions(+), 241 deletions(-) create mode 100644 v8-4.10.91-system_icu.patch create mode 100644 v8-5.2.197-readdir-fix.patch diff --git a/.gitignore b/.gitignore index 6acdc49..19255d4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /v8-3.14.5.7.tar.bz2 /v8-3.14.5.8.tar.bz2 /v8-3.14.5.10.tar.bz2 +/v8-5.2.258.tar.bz2 diff --git a/sources b/sources index 0ed3ff1..2c6f571 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d4e3a038ad387fd7b75d40a89e231ef7 v8-3.14.5.10.tar.bz2 +85331dbae19990a016e478e7761229ef v8-5.2.258.tar.bz2 diff --git a/v8-4.10.91-system_icu.patch b/v8-4.10.91-system_icu.patch new file mode 100644 index 0000000..9ff86c0 --- /dev/null +++ b/v8-4.10.91-system_icu.patch @@ -0,0 +1,14 @@ +diff -up v8-4.10.91/Makefile.system_icu v8-4.10.91/Makefile +--- v8-4.10.91/Makefile.system_icu 2016-01-27 17:20:20.554136527 -0500 ++++ v8-4.10.91/Makefile 2016-01-27 17:21:03.377907390 -0500 +@@ -44,6 +44,10 @@ endif + ifdef component + GYPFLAGS += -Dcomponent=$(component) + endif ++# system_icu=on ++ifeq ($(system_icu), on) ++ GYPFLAGS += -Duse_system_icu=1 ++endif + # disassembler=on + ifeq ($(disassembler), on) + GYPFLAGS += -Dv8_enable_disassembler=1 diff --git a/v8-5.2.197-readdir-fix.patch b/v8-5.2.197-readdir-fix.patch new file mode 100644 index 0000000..b133d59 --- /dev/null +++ b/v8-5.2.197-readdir-fix.patch @@ -0,0 +1,27 @@ +diff -up v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc.readdir v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc +--- v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc.readdir 2016-05-02 09:47:32.000000000 -0400 ++++ v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc 2016-05-02 15:42:49.961046560 -0400 +@@ -20,6 +20,8 @@ + #include + #endif + ++#include ++ + using v8::internal::interpreter::BytecodeExpectationsPrinter; + + #define REPORT_ERROR(MESSAGE) (((std::cerr << "ERROR: ") << MESSAGE) << '\n') +@@ -174,10 +176,12 @@ bool CollectGoldenFiles(std::vectord_name, ".golden")) { + std::string golden_filename(kGoldenFilesPath); + golden_filename += entry->d_name; diff --git a/v8.spec b/v8.spec index cbe6b98..3684b05 100644 --- a/v8.spec +++ b/v8.spec @@ -13,118 +13,40 @@ # For the 1.2 branch, we use 0s here # For 1.3+, we use the three digit versions # Hey, now there are four digits. What do they mean? Popsicle. -%global somajor 3 -%global sominor 14 -%global sobuild 5 -%global sotiny 10 +# Now there are three digits. Yeah. HOW ABOUT DEM APPLES?!? +%global somajor 5 +%global sominor 2 +%global sobuild 258 %global sover %{somajor}.%{sominor}.%{sobuild} -# %%global svnver 20110721svn8716 - Name: v8 -Version: %{somajor}.%{sominor}.%{sobuild}.%{sotiny} -Release: 24%{?dist} +Version: %{somajor}.%{sominor}.%{sobuild} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries License: BSD -URL: http://code.google.com/p/v8 -Source0: http://commondatastorage.googleapis.com/chromium-browser-official/v8-%{version}.tar.bz2 -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 - -#backport fix for CVE-2013-2882 (RHBZ#991116) -Patch2: v8-3.14.5.10-CVE-2013-2882.patch - -#backport fix for CVE-2013-6640 (RHBZ#1039889) -Patch3: v8-3.14.5.10-CVE-2013-6640.patch - -#backport fix for enumeration for objects with lots of properties -# https://codereview.chromium.org/11362182 -Patch4: v8-3.14.5.10-enumeration.patch - -#backport fix for CVE-2013-6640 (RHBZ#1059070) -Patch5: v8-3.14.5.10-CVE-2013-6650.patch - -#backport only applicable fix for CVE-2014-1704 (RHBZ#1077136) -#the other two patches don't affect this version of v8 -Patch6: v8-3.14.5.10-CVE-2014-1704-1.patch - -# use clock_gettime() instead of gettimeofday(), which increases performance -# dramatically on virtual machines -# https://github.com/joyent/node/commit/f9ced08de30c37838756e8227bd091f80ad9cafa -# see above link or head of patch for complete rationale -Patch7: v8-3.14.5.10-use-clock_gettime.patch - -# fix corner case in x64 compare stubs -# fixes bug resulting in an incorrect result when comparing certain integers -# (e.g. 2147483647 > -2147483648 is false instead of true) -# https://code.google.com/p/v8/issues/detail?id=2416 -# https://github.com/joyent/node/issues/7528 -Patch8: v8-3.14.5.10-x64-compare-stubs.patch - -# backport security fix for memory corruption/stack overflow (RHBZ#1125464) -# https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ -# https://github.com/joyent/node/commit/530af9cb8e700e7596b3ec812bad123c9fa06356 -Patch9: v8-3.14.5.10-mem-corruption-stack-overflow.patch - -# backport bugfix for x64 MathMinMax: -# Fix x64 MathMinMax for negative untagged int32 arguments. -# An untagged int32 has zeros in the upper half even if it is negative. -# Using cmpq to compare such numbers will incorrectly ignore the sign. -# https://github.com/joyent/node/commit/3530fa9cd09f8db8101c4649cab03bcdf760c434 -Patch10: v8-3.14.5.10-x64-MathMinMax.patch - -# backport bugfix that eliminates unused-local-typedefs warning -# https://github.com/joyent/node/commit/53b4accb6e5747b156be91a2b90f42607e33a7cc -Patch11: v8-3.14.5.10-unused-local-typedefs.patch - -# backport security fix: Fix Hydrogen bounds check elimination -# resolves CVE-2013-6668 (RHBZ#1086120) -# https://github.com/joyent/node/commit/fd80a31e0697d6317ce8c2d289575399f4e06d21 -Patch12: v8-3.14.5.10-CVE-2013-6668.patch - -# backport fix to segfault caused by the above 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 - -# Fix issues with abort on uncaught exception -# https://github.com/joyent/node/pull/8666 -# https://github.com/joyent/node/issues/8631 -# https://github.com/joyent/node/issues/8630 -Patch15: v8-3.14.5.10-abort-uncaught-exception.patch - -# Fix unhandled ReferenceError in debug-debugger.js -# https://github.com/joyent/node/commit/0ff51c6e063e3eea9e4d9ea68edc82d935626fc7 -# https://codereview.chromium.org/741683002 -Patch16: v8-3.14.5.10-unhandled-ReferenceError.patch - -# Don't busy loop in CPU profiler thread -# https://github.com/joyent/node/pull/8789 -Patch17: v8-3.14.5.10-busy-loop.patch - -# Log V8 version in profiler log file -# (needed for compatibility with profiler tools) -# https://github.com/joyent/node/pull/9043 -# https://codereview.chromium.org/806143002 -Patch18: v8-3.14.5.10-profiler-log.patch - -# Fix CVE in ARM code -# https://bugzilla.redhat.com/show_bug.cgi?id=1101057 -# https://codereview.chromium.org/219473002 -Patch19: v8-3.4.14-CVE-2014-3152.patch - -# Add REPLACE_INVALID_UTF8 handling that nodejs needs -Patch20: v8-3.14.5.10-REPLACE_INVALID_UTF8.patch +URL: https://chromium.googlesource.com/v8/v8/ +# To make the source, you need to have depot_tools installed and in your PATH +# https://chromium.googlesource.com/chromium/tools/depot_tools.git/+archive/7e7a454f9afdddacf63e10be48f0eab603be654e.tar.gz +# Note that the depot_tools tarball above does not unpack into its own directory. +# mkdir v8-tmp +# cd v8-tmp +# fetch v8 +# cd v8 +# git checkout 5.2.258 +# gclient sync +# cd .. +# mv v8 v8-5.2.258 +# tar cfj v8-5.2.258.tar.bz2 v8-5.2.258 +Source0: v8-5.2.258.tar.bz2 +Patch0: v8-4.10.91-system_icu.patch +Patch1: v8-5.2.197-readdir-fix.patch +# arm is excluded because of bz1334406 +ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x +BuildRequires: readline-devel, libicu-devel +BuildRequires: python2-devel +BuildRequires: clang %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -148,29 +70,18 @@ Python libraries from v8. %prep %setup -q -n %{name}-%{version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -b .system-valgrind -%patch15 -p1 -b .abort-uncaught-exception -%patch16 -p1 -b .unhandled-ReferenceError -%patch17 -p1 -b .busy-loop -%patch18 -p1 -b .profiler-log -%patch19 -p1 -b .cve20143152 -%patch20 -p1 -b .riu +%patch0 -p1 -b .system_icu +%patch1 -p1 -b .readdir -# Do not need this lying about. -rm -rf src/third_party/valgrind +# Use system header ... except it doesn't work. +# rm -rf src/third_party/valgrind/valgrind.h +# ln -s /usr/include/valgrind/valgrind.h src/third_party/valgrind/valgrind.h + +# What? *sigh* +rm -rf third_party/binutils/Linux_x64/Release/bin/ld.gold +ln -s /usr/bin/ld.gold third_party/binutils/Linux_x64/Release/bin/ld.gold +rm -rf third_party/llvm-build/Release+Asserts/bin/clang +ln -s /usr/bin/clang third_party/llvm-build/Release+Asserts/bin/clang #Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) %if (0%{?rhel} > 6 || 0%{?fedora} > 18) @@ -179,131 +90,86 @@ rm -rf src/third_party/valgrind %global lrt -lrt %endif -# -fno-strict-aliasing is needed with gcc 4.4 to get past some ugly code -PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS %{lrt} -fPIC -fno-strict-aliasing -Wno-unused-parameter -Wno-error=strict-overflow -Wno-unused-but-set-variable\'| sed "s/ /',/g" | sed "s/',/', '/g"` -sed -i "s|'-O3',|$PARSED_OPT_FLAGS,|g" SConstruct - -# clear spurious executable bits -find . \( -name \*.cc -o -name \*.h -o -name \*.py \) -a -executable \ - |while read FILE ; do - echo $FILE - chmod -x $FILE - done +for i in `grep -rl "Wno-undefined-var-template" *`; do + sed -i 's|-Wno-undefined-var-template||g' $i +done %build -mkdir -p obj/release/ -export GCC_VERSION="44" - -# SCons is going away, but for now build with -# I_know_I_should_build_with_GYP=yes -scons library=shared snapshots=on \ %ifarch x86_64 -arch=x64 \ -%endif -%ifarch armv7hl armv7hnl -armeabi=hard \ -%endif -%ifarch armv5tel armv6l armv7l -armeabi=soft \ -%endif -visibility=default \ -env=CCFLAGS:"-fPIC" \ -I_know_I_should_build_with_GYP=yes - -%if 0%{?fedora} >= 16 -export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu-i18n` -%else -export ICU_LINK_FLAGS=`pkg-config --libs-only-l icu` -%endif - -# When will people learn to create versioned shared libraries by default? -# first, lets get rid of the old .so file -rm -rf libv8.so libv8preparser.so -# Now, lets make it right. -g++ $RPM_OPT_FLAGS -fPIC -o libv8preparser.so.%{sover} -shared -Wl,-soname,libv8preparser.so.%{somajor} \ - obj/release/allocation.os \ - obj/release/bignum.os \ - obj/release/bignum-dtoa.os \ - obj/release/cached-powers.os \ - obj/release/diy-fp.os \ - obj/release/dtoa.os \ - obj/release/fast-dtoa.os \ - obj/release/fixed-dtoa.os \ - obj/release/preparse-data.os \ - obj/release/preparser-api.os \ - obj/release/preparser.os \ - obj/release/scanner.os \ - obj/release/strtod.os \ - obj/release/token.os \ - obj/release/unicode.os \ - obj/release/utils.os - -# "obj/release/preparser-api.os" should not be included in the libv8.so file. -export RELEASE_BUILD_OBJS=`echo obj/release/*.os | sed 's|obj/release/preparser-api.os||g'` - -%ifarch %{arm} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/arm/*.os $ICU_LINK_FLAGS +%global v8arch x64 %endif %ifarch %{ix86} -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/ia32/*.os $ICU_LINK_FLAGS +%global v8arch ia32 %endif -%ifarch x86_64 -g++ $RPM_OPT_FLAGS -fPIC -o libv8.so.%{sover} -shared -Wl,-soname,libv8.so.%{somajor} $RELEASE_BUILD_OBJS obj/release/extensions/*.os obj/release/x64/*.os $ICU_LINK_FLAGS +%ifarch %{arm} +%global v8arch arm +%endif +%ifarch aarch64 +%global v8arch arm64 +%endif +%ifarch mips +%global v8arch mips +%endif +%ifarch mipsel +%global v8arch mipsel +%endif +%ifarch mips64 +%global v8arch mips64 +%endif +%ifarch mips64el +%global v8arch mips64el +%endif +%ifarch ppc +%global v8arch ppc +%endif +%ifarch ppc64 +%global v8arch ppc64 +%endif +%ifarch s390 +%global v8arch s390 +%endif +%ifarch s390x +%global v8arch s390x %endif -# We need to do this so d8 can link against it. -ln -sf libv8.so.%{sover} libv8.so -ln -sf libv8preparser.so.%{sover} libv8preparser.so - -# This will fail to link d8 because it doesn't use the icu libs. -# Don't build d8 shared. Stupid Google. Hate. -# SCons is going away, but for now build with -# I_know_I_should_build_with_GYP=yes -scons d8 \ -I_know_I_should_build_with_GYP=yes \ -%ifarch x86_64 -arch=x64 \ -%endif +make %{v8arch}.release \ %ifarch armv7hl armv7hnl -armeabi=hard \ +armfloatabi=hard \ %endif %ifarch armv5tel armv6l armv7l -armeabi=soft \ +armfloatabi=softfp \ %endif -snapshots=on console=readline visibility=default || : -# library=shared snapshots=on console=readline visibility=default || : - -# Sigh. I f*****g hate scons. -# But gyp is worse. -# rm -rf d8 - -# g++ $RPM_OPT_FLAGS -o d8 obj/release/d8.os -lreadline -lpthread -L. -lv8 $ICU_LINK_FLAGS +system_icu=on \ +soname_version=%{somajor} \ +snapshot=off \ +CC=%{_bindir}/clang \ +CXX=%{_bindir}/clang++ \ +V=1 \ +library=shared %{?_smp_mflags} %install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_includedir} +pushd out/%{v8arch}.release +# library first mkdir -p %{buildroot}%{_libdir} -install -p include/*.h %{buildroot}%{_includedir} -install -p libv8.so.%{sover} %{buildroot}%{_libdir} -install -p libv8preparser.so.%{sover} %{buildroot}%{_libdir} +cp -a lib.target/libv8.so.%{somajor} %{buildroot}%{_libdir} +# Next, binaries mkdir -p %{buildroot}%{_bindir} install -p -m0755 d8 %{buildroot}%{_bindir} - -pushd %{buildroot}%{_libdir} -ln -sf libv8.so.%{sover} libv8.so -ln -sf libv8.so.%{sover} libv8.so.%{somajor} -ln -sf libv8.so.%{sover} libv8.so.%{somajor}.%{sominor} -ln -sf libv8preparser.so.%{sover} libv8preparser.so -ln -sf libv8preparser.so.%{sover} libv8preparser.so.%{somajor} -ln -sf libv8preparser.so.%{sover} libv8preparser.so.%{somajor}.%{sominor} +# install -p -m0755 mksnapshot %{buildroot}%{_bindir} +install -p -m0755 parser_fuzzer %{buildroot}%{_bindir} popd - -chmod -x %{buildroot}%{_includedir}/v8*.h - +# Now, headers +mkdir -p %{buildroot}%{_includedir} +install -p include/*.h %{buildroot}%{_includedir} +cp -a include/libplatform %{buildroot}%{_includedir} +# Are these still useful? mkdir -p %{buildroot}%{_includedir}/v8/extensions/ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ -chmod -x %{buildroot}%{_includedir}/v8/extensions/*.h +# Make shared library links +pushd %{buildroot}%{_libdir} +ln -sf libv8.so.%{somajor} libv8.so +popd # install Python JS minifier scripts for nodejs install -d %{buildroot}%{python_sitelib} @@ -313,22 +179,21 @@ install -p -m0744 tools/jsmin.py %{buildroot}%{python_sitelib}/ install -p -m0744 tools/js2c.py %{buildroot}%{python_sitelib}/ chmod -R -x %{buildroot}%{python_sitelib}/*.py* -%clean -rm -rf %{buildroot} - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog LICENSE +%license LICENSE +%doc AUTHORS ChangeLog %{_bindir}/d8 +# %%{_bindir}/mksnapshot +%{_bindir}/parser_fuzzer %{_libdir}/*.so.* %files devel -%defattr(-,root,root,-) %{_includedir}/*.h +%{_includedir}/libplatform/ %dir %{_includedir}/v8/ %{_includedir}/v8/extensions/ %{_libdir}/*.so @@ -337,6 +202,13 @@ rm -rf %{buildroot} %{python_sitelib}/j*.py* %changelog +* Mon May 9 2016 Tom Callaway - 1:5.2.258-1 +- update to 5.2.258 + +* Mon May 2 2016 Tom Callaway - 1:5.2.197-1 +- update to 5.2.197 +- WELCOME TO THE WORLD OF TOMORROW + * Fri Apr 15 2016 David Tardon - 1:3.14.5.10-24 - rebuild for ICU 57.1 @@ -511,16 +383,16 @@ rm -rf %{buildroot} * Tue Aug 24 2010 Tom "spot" Callaway 2.3.10-1.20100824svn5332 - update to 2.3.10, svn5332 -* Thu Aug 18 2010 Tom "spot" Callaway 2.3.9-1.20100819svn5308 +* Wed Aug 18 2010 Tom "spot" Callaway 2.3.9-1.20100819svn5308 - update to 2.3.9, svn5308 -* Thu Aug 11 2010 Tom "spot" Callaway 2.3.7-1.20100812svn5251 +* Wed Aug 11 2010 Tom "spot" Callaway 2.3.7-1.20100812svn5251 - update to svn5251 * Wed Aug 11 2010 Tom "spot" Callaway 2.3.7-1.20100811svn5248 - update to 2.3.7, svn5248 -* Mon Aug 10 2010 Tom "spot" Callaway 2.3.6-1.20100809svn5217 +* Tue Aug 10 2010 Tom "spot" Callaway 2.3.6-1.20100809svn5217 - update to 2.3.6, svn5217 * Fri Aug 6 2010 Tom "spot" Callaway 2.3.5-1.20100806svn5198 From 8aeaf438e825157c5966ddb93df6a79312b7a7f6 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 13 May 2016 15:41:57 -0400 Subject: [PATCH 048/100] use optflags, except for the hardening script which clang has no idea what to do with --- v8.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 3684b05..6ee82b5 100644 --- a/v8.spec +++ b/v8.spec @@ -1,3 +1,6 @@ +# clang doesn't understand hardening, specifically "-specs=" +%global clang_optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 ||g') + # Hi Googlers! If you're looking in here for patches, nifty. # You (and everyone else) are welcome to use any of my Chromium spec files and # patches under the terms of the GPLv2 or later. @@ -21,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -144,6 +147,8 @@ soname_version=%{somajor} \ snapshot=off \ CC=%{_bindir}/clang \ CXX=%{_bindir}/clang++ \ +CFLAGS="%{clang_optflags}" \ +CXXFLAGS="%{clang_optflags}" \ V=1 \ library=shared %{?_smp_mflags} @@ -202,6 +207,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Fri May 13 2016 Tom Callaway - 1:5.2.258-2 +- build with optflags, except for the hardening script which clang has no idea what to do with + * Mon May 9 2016 Tom Callaway - 1:5.2.258-1 - update to 5.2.258 From 23ce95dd8a50ccfc1e6caa3cd5f7e910c3a2e082 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 13:05:42 +0000 Subject: [PATCH 049/100] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 6ee82b5..cd3df1f 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -207,6 +207,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 1:5.2.258-3 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Fri May 13 2016 Tom Callaway - 1:5.2.258-2 - build with optflags, except for the hardening script which clang has no idea what to do with From ef6678d5fd9de19b909808d14885157eab4f5733 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 26 Sep 2016 13:36:30 -0400 Subject: [PATCH 050/100] set snapshot=external to enable blob creation, include blobs, static libraries --- v8.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/v8.spec b/v8.spec index cd3df1f..796e860 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -144,7 +144,7 @@ armfloatabi=softfp \ %endif system_icu=on \ soname_version=%{somajor} \ -snapshot=off \ +snapshot=external \ CC=%{_bindir}/clang \ CXX=%{_bindir}/clang++ \ CFLAGS="%{clang_optflags}" \ @@ -157,12 +157,17 @@ pushd out/%{v8arch}.release # library first mkdir -p %{buildroot}%{_libdir} cp -a lib.target/libv8.so.%{somajor} %{buildroot}%{_libdir} +# Now, the static libraries that some/most/all v8 applications also need to link against. +cp -a obj.target/src/libv8/libv8*.a %{buildroot}%{_libdir} # Next, binaries mkdir -p %{buildroot}%{_bindir} install -p -m0755 d8 %{buildroot}%{_bindir} # install -p -m0755 mksnapshot %{buildroot}%{_bindir} install -p -m0755 parser_fuzzer %{buildroot}%{_bindir} popd +# BLOBS! (Don't stress. They get built out of source code.) +install -p natives_blob.bin snapshot_blob.bin %{buildroot}%{_libdir} + # Now, headers mkdir -p %{buildroot}%{_includedir} install -p include/*.h %{buildroot}%{_includedir} @@ -195,6 +200,7 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* # %%{_bindir}/mksnapshot %{_bindir}/parser_fuzzer %{_libdir}/*.so.* +%{_libdir}/*.bin %files devel %{_includedir}/*.h @@ -202,11 +208,16 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %dir %{_includedir}/v8/ %{_includedir}/v8/extensions/ %{_libdir}/*.so +%{_libdir}/*.a %files python %{python_sitelib}/j*.py* %changelog +* Mon Sep 26 2016 Tom Callaway - 1:5.2.258-4 +- set snapshot=external to enable blob creation +- include blobs, static libraries + * Tue Jul 19 2016 Fedora Release Engineering - 1:5.2.258-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages From d9db6a5db8518ac9f1c976a4f10369a2dc8bc691 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 26 Sep 2016 13:58:52 -0400 Subject: [PATCH 051/100] strip hardening out of optflags correctly --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 796e860..1f214f5 100644 --- a/v8.spec +++ b/v8.spec @@ -1,5 +1,5 @@ # clang doesn't understand hardening, specifically "-specs=" -%global clang_optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 ||g') +%global clang_optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1||g') # Hi Googlers! If you're looking in here for patches, nifty. # You (and everyone else) are welcome to use any of my Chromium spec files and From 16aab537a0b6b13da3210a440bfc05e70f5be424 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 27 Sep 2016 12:53:12 -0400 Subject: [PATCH 052/100] fix copy command --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 1f214f5..bf70560 100644 --- a/v8.spec +++ b/v8.spec @@ -158,7 +158,7 @@ pushd out/%{v8arch}.release mkdir -p %{buildroot}%{_libdir} cp -a lib.target/libv8.so.%{somajor} %{buildroot}%{_libdir} # Now, the static libraries that some/most/all v8 applications also need to link against. -cp -a obj.target/src/libv8/libv8*.a %{buildroot}%{_libdir} +cp -a obj.target/src/libv8_*.a %{buildroot}%{_libdir} # Next, binaries mkdir -p %{buildroot}%{_bindir} install -p -m0755 d8 %{buildroot}%{_bindir} From c219b322d47fe3c496eec11168e17ed067d78b7c Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 27 Sep 2016 13:29:15 -0400 Subject: [PATCH 053/100] copy blobs before popd --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index bf70560..4e4bf9b 100644 --- a/v8.spec +++ b/v8.spec @@ -164,9 +164,9 @@ mkdir -p %{buildroot}%{_bindir} install -p -m0755 d8 %{buildroot}%{_bindir} # install -p -m0755 mksnapshot %{buildroot}%{_bindir} install -p -m0755 parser_fuzzer %{buildroot}%{_bindir} -popd # BLOBS! (Don't stress. They get built out of source code.) install -p natives_blob.bin snapshot_blob.bin %{buildroot}%{_libdir} +popd # Now, headers mkdir -p %{buildroot}%{_includedir} From 3f77d2b135385df4c90efd255ce46d1b615658f3 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 10 Oct 2016 16:01:33 -0400 Subject: [PATCH 054/100] add support for bundledbinutils option to Makefile, then use it to disable thin static libs --- v8-5.2.258-bundled-binutils.patch | 16 ++++++++++++++++ v8.spec | 12 +++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 v8-5.2.258-bundled-binutils.patch diff --git a/v8-5.2.258-bundled-binutils.patch b/v8-5.2.258-bundled-binutils.patch new file mode 100644 index 0000000..e80e5f1 --- /dev/null +++ b/v8-5.2.258-bundled-binutils.patch @@ -0,0 +1,16 @@ +diff -up v8-5.2.258/Makefile.bb v8-5.2.258/Makefile +--- v8-5.2.258/Makefile.bb 2016-10-10 14:57:17.275968725 -0400 ++++ v8-5.2.258/Makefile 2016-10-10 14:58:37.012406994 -0400 +@@ -37,6 +37,12 @@ NACL_SDK_ROOT ?= + + # Special build flags. Use them like this: "make library=shared" + ++# bundledbinutils=off ++ifeq ($(bundledbinutils), off) ++ GYPFLAGS += -Dlinux_use_bundled_binutils=0 ++else ++ GYPFLAGS += -Dlinux_use_bundled_binutils=1 ++endif + # library=shared || component=shared_library + ifeq ($(library), shared) + GYPFLAGS += -Dcomponent=shared_library diff --git a/v8.spec b/v8.spec index 4e4bf9b..c1b708f 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -45,6 +45,7 @@ URL: https://chromium.googlesource.com/v8/v8/ Source0: v8-5.2.258.tar.bz2 Patch0: v8-4.10.91-system_icu.patch Patch1: v8-5.2.197-readdir-fix.patch +Patch2: v8-5.2.258-bundled-binutils.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel @@ -75,6 +76,7 @@ Python libraries from v8. %setup -q -n %{name}-%{version} %patch0 -p1 -b .system_icu %patch1 -p1 -b .readdir +%patch2 -p1 -b .bb # Use system header ... except it doesn't work. # rm -rf src/third_party/valgrind/valgrind.h @@ -145,12 +147,13 @@ armfloatabi=softfp \ system_icu=on \ soname_version=%{somajor} \ snapshot=external \ +library=shared %{?_smp_mflags} \ +bundledbinutils=off \ CC=%{_bindir}/clang \ CXX=%{_bindir}/clang++ \ CFLAGS="%{clang_optflags}" \ CXXFLAGS="%{clang_optflags}" \ -V=1 \ -library=shared %{?_smp_mflags} +V=1 %install pushd out/%{v8arch}.release @@ -214,6 +217,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Mon Oct 10 2016 Tom Callaway - 1:5.2.258-5 +- add bundledbinutils option to Makefile to disable "thin" static libs + * Mon Sep 26 2016 Tom Callaway - 1:5.2.258-4 - set snapshot=external to enable blob creation - include blobs, static libraries From d64977831877462da9cf08bc8f530b84efecdd22 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 13 Oct 2016 15:46:15 -0400 Subject: [PATCH 055/100] rebuild with smaller tarball --- .gitignore | 1 + sources | 2 +- v8.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 19255d4..6fb5bc1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /v8-3.14.5.8.tar.bz2 /v8-3.14.5.10.tar.bz2 /v8-5.2.258.tar.bz2 +/v8-5.2.258.tar.xz diff --git a/sources b/sources index 2c6f571..852bfba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -85331dbae19990a016e478e7761229ef v8-5.2.258.tar.bz2 +2cff9f156d8339086629489cf89e0a93 v8-5.2.258.tar.xz diff --git a/v8.spec b/v8.spec index c1b708f..85e5b7c 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -41,8 +41,8 @@ URL: https://chromium.googlesource.com/v8/v8/ # gclient sync # cd .. # mv v8 v8-5.2.258 -# tar cfj v8-5.2.258.tar.bz2 v8-5.2.258 -Source0: v8-5.2.258.tar.bz2 +# tar -c --exclude=.git --exclude=build/linux -J -f v8-5.2.258.tar.xz v8-5.2.258 +Source0: v8-5.2.258.tar.xz Patch0: v8-4.10.91-system_icu.patch Patch1: v8-5.2.197-readdir-fix.patch Patch2: v8-5.2.258-bundled-binutils.patch @@ -217,6 +217,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Thu Oct 13 2016 Tom Callaway - 1:5.2.258-6 +- use smaller, better compressed source tarball without unnecessary git bits + * Mon Oct 10 2016 Tom Callaway - 1:5.2.258-5 - add bundledbinutils option to Makefile to disable "thin" static libs From 8af37ed85a32be4ae80745f2127382370f73cdb7 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 17 Oct 2016 10:21:39 -0400 Subject: [PATCH 056/100] force v8 not to make thin libraries --- v8.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 85e5b7c..01df91d 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -82,6 +82,14 @@ Python libraries from v8. # rm -rf src/third_party/valgrind/valgrind.h # ln -s /usr/include/valgrind/valgrind.h src/third_party/valgrind/valgrind.h +# Don't make thin libraries. :( +for i in `find . -type f -name '*.mk'`; do sed -i 's|alink_thin|alink|g' $i; done +sed -i "s|'alink_thin'|'alink'|g" tools/gyp/pylib/gyp/generator/make.py +sed -i "s|'alink_thin'|'alink'|g" tools/gyp/pylib/gyp/generator/ninja.py +sed -i "s|crsT|crs|g" out/Makefile +sed -i "s|crsT|crs|g" tools/gyp/pylib/gyp/generator/make.py + + # What? *sigh* rm -rf third_party/binutils/Linux_x64/Release/bin/ld.gold ln -s /usr/bin/ld.gold third_party/binutils/Linux_x64/Release/bin/ld.gold @@ -217,6 +225,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Mon Oct 17 2016 Tom Callaway - 1:5.2.258-7 +- force v8 not to make thin libraries + * Thu Oct 13 2016 Tom Callaway - 1:5.2.258-6 - use smaller, better compressed source tarball without unnecessary git bits From 5d3a24c1f488af6b68c5847c87acfbedc4433eff Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 12 Jan 2017 17:30:44 +0100 Subject: [PATCH 057/100] Rebuild for readline 7.x Signed-off-by: Igor Gnatenko --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 01df91d..8bd0d62 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -225,6 +225,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Thu Jan 12 2017 Igor Gnatenko - 1:5.2.258-8 +- Rebuild for readline 7.x + * Mon Oct 17 2016 Tom Callaway - 1:5.2.258-7 - force v8 not to make thin libraries From 0c7060e97bf0328fb477f1c373e0bad53aad58cb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 16:53:22 +0000 Subject: [PATCH 058/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 8bd0d62..4bbc28a 100644 --- a/v8.spec +++ b/v8.spec @@ -24,7 +24,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -225,6 +225,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1:5.2.258-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Jan 12 2017 Igor Gnatenko - 1:5.2.258-8 - Rebuild for readline 7.x From c9f9d6a6cc05a769a214fda0d3754fa8b65e41dd Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 28 Feb 2017 16:17:12 -0500 Subject: [PATCH 059/100] fix ftbfs (thanks to Ben Noordhuis) --- v8-5.2.258-gcc7.patch | 119 ++++++++++++++++++++++++++++++++++++++++++ v8.spec | 9 +++- 2 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 v8-5.2.258-gcc7.patch diff --git a/v8-5.2.258-gcc7.patch b/v8-5.2.258-gcc7.patch new file mode 100644 index 0000000..162a9c4 --- /dev/null +++ b/v8-5.2.258-gcc7.patch @@ -0,0 +1,119 @@ +diff -up v8-5.2.258/samples/shell.cc.gcc7 v8-5.2.258/samples/shell.cc +--- v8-5.2.258/samples/shell.cc.gcc7 2017-02-28 15:33:38.931424708 -0500 ++++ v8-5.2.258/samples/shell.cc 2017-02-28 15:34:00.759853299 -0500 +@@ -361,6 +361,8 @@ bool ExecuteString(v8::Isolate* isolate, + } else { + v8::Local result; + if (!script->Run(context).ToLocal(&result)) { ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wgnu" + assert(try_catch.HasCaught()); + // Print errors that happened during execution. + if (report_exceptions) +@@ -368,6 +370,7 @@ bool ExecuteString(v8::Isolate* isolate, + return false; + } else { + assert(!try_catch.HasCaught()); ++#pragma GCC diagnostic pop + if (print_result && !result->IsUndefined()) { + // If all went well and the result wasn't undefined then print + // the returned value. +diff -up v8-5.2.258/src/crankshaft/lithium.cc.gcc7 v8-5.2.258/src/crankshaft/lithium.cc +--- v8-5.2.258/src/crankshaft/lithium.cc.gcc7 2016-05-09 10:28:43.000000000 -0400 ++++ v8-5.2.258/src/crankshaft/lithium.cc 2017-02-28 14:42:17.188361709 -0500 +@@ -128,11 +128,6 @@ void LOperand::PrintTo(StringStream* str + + + template +-LSubKindOperand* +-LSubKindOperand::cache = NULL; +- +- +-template + void LSubKindOperand::SetUpCache() { + if (cache) return; + cache = new LSubKindOperand[kNumCachedOperands]; +diff -up v8-5.2.258/src/crankshaft/lithium.h.gcc7 v8-5.2.258/src/crankshaft/lithium.h +--- v8-5.2.258/src/crankshaft/lithium.h.gcc7 2016-05-09 10:28:43.000000000 -0400 ++++ v8-5.2.258/src/crankshaft/lithium.h 2017-02-28 14:42:17.188361709 -0500 +@@ -338,6 +338,9 @@ class LSubKindOperand final : public LOp + explicit LSubKindOperand(int index) : LOperand(kOperandKind, index) { } + }; + ++template ++LSubKindOperand* ++LSubKindOperand::cache = NULL; + + #define LITHIUM_TYPEDEF_SUBKIND_OPERAND_CLASS(name, type, number) \ + typedef LSubKindOperand L##name; +diff -up v8-5.2.258/src/objects-body-descriptors.h.gcc7 v8-5.2.258/src/objects-body-descriptors.h +--- v8-5.2.258/src/objects-body-descriptors.h.gcc7 2016-05-09 10:28:43.000000000 -0400 ++++ v8-5.2.258/src/objects-body-descriptors.h 2017-02-28 14:42:17.189361685 -0500 +@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + +diff -up v8-5.2.258/src/objects.h.gcc7 v8-5.2.258/src/objects.h +--- v8-5.2.258/src/objects.h.gcc7 2016-05-09 10:28:43.000000000 -0400 ++++ v8-5.2.258/src/objects.h 2017-02-28 14:42:17.190361661 -0500 +@@ -3182,22 +3182,10 @@ class HashTableBase : public FixedArray + template + class HashTable : public HashTableBase { + public: +- // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } +- +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ // Wrapper methods. Defined in src/objects-inl.h ++ // to break a cycle with src/heap/heap.h. ++ inline uint32_t Hash(Key key); ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle New( +diff -up v8-5.2.258/src/objects-inl.h.gcc7 v8-5.2.258/src/objects-inl.h +--- v8-5.2.258/src/objects-inl.h.gcc7 2016-05-09 10:28:43.000000000 -0400 ++++ v8-5.2.258/src/objects-inl.h 2017-02-28 14:42:17.191361638 -0500 +@@ -35,6 +35,25 @@ + namespace v8 { + namespace internal { + ++template ++uint32_t HashTable::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template ++uint32_t HashTable::HashForObject(Key key, ++ Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ + PropertyDetails::PropertyDetails(Smi* smi) { + value_ = smi->value(); + } diff --git a/v8.spec b/v8.spec index 4bbc28a..f1b35df 100644 --- a/v8.spec +++ b/v8.spec @@ -1,5 +1,6 @@ # clang doesn't understand hardening, specifically "-specs=" %global clang_optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1||g') +%global clang_ldflags %(echo "%{__global_ldflags} -Wl,--build-id" | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-ld||g') # Hi Googlers! If you're looking in here for patches, nifty. # You (and everyone else) are welcome to use any of my Chromium spec files and @@ -24,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -46,6 +47,7 @@ Source0: v8-5.2.258.tar.xz Patch0: v8-4.10.91-system_icu.patch Patch1: v8-5.2.197-readdir-fix.patch Patch2: v8-5.2.258-bundled-binutils.patch +Patch3: v8-5.2.258-gcc7.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel @@ -77,6 +79,7 @@ Python libraries from v8. %patch0 -p1 -b .system_icu %patch1 -p1 -b .readdir %patch2 -p1 -b .bb +%patch3 -p1 -b .gcc7 # Use system header ... except it doesn't work. # rm -rf src/third_party/valgrind/valgrind.h @@ -161,6 +164,7 @@ CC=%{_bindir}/clang \ CXX=%{_bindir}/clang++ \ CFLAGS="%{clang_optflags}" \ CXXFLAGS="%{clang_optflags}" \ +LDFLAGS="%{clang_ldflags}" \ V=1 %install @@ -225,6 +229,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Tue Feb 28 2017 Tom Callaway - 1:5.2.258-10 +- fix ftbfs (thanks to Ben Noordhuis) + * Sat Feb 11 2017 Fedora Release Engineering - 1:5.2.258-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 09b6c756722a7af655117f83a62e9f2cd3600372 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 1 Mar 2017 11:18:39 -0500 Subject: [PATCH 060/100] ppc64 fix --- v8-5.2.258-ppc64.patch | 21 +++++++++++++++++++++ v8.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 v8-5.2.258-ppc64.patch diff --git a/v8-5.2.258-ppc64.patch b/v8-5.2.258-ppc64.patch new file mode 100644 index 0000000..fcf1777 --- /dev/null +++ b/v8-5.2.258-ppc64.patch @@ -0,0 +1,21 @@ +diff -up v8-5.2.258/gypfiles/standalone.gypi.ppcfix v8-5.2.258/gypfiles/standalone.gypi +--- v8-5.2.258/gypfiles/standalone.gypi.ppcfix 2017-03-01 11:15:17.516268618 -0500 ++++ v8-5.2.258/gypfiles/standalone.gypi 2017-03-01 11:16:34.750282604 -0500 +@@ -225,7 +225,7 @@ + }, { + 'v8_enable_gdbjit%': 0, + }], +- ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ ++ ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64" or target_arch=="ppc64") and \ + (v8_target_arch!="x87" and v8_target_arch!="x32")', { + 'clang%': 1, + }, { +@@ -735,7 +735,7 @@ + or v8_target_arch=="mips64el")', { + 'cflags': [ '-Wshorten-64-to-32' ], + }], +- [ 'host_arch=="ppc64" and OS!="aix"', { ++ [ 'host_arch=="ppc64" and OS!="aix" and clang==0', { + 'cflags': [ '-mminimal-toc' ], + }], + [ 'visibility=="hidden" and v8_enable_backtrace==0', { diff --git a/v8.spec b/v8.spec index f1b35df..b7f4ccf 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -48,6 +48,7 @@ Patch0: v8-4.10.91-system_icu.patch Patch1: v8-5.2.197-readdir-fix.patch Patch2: v8-5.2.258-bundled-binutils.patch Patch3: v8-5.2.258-gcc7.patch +Patch4: v8-5.2.258-ppc64.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel @@ -80,6 +81,7 @@ Python libraries from v8. %patch1 -p1 -b .readdir %patch2 -p1 -b .bb %patch3 -p1 -b .gcc7 +%patch4 -p1 -b .ppc64 # Use system header ... except it doesn't work. # rm -rf src/third_party/valgrind/valgrind.h @@ -229,6 +231,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Wed Mar 1 2017 Tom Callaway - 1:5.2.258-11 +- fix ppc64 build + * Tue Feb 28 2017 Tom Callaway - 1:5.2.258-10 - fix ftbfs (thanks to Ben Noordhuis) From cfe7ca2a765e4dc79fc41d18b00a10ca9e657bb6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:08:20 +0000 Subject: [PATCH 061/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index b7f4ccf..635c90d 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -231,6 +231,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1:5.2.258-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed Mar 1 2017 Tom Callaway - 1:5.2.258-11 - fix ppc64 build From 60eff070bd404697e1f47993377f6c8883e483bb Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Aug 2017 15:27:40 -0400 Subject: [PATCH 062/100] 6.2.91 --- .gitignore | 2 + icu.gn | 235 +++++++++++++++++++++++++++++++++++++++ sources | 3 +- v8-6.2.91-nolambda.patch | 12 ++ v8-6.2.91-ppc64.patch | 21 ++++ v8-6.2.91-sover.patch | 28 +++++ v8.spec | 96 +++++++++------- 7 files changed, 355 insertions(+), 42 deletions(-) create mode 100644 icu.gn create mode 100644 v8-6.2.91-nolambda.patch create mode 100644 v8-6.2.91-ppc64.patch create mode 100644 v8-6.2.91-sover.patch diff --git a/.gitignore b/.gitignore index 6fb5bc1..fddd190 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ /v8-3.14.5.10.tar.bz2 /v8-5.2.258.tar.bz2 /v8-5.2.258.tar.xz +/v8-6.2.91.tar.xz +/depot_tools.git-master.tar.gz diff --git a/icu.gn b/icu.gn new file mode 100644 index 0000000..f3734b7 --- /dev/null +++ b/icu.gn @@ -0,0 +1,235 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/linux/pkg_config.gni") +import("//build/shim_headers.gni") + +group("icu") { + public_deps = [ + ":icui18n", + ":icuuc", + ] +} + +config("icu_config") { + defines = [ + "USING_SYSTEM_ICU=1", + "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", + ] +} + +pkg_config("system_icui18n") { + packages = [ "icu-i18n" ] +} + +pkg_config("system_icuuc") { + packages = [ "icu-uc" ] +} + +source_set("icui18n") { + deps = [ + ":icui18n_shim", + ] + public_configs = [ + ":icu_config", + ":system_icui18n", + ] +} + +source_set("icuuc") { + deps = [ + ":icuuc_shim", + ] + public_configs = [ + ":icu_config", + ":system_icuuc", + ] +} + +shim_headers("icui18n_shim") { + root_path = "source/i18n" + headers = [ + # This list can easily be updated using the command below: + # find third_party/icu/source/i18n/unicode \ + # -iname '*.h' -printf '"%p",\n' | \ + # sed -e 's|third_party/icu/i18n/common/||' | sort -u + "unicode/alphaindex.h", + "unicode/basictz.h", + "unicode/calendar.h", + "unicode/choicfmt.h", + "unicode/coleitr.h", + "unicode/coll.h", + "unicode/compactdecimalformat.h", + "unicode/curramt.h", + "unicode/currpinf.h", + "unicode/currunit.h", + "unicode/datefmt.h", + "unicode/dcfmtsym.h", + "unicode/decimfmt.h", + "unicode/dtfmtsym.h", + "unicode/dtitvfmt.h", + "unicode/dtitvinf.h", + "unicode/dtptngen.h", + "unicode/dtrule.h", + "unicode/fieldpos.h", + "unicode/fmtable.h", + "unicode/format.h", + "unicode/fpositer.h", + "unicode/gender.h", + "unicode/gregocal.h", + "unicode/locdspnm.h", + "unicode/measfmt.h", + "unicode/measunit.h", + "unicode/measure.h", + "unicode/msgfmt.h", + "unicode/numfmt.h", + "unicode/numsys.h", + "unicode/plurfmt.h", + "unicode/plurrule.h", + "unicode/rbnf.h", + "unicode/rbtz.h", + "unicode/regex.h", + "unicode/region.h", + "unicode/reldatefmt.h", + "unicode/scientificnumberformatter.h", + "unicode/search.h", + "unicode/selfmt.h", + "unicode/simpletz.h", + "unicode/smpdtfmt.h", + "unicode/sortkey.h", + "unicode/stsearch.h", + "unicode/tblcoll.h", + "unicode/timezone.h", + "unicode/tmunit.h", + "unicode/tmutamt.h", + "unicode/tmutfmt.h", + "unicode/translit.h", + "unicode/tzfmt.h", + "unicode/tznames.h", + "unicode/tzrule.h", + "unicode/tztrans.h", + "unicode/ucal.h", + "unicode/ucol.h", + "unicode/ucoleitr.h", + "unicode/ucsdet.h", + "unicode/ucurr.h", + "unicode/udat.h", + "unicode/udateintervalformat.h", + "unicode/udatpg.h", + "unicode/udisplaycontext.h", + "unicode/ufieldpositer.h", + "unicode/uformattable.h", + "unicode/ugender.h", + "unicode/uldnames.h", + "unicode/ulocdata.h", + "unicode/umsg.h", + "unicode/unirepl.h", + "unicode/unum.h", + "unicode/unumsys.h", + "unicode/upluralrules.h", + "unicode/uregex.h", + "unicode/uregion.h", + "unicode/usearch.h", + "unicode/uspoof.h", + "unicode/utmscale.h", + "unicode/utrans.h", + "unicode/vtzone.h", + ] +} + +shim_headers("icuuc_shim") { + root_path = "source/common" + headers = [ + # This list can easily be updated using the command below: + # find third_party/icu/source/common/unicode \ + # -iname '*.h' -printf '"%p",\n' | \ + # sed -e 's|third_party/icu/source/common/||' | sort -u + "unicode/appendable.h", + "unicode/brkiter.h", + "unicode/bytestream.h", + "unicode/bytestrie.h", + "unicode/bytestriebuilder.h", + "unicode/caniter.h", + "unicode/chariter.h", + "unicode/dbbi.h", + "unicode/docmain.h", + "unicode/dtintrv.h", + "unicode/enumset.h", + "unicode/errorcode.h", + "unicode/filteredbrk.h", + "unicode/icudataver.h", + "unicode/icuplug.h", + "unicode/idna.h", + "unicode/listformatter.h", + "unicode/localpointer.h", + "unicode/locid.h", + "unicode/messagepattern.h", + "unicode/normalizer2.h", + "unicode/normlzr.h", + "unicode/parseerr.h", + "unicode/parsepos.h", + "unicode/platform.h", + "unicode/ptypes.h", + "unicode/putil.h", + "unicode/rbbi.h", + "unicode/rep.h", + "unicode/resbund.h", + "unicode/schriter.h", + "unicode/std_string.h", + "unicode/strenum.h", + "unicode/stringpiece.h", + "unicode/stringtriebuilder.h", + "unicode/symtable.h", + "unicode/ubidi.h", + "unicode/ubrk.h", + "unicode/ucasemap.h", + "unicode/ucat.h", + "unicode/uchar.h", + "unicode/ucharstrie.h", + "unicode/ucharstriebuilder.h", + "unicode/uchriter.h", + "unicode/uclean.h", + "unicode/ucnv.h", + "unicode/ucnv_cb.h", + "unicode/ucnv_err.h", + "unicode/ucnvsel.h", + "unicode/uconfig.h", + "unicode/udata.h", + "unicode/uenum.h", + "unicode/uidna.h", + "unicode/uiter.h", + "unicode/ulistformatter.h", + "unicode/uloc.h", + "unicode/umachine.h", + "unicode/umisc.h", + "unicode/unifilt.h", + "unicode/unifunct.h", + "unicode/unimatch.h", + "unicode/uniset.h", + "unicode/unistr.h", + "unicode/unorm.h", + "unicode/unorm2.h", + "unicode/uobject.h", + "unicode/urename.h", + "unicode/urep.h", + "unicode/ures.h", + "unicode/uscript.h", + "unicode/uset.h", + "unicode/usetiter.h", + "unicode/ushape.h", + "unicode/usprep.h", + "unicode/ustring.h", + "unicode/ustringtrie.h", + "unicode/utext.h", + "unicode/utf.h", + "unicode/utf16.h", + "unicode/utf32.h", + "unicode/utf8.h", + "unicode/utf_old.h", + "unicode/utrace.h", + "unicode/utypes.h", + "unicode/uvernum.h", + "unicode/uversion.h", + ] +} diff --git a/sources b/sources index 852bfba..5b8c660 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -2cff9f156d8339086629489cf89e0a93 v8-5.2.258.tar.xz +SHA512 (v8-6.2.91.tar.xz) = 08cb841936c0463f12bc7cacda2d9d27dfd3814deb4788efaa66cc931331bd43bfeb606bbdfe1256f277bf46c007789268a45ffb1fc6a35b7607360c0c026139 +SHA512 (depot_tools.git-master.tar.gz) = e4edee0fe870caf93a92e40cd30dc8b03a3cce27e73e9cbf5a26f4f3048611b2e485963cf9c738fca2c381f61838187b2c082e798d0456434a558e2eea9864b0 diff --git a/v8-6.2.91-nolambda.patch b/v8-6.2.91-nolambda.patch new file mode 100644 index 0000000..6b7ba48 --- /dev/null +++ b/v8-6.2.91-nolambda.patch @@ -0,0 +1,12 @@ +diff -up v8-6.2.91/build/config/compiler/BUILD.gn.nolambda v8-6.2.91/build/config/compiler/BUILD.gn +--- v8-6.2.91/build/config/compiler/BUILD.gn.nolambda 2017-08-01 14:28:53.499913889 -0400 ++++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-01 14:29:03.242607676 -0400 +@@ -1171,7 +1171,7 @@ config("default_warnings") { + "-Wno-address-of-packed-member", + + # TODO(hans): https://crbug.com/681136 +- "-Wno-unused-lambda-capture", ++ # "-Wno-unused-lambda-capture", + + # TODO(thakis ): https://crbug.com/683349 + "-Wno-user-defined-warnings", diff --git a/v8-6.2.91-ppc64.patch b/v8-6.2.91-ppc64.patch new file mode 100644 index 0000000..d247fef --- /dev/null +++ b/v8-6.2.91-ppc64.patch @@ -0,0 +1,21 @@ +diff -up v8-6.2.91/gypfiles/standalone.gypi.ppc64 v8-6.2.91/gypfiles/standalone.gypi +--- v8-6.2.91/gypfiles/standalone.gypi.ppc64 2017-07-31 11:24:31.000000000 -0400 ++++ v8-6.2.91/gypfiles/standalone.gypi 2017-07-31 11:50:42.467600076 -0400 +@@ -268,7 +268,7 @@ + }, { + 'v8_enable_gdbjit%': 0, + }], +- ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ ++ ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64" or target_arch=="ppc64") and \ + v8_target_arch!="x32"', { + 'clang%': 1, + }, { +@@ -788,7 +788,7 @@ + or v8_target_arch=="mips64el")', { + 'cflags': [ '-Wshorten-64-to-32' ], + }], +- [ 'host_arch=="ppc64" and OS!="aix"', { ++ [ 'host_arch=="ppc64" and OS!="aix" and clang==0', { + 'cflags': [ '-mminimal-toc' ], + }], + [ 'visibility=="hidden" and v8_enable_backtrace==0', { diff --git a/v8-6.2.91-sover.patch b/v8-6.2.91-sover.patch new file mode 100644 index 0000000..1bef787 --- /dev/null +++ b/v8-6.2.91-sover.patch @@ -0,0 +1,28 @@ +diff -up v8-6.2.91/BUILD.gn.sover v8-6.2.91/BUILD.gn +--- v8-6.2.91/BUILD.gn.sover 2017-07-31 11:24:31.000000000 -0400 ++++ v8-6.2.91/BUILD.gn 2017-08-02 12:10:57.825931436 -0400 +@@ -2422,6 +2422,7 @@ v8_component("v8_libbase") { + + if (is_component_build) { + defines = [ "BUILDING_V8_BASE_SHARED" ] ++ output_extension = "so.6" + } + + if (is_posix) { +@@ -2532,6 +2533,7 @@ v8_component("v8_libplatform") { + + if (is_component_build) { + defines = [ "BUILDING_V8_PLATFORM_SHARED" ] ++ output_extension = "so.6" + } + + public_configs = [ ":libplatform_config" ] +@@ -2682,6 +2684,8 @@ if (is_component_build) { + "src/v8dll-main.cc", + ] + ++ output_extension = "so.6" ++ + public_deps = [ + ":v8_base", + ":v8_maybe_snapshot", diff --git a/v8.spec b/v8.spec index 635c90d..44cd70d 100644 --- a/v8.spec +++ b/v8.spec @@ -18,14 +18,14 @@ # For 1.3+, we use the three digit versions # Hey, now there are four digits. What do they mean? Popsicle. # Now there are three digits. Yeah. HOW ABOUT DEM APPLES?!? -%global somajor 5 +%global somajor 6 %global sominor 2 -%global sobuild 258 -%global sover %{somajor}.%{sominor}.%{sobuild} +%global sobuild 91 +%global sover %{somajor} Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 12%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -38,22 +38,27 @@ URL: https://chromium.googlesource.com/v8/v8/ # cd v8-tmp # fetch v8 # cd v8 -# git checkout 5.2.258 +# git checkout 6.2.91 # gclient sync # cd .. -# mv v8 v8-5.2.258 -# tar -c --exclude=.git --exclude=build/linux -J -f v8-5.2.258.tar.xz v8-5.2.258 -Source0: v8-5.2.258.tar.xz +# mv v8 v8-6.2.91 +# tar -c --exclude=.git --exclude=build/linux -J -f v8-6.2.91.tar.xz v8-6.2.91 +Source0: v8-6.2.91.tar.xz +# https://chromium.googlesource.com/chromium/tools/depot_tools.git/+archive/7e7a454f9afdddacf63e10be48f0eab603be654e.tar.gz +Source1: depot_tools.git-master.tar.gz +# Taken from chromium-60.0.3112.78/build/linux/unbundle/icu.gn +Source2: icu.gn Patch0: v8-4.10.91-system_icu.patch -Patch1: v8-5.2.197-readdir-fix.patch Patch2: v8-5.2.258-bundled-binutils.patch Patch3: v8-5.2.258-gcc7.patch -Patch4: v8-5.2.258-ppc64.patch +Patch4: v8-6.2.91-ppc64.patch +Patch5: v8-6.2.91-nolambda.patch +Patch6: v8-6.2.91-sover.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel BuildRequires: python2-devel -BuildRequires: clang +BuildRequires: clang, llvm %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -76,12 +81,16 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Python libraries from v8. %prep +%setup -q -T -c -n depot_tools -a 1 %setup -q -n %{name}-%{version} %patch0 -p1 -b .system_icu -%patch1 -p1 -b .readdir %patch2 -p1 -b .bb -%patch3 -p1 -b .gcc7 +# %%patch3 -p1 -b .gcc7 %patch4 -p1 -b .ppc64 +%patch5 -p1 -b .nolambda +%patch6 -p1 -b .sover + +cp -a %{SOURCE2} third_party/icu/BUILD.gn # Use system header ... except it doesn't work. # rm -rf src/third_party/valgrind/valgrind.h @@ -91,15 +100,19 @@ Python libraries from v8. for i in `find . -type f -name '*.mk'`; do sed -i 's|alink_thin|alink|g' $i; done sed -i "s|'alink_thin'|'alink'|g" tools/gyp/pylib/gyp/generator/make.py sed -i "s|'alink_thin'|'alink'|g" tools/gyp/pylib/gyp/generator/ninja.py -sed -i "s|crsT|crs|g" out/Makefile +# sed -i "s|crsT|crs|g" out/Makefile sed -i "s|crsT|crs|g" tools/gyp/pylib/gyp/generator/make.py -# What? *sigh* rm -rf third_party/binutils/Linux_x64/Release/bin/ld.gold -ln -s /usr/bin/ld.gold third_party/binutils/Linux_x64/Release/bin/ld.gold -rm -rf third_party/llvm-build/Release+Asserts/bin/clang -ln -s /usr/bin/clang third_party/llvm-build/Release+Asserts/bin/clang +rm -rf third_party/llvm-build/Release+Asserts +mkdir -p third_party/llvm-build/Release+Asserts/bin +pushd third_party/llvm-build/Release+Asserts/bin +ln -s /usr/bin/clang clang +ln -s /usr/bin/clang++ clang++ +ln -s /usr/bin/llvm-ar llvm-ar +popd + #Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) %if (0%{?rhel} > 6 || 0%{?fedora} > 18) @@ -150,39 +163,37 @@ done %global v8arch s390x %endif -make %{v8arch}.release \ +V8_GN_DEFINES="" +V8_GN_DEFINES+=' use_sysroot=false use_gold=false enable_nacl=false linux_use_bundled_binutils=false is_component_build=true clang_use_chrome_plugins=false' +V8_GN_DEFINES+=' libcpp_is_static=true v8_use_external_startup_data=false' +V8_GN_DEFINES+=' v8_target_cpu="%{v8arch}"' %ifarch armv7hl armv7hnl -armfloatabi=hard \ +V8_GN_DEFINES+=' arm_float_abi="hard"' %endif %ifarch armv5tel armv6l armv7l -armfloatabi=softfp \ +V8_GN_DEFINES+=' arm_float_abi="softfp"' %endif -system_icu=on \ -soname_version=%{somajor} \ -snapshot=external \ -library=shared %{?_smp_mflags} \ -bundledbinutils=off \ -CC=%{_bindir}/clang \ -CXX=%{_bindir}/clang++ \ -CFLAGS="%{clang_optflags}" \ -CXXFLAGS="%{clang_optflags}" \ -LDFLAGS="%{clang_ldflags}" \ -V=1 + +export PATH=$PATH:%{_builddir}/depot_tools +CHROMIUM_BUILDTOOLS_PATH=./buildtools/ gn gen out.gn/%{v8arch}.release --args="$V8_GN_DEFINES" +mkdir -p out.gn/%{v8arch}.release/gen/shim_headers/icui18n_shim/third_party/icu/source/i18n/unicode +mkdir -p out.gn/%{v8arch}.release/gen/shim_headers/icuuc_shim/third_party/icu/source/common/unicode +../depot_tools/ninja -vvv -C out.gn/%{v8arch}.release %install -pushd out/%{v8arch}.release +pushd out.gn/%{v8arch}.release # library first mkdir -p %{buildroot}%{_libdir} -cp -a lib.target/libv8.so.%{somajor} %{buildroot}%{_libdir} -# Now, the static libraries that some/most/all v8 applications also need to link against. -cp -a obj.target/src/libv8_*.a %{buildroot}%{_libdir} +cp -a libv8*.so.%{somajor} %{buildroot}%{_libdir} # Next, binaries mkdir -p %{buildroot}%{_bindir} install -p -m0755 d8 %{buildroot}%{_bindir} -# install -p -m0755 mksnapshot %{buildroot}%{_bindir} -install -p -m0755 parser_fuzzer %{buildroot}%{_bindir} +install -p -m0755 mksnapshot %{buildroot}%{_bindir} +# install -p -m0755 parser_fuzzer %{buildroot}%{_bindir} +%if 0 # BLOBS! (Don't stress. They get built out of source code.) install -p natives_blob.bin snapshot_blob.bin %{buildroot}%{_libdir} +%endif popd # Now, headers @@ -214,10 +225,11 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %license LICENSE %doc AUTHORS ChangeLog %{_bindir}/d8 -# %%{_bindir}/mksnapshot -%{_bindir}/parser_fuzzer +%{_bindir}/mksnapshot %{_libdir}/*.so.* +%if 0 %{_libdir}/*.bin +%endif %files devel %{_includedir}/*.h @@ -225,12 +237,14 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %dir %{_includedir}/v8/ %{_includedir}/v8/extensions/ %{_libdir}/*.so -%{_libdir}/*.a %files python %{python_sitelib}/j*.py* %changelog +* Mon Jul 31 2017 Tom Callaway - 1:6.2.91-1 +- 6.2.91 + * Thu Jul 27 2017 Fedora Release Engineering - 1:5.2.258-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From bce8a87f55c6164b7e6128363a376bd48852cd79 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Aug 2017 15:40:37 -0400 Subject: [PATCH 063/100] fix BR --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 44cd70d..1d9209d 100644 --- a/v8.spec +++ b/v8.spec @@ -57,7 +57,7 @@ Patch6: v8-6.2.91-sover.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel -BuildRequires: python2-devel +BuildRequires: python2-devel, glib-devel BuildRequires: clang, llvm %description From cea19c4e93fa842cf53f858b6db5db7000da72c6 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Aug 2017 15:53:06 -0400 Subject: [PATCH 064/100] really fix BR --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 1d9209d..7ccf692 100644 --- a/v8.spec +++ b/v8.spec @@ -57,7 +57,7 @@ Patch6: v8-6.2.91-sover.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel -BuildRequires: python2-devel, glib-devel +BuildRequires: python2-devel, glib2-devel BuildRequires: clang, llvm %description From d4b53bd3f6c217be047b7a5afe33c78b3455edee Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Aug 2017 16:02:05 -0400 Subject: [PATCH 065/100] fix xlocale issue --- v8-6.2.91-noxlocale.patch | 12 ++++++++++++ v8.spec | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 v8-6.2.91-noxlocale.patch diff --git a/v8-6.2.91-noxlocale.patch b/v8-6.2.91-noxlocale.patch new file mode 100644 index 0000000..92ee20f --- /dev/null +++ b/v8-6.2.91-noxlocale.patch @@ -0,0 +1,12 @@ +diff -up v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale.noxlocale v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale +--- v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale.noxlocale 2017-08-02 16:00:24.793773137 -0400 ++++ v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale 2017-08-02 16:00:55.161082370 -0400 +@@ -34,7 +34,7 @@ + # include + #elif defined(_NEWLIB_VERSION) + # include +-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ ++#elif (defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) + # include + #elif defined(__Fuchsia__) diff --git a/v8.spec b/v8.spec index 7ccf692..867da2a 100644 --- a/v8.spec +++ b/v8.spec @@ -54,6 +54,7 @@ Patch3: v8-5.2.258-gcc7.patch Patch4: v8-6.2.91-ppc64.patch Patch5: v8-6.2.91-nolambda.patch Patch6: v8-6.2.91-sover.patch +Patch7: v8-6.2.91-noxlocale.patch # arm is excluded because of bz1334406 ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x BuildRequires: readline-devel, libicu-devel @@ -89,6 +90,7 @@ Python libraries from v8. %patch4 -p1 -b .ppc64 %patch5 -p1 -b .nolambda %patch6 -p1 -b .sover +%patch7 -p1 -b .noxlocale cp -a %{SOURCE2} third_party/icu/BUILD.gn From 2aa9f0835fd9d6491a6ff0a62cf68323d79671e4 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Aug 2017 16:41:28 -0400 Subject: [PATCH 066/100] arch handling --- v8.spec | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/v8.spec b/v8.spec index 867da2a..caad1ef 100644 --- a/v8.spec +++ b/v8.spec @@ -55,8 +55,7 @@ Patch4: v8-6.2.91-ppc64.patch Patch5: v8-6.2.91-nolambda.patch Patch6: v8-6.2.91-sover.patch Patch7: v8-6.2.91-noxlocale.patch -# arm is excluded because of bz1334406 -ExclusiveArch: %{ix86} x86_64 ppc ppc64 aarch64 %{mips} s390 s390x +ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel BuildRequires: python2-devel, glib2-devel BuildRequires: clang, llvm @@ -132,7 +131,7 @@ done %global v8arch x64 %endif %ifarch %{ix86} -%global v8arch ia32 +%global v8arch x86 %endif %ifarch %{arm} %global v8arch arm @@ -140,15 +139,9 @@ done %ifarch aarch64 %global v8arch arm64 %endif -%ifarch mips -%global v8arch mips -%endif %ifarch mipsel %global v8arch mipsel %endif -%ifarch mips64 -%global v8arch mips64 -%endif %ifarch mips64el %global v8arch mips64el %endif From edda7cb1fb469b96d0b69d12caf024167636e156 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 3 Aug 2017 10:20:04 -0400 Subject: [PATCH 067/100] build native versions of build tools. ugh. --- .gitignore | 2 ++ sources | 2 ++ v8.spec | 36 ++++++++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index fddd190..18f89b5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ /v8-5.2.258.tar.xz /v8-6.2.91.tar.xz /depot_tools.git-master.tar.gz +/chromium-base-git2d35e4d.tar.bz2 +/gn-source-gitf833e90.tar.bz2 diff --git a/sources b/sources index 5b8c660..4948b37 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ SHA512 (v8-6.2.91.tar.xz) = 08cb841936c0463f12bc7cacda2d9d27dfd3814deb4788efaa66cc931331bd43bfeb606bbdfe1256f277bf46c007789268a45ffb1fc6a35b7607360c0c026139 SHA512 (depot_tools.git-master.tar.gz) = e4edee0fe870caf93a92e40cd30dc8b03a3cce27e73e9cbf5a26f4f3048611b2e485963cf9c738fca2c381f61838187b2c082e798d0456434a558e2eea9864b0 +SHA512 (chromium-base-git2d35e4d.tar.bz2) = a1dc21fb69908def3baaaccffbd9bc32b9e9b0c51bd6cee2d1509e0175c77c57e3b87dc18751aa6f2406724f41f7972576e66455f6d23765471315265704644e +SHA512 (gn-source-gitf833e90.tar.bz2) = 24a06a6fc1afbb6a7de5b702310dcff151250643a059e5f2540a3a12750f9880d865955b5a1f1ed8185c320db6f09a6c8c4540720c340b4a148fa9d87dda2938 diff --git a/v8.spec b/v8.spec index caad1ef..e8f93e1 100644 --- a/v8.spec +++ b/v8.spec @@ -48,6 +48,13 @@ Source0: v8-6.2.91.tar.xz Source1: depot_tools.git-master.tar.gz # Taken from chromium-60.0.3112.78/build/linux/unbundle/icu.gn Source2: icu.gn +# Needed to build gn. :P +# git clone https://chromium.googlesource.com/chromium/src/base +# tar cvfj chromium-base-git2d35e4d.tar.bz2 base/ +Source3: chromium-base-git2d35e4d.tar.bz2 +# git clone https://chromium.googlesource.com/chromium/src/tools/gn +# tar cvfj gn-source-gitf833e90.tar.bz2 gn/ +Source4: gn-source-gitf833e90.tar.bz2 Patch0: v8-4.10.91-system_icu.patch Patch2: v8-5.2.258-bundled-binutils.patch Patch3: v8-5.2.258-gcc7.patch @@ -56,7 +63,7 @@ Patch5: v8-6.2.91-nolambda.patch Patch6: v8-6.2.91-sover.patch Patch7: v8-6.2.91-noxlocale.patch ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x -BuildRequires: readline-devel, libicu-devel +BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel BuildRequires: clang, llvm @@ -82,7 +89,7 @@ Python libraries from v8. %prep %setup -q -T -c -n depot_tools -a 1 -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-%{version} -a 3 %patch0 -p1 -b .system_icu %patch2 -p1 -b .bb # %%patch3 -p1 -b .gcc7 @@ -93,6 +100,10 @@ Python libraries from v8. cp -a %{SOURCE2} third_party/icu/BUILD.gn +pushd tools +tar xvf %{SOURCE4} +popd + # Use system header ... except it doesn't work. # rm -rf src/third_party/valgrind/valgrind.h # ln -s /usr/include/valgrind/valgrind.h src/third_party/valgrind/valgrind.h @@ -114,14 +125,6 @@ ln -s /usr/bin/clang++ clang++ ln -s /usr/bin/llvm-ar llvm-ar popd - -#Patch7 needs -lrt on glibc < 2.17 (RHEL <= 6) -%if (0%{?rhel} > 6 || 0%{?fedora} > 18) -%global lrt %{nil} -%else -%global lrt -lrt -%endif - for i in `grep -rl "Wno-undefined-var-template" *`; do sed -i 's|-Wno-undefined-var-template||g' $i done @@ -158,6 +161,19 @@ done %global v8arch s390x %endif +# DO THE HARLEM SHAKE +# err... I mean, build gn from source. +pushd tools/gn +./bootstrap/bootstrap.py -s +popd +rm -rf buildtools/linux64/gn* +# the tooling thinks all linux is "linux64" +cp -a out/Release/gn buildtools/linux64/gn + +# Replace ninja in depot_tools +rm -rf ../depot_tools/ninja +ln -s /usr/bin/ninja ../depot_tools/ninja + V8_GN_DEFINES="" V8_GN_DEFINES+=' use_sysroot=false use_gold=false enable_nacl=false linux_use_bundled_binutils=false is_component_build=true clang_use_chrome_plugins=false' V8_GN_DEFINES+=' libcpp_is_static=true v8_use_external_startup_data=false' From f79d2b6081d0371d77cf9cf0ce3df70abcfaa1bd Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 3 Aug 2017 11:02:31 -0400 Subject: [PATCH 068/100] BR: libatomic --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index e8f93e1..f6bf049 100644 --- a/v8.spec +++ b/v8.spec @@ -64,7 +64,7 @@ Patch6: v8-6.2.91-sover.patch Patch7: v8-6.2.91-noxlocale.patch ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel, ninja-build -BuildRequires: python2-devel, glib2-devel +BuildRequires: python2-devel, glib2-devel, libatomic BuildRequires: clang, llvm %description From b1057bfbd25919458cdd728b65e48e2a3a75766d Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 3 Aug 2017 11:32:52 -0400 Subject: [PATCH 069/100] do not assume we are cross-compiling --- v8-6.2.91-notcross.patch | 79 ++++++++++++++++++++++++++++++++++++++++ v8.spec | 4 ++ 2 files changed, 83 insertions(+) create mode 100644 v8-6.2.91-notcross.patch diff --git a/v8-6.2.91-notcross.patch b/v8-6.2.91-notcross.patch new file mode 100644 index 0000000..3a0b0be --- /dev/null +++ b/v8-6.2.91-notcross.patch @@ -0,0 +1,79 @@ +diff -up v8-6.2.91/build/toolchain/linux/BUILD.gn.notcross v8-6.2.91/build/toolchain/linux/BUILD.gn +--- v8-6.2.91/build/toolchain/linux/BUILD.gn.notcross 2017-08-03 11:29:04.609204048 -0400 ++++ v8-6.2.91/build/toolchain/linux/BUILD.gn 2017-08-03 11:31:14.462146822 -0400 +@@ -6,7 +6,6 @@ import("//build/config/sysroot.gni") + import("//build/toolchain/gcc_toolchain.gni") + + clang_toolchain("clang_arm") { +- toolprefix = "arm-linux-gnueabihf-" + toolchain_args = { + current_cpu = "arm" + current_os = "linux" +@@ -14,7 +13,6 @@ clang_toolchain("clang_arm") { + } + + clang_toolchain("clang_arm64") { +- toolprefix = "aarch64-linux-gnu-" + toolchain_args = { + current_cpu = "arm64" + current_os = "linux" +@@ -22,15 +20,13 @@ clang_toolchain("clang_arm64") { + } + + gcc_toolchain("arm64") { +- toolprefix = "aarch64-linux-gnu-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" ++ cc = "gcc" ++ cxx = "g++" + +- ar = "${toolprefix}ar" ++ ar = "ar" + ld = cxx +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + current_cpu = "arm64" +@@ -40,15 +36,13 @@ gcc_toolchain("arm64") { + } + + gcc_toolchain("arm") { +- toolprefix = "arm-linux-gnueabihf-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" ++ cc = "gcc" ++ cxx = "g++" + +- ar = "${toolprefix}ar" ++ ar = "ar" + ld = cxx +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + current_cpu = "arm" +@@ -178,12 +172,12 @@ clang_toolchain("clang_mips64el") { + } + + gcc_toolchain("mipsel") { +- cc = "mipsel-linux-gnu-gcc" +- cxx = "mipsel-linux-gnu-g++" +- ar = "mipsel-linux-gnu-ar" ++ cc = "gcc" ++ cxx = "g++" ++ ar = "ar" + ld = cxx +- readelf = "mipsel-linux-gnu-readelf" +- nm = "mipsel-linux-gnu-nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + cc_wrapper = "" diff --git a/v8.spec b/v8.spec index f6bf049..ddcdbbd 100644 --- a/v8.spec +++ b/v8.spec @@ -62,6 +62,9 @@ Patch4: v8-6.2.91-ppc64.patch Patch5: v8-6.2.91-nolambda.patch Patch6: v8-6.2.91-sover.patch Patch7: v8-6.2.91-noxlocale.patch +# do not assume we are cross compiling +# silly google +Patch8: v8-6.2.91-notcross.patch ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel, libatomic @@ -97,6 +100,7 @@ Python libraries from v8. %patch5 -p1 -b .nolambda %patch6 -p1 -b .sover %patch7 -p1 -b .noxlocale +%patch8 -p1 -b .notcross cp -a %{SOURCE2} third_party/icu/BUILD.gn From c2d01be922fb49bd401e27f141455878c7043497 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 3 Aug 2017 12:01:39 -0400 Subject: [PATCH 070/100] use g1 on i686 to try to avoid memory exhaustion at linkl --- v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch | 23 ++++++++++++++++++++ v8.spec | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch diff --git a/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch b/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch new file mode 100644 index 0000000..cc6e0cc --- /dev/null +++ b/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch @@ -0,0 +1,23 @@ +diff -up v8-6.2.91/build/toolchain/linux/BUILD.gn.memexhaust v8-6.2.91/build/toolchain/linux/BUILD.gn +--- v8-6.2.91/build/toolchain/linux/BUILD.gn.memexhaust 2017-08-03 11:59:42.310877752 -0400 ++++ v8-6.2.91/build/toolchain/linux/BUILD.gn 2017-08-03 12:00:13.030150723 -0400 +@@ -55,6 +55,9 @@ clang_toolchain("clang_x86") { + # Output linker map files for binary size analysis. + enable_linker_map = true + ++ # Turn debugging down to avoid memory exhaustion ++ extra_cppflags = "-g1" ++ + toolchain_args = { + current_cpu = "x86" + current_os = "linux" +@@ -94,6 +97,9 @@ gcc_toolchain("x86") { + ar = "ar" + ld = cxx + ++ # Turn debugging down to avoid memory exhaustion ++ extra_cppflags = "-g1" ++ + # Output linker map files for binary size analysis. + enable_linker_map = true + diff --git a/v8.spec b/v8.spec index ddcdbbd..059a770 100644 --- a/v8.spec +++ b/v8.spec @@ -65,6 +65,8 @@ Patch7: v8-6.2.91-noxlocale.patch # do not assume we are cross compiling # silly google Patch8: v8-6.2.91-notcross.patch +# Use -g1 to avoid mem exhaust on i686 +Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel, libatomic @@ -101,6 +103,7 @@ Python libraries from v8. %patch6 -p1 -b .sover %patch7 -p1 -b .noxlocale %patch8 -p1 -b .notcross +%patch9 -p1 -b .memexhaust cp -a %{SOURCE2} third_party/icu/BUILD.gn From 3c8bd8a5cbf6e7de4e88413caaa671c210c91e8f Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 3 Aug 2017 17:17:21 -0400 Subject: [PATCH 071/100] different way of doing g1 --- v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch | 35 +++++++------------- v8.spec | 4 ++- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch b/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch index cc6e0cc..3c44878 100644 --- a/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch +++ b/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch @@ -1,23 +1,12 @@ -diff -up v8-6.2.91/build/toolchain/linux/BUILD.gn.memexhaust v8-6.2.91/build/toolchain/linux/BUILD.gn ---- v8-6.2.91/build/toolchain/linux/BUILD.gn.memexhaust 2017-08-03 11:59:42.310877752 -0400 -+++ v8-6.2.91/build/toolchain/linux/BUILD.gn 2017-08-03 12:00:13.030150723 -0400 -@@ -55,6 +55,9 @@ clang_toolchain("clang_x86") { - # Output linker map files for binary size analysis. - enable_linker_map = true - -+ # Turn debugging down to avoid memory exhaustion -+ extra_cppflags = "-g1" -+ - toolchain_args = { - current_cpu = "x86" - current_os = "linux" -@@ -94,6 +97,9 @@ gcc_toolchain("x86") { - ar = "ar" - ld = cxx - -+ # Turn debugging down to avoid memory exhaustion -+ extra_cppflags = "-g1" -+ - # Output linker map files for binary size analysis. - enable_linker_map = true - +diff -up v8-6.2.91/build/config/compiler/BUILD.gn.memexhaust v8-6.2.91/build/config/compiler/BUILD.gn +--- v8-6.2.91/build/config/compiler/BUILD.gn.memexhaust 2017-08-03 17:15:41.355834826 -0400 ++++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-03 17:15:46.587704667 -0400 +@@ -1739,7 +1739,7 @@ config("symbols") { + # TODO(thakis): Remove this again once dump_syms is fixed. + cflags += [ "-gdwarf-3" ] + } +- cflags += [ "-g2" ] ++ cflags += [ "-g1" ] + } + if (use_debug_fission) { + cflags += [ "-gsplit-dwarf" ] diff --git a/v8.spec b/v8.spec index 059a770..556c1e2 100644 --- a/v8.spec +++ b/v8.spec @@ -65,7 +65,7 @@ Patch7: v8-6.2.91-noxlocale.patch # do not assume we are cross compiling # silly google Patch8: v8-6.2.91-notcross.patch -# Use -g1 to avoid mem exhaust on i686 +# On i686, use -g1 to avoid mem exhaust Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel, ninja-build @@ -103,7 +103,9 @@ Python libraries from v8. %patch6 -p1 -b .sover %patch7 -p1 -b .noxlocale %patch8 -p1 -b .notcross +%ifarch i686 %patch9 -p1 -b .memexhaust +%endif cp -a %{SOURCE2} third_party/icu/BUILD.gn From 6449a12573f3a9c1e218100bd10301852200837c Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 3 Aug 2017 17:33:00 -0400 Subject: [PATCH 072/100] disable ppc64 --- v8.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v8.spec b/v8.spec index 556c1e2..a0b2194 100644 --- a/v8.spec +++ b/v8.spec @@ -58,7 +58,6 @@ Source4: gn-source-gitf833e90.tar.bz2 Patch0: v8-4.10.91-system_icu.patch Patch2: v8-5.2.258-bundled-binutils.patch Patch3: v8-5.2.258-gcc7.patch -Patch4: v8-6.2.91-ppc64.patch Patch5: v8-6.2.91-nolambda.patch Patch6: v8-6.2.91-sover.patch Patch7: v8-6.2.91-noxlocale.patch @@ -67,7 +66,9 @@ Patch7: v8-6.2.91-noxlocale.patch Patch8: v8-6.2.91-notcross.patch # On i686, use -g1 to avoid mem exhaust Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch -ExclusiveArch: %{ix86} x86_64 %{arm} ppc ppc64 aarch64 mipsel mips64el s390 s390x +# PPC64 doesn't like libcxx code. +# error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression +ExclusiveArch: %{ix86} x86_64 %{arm} ppc aarch64 mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel, libatomic BuildRequires: clang, llvm @@ -98,7 +99,6 @@ Python libraries from v8. %patch0 -p1 -b .system_icu %patch2 -p1 -b .bb # %%patch3 -p1 -b .gcc7 -%patch4 -p1 -b .ppc64 %patch5 -p1 -b .nolambda %patch6 -p1 -b .sover %patch7 -p1 -b .noxlocale From bbc0e064fe77ff0a6939b70c7f39f220fc77513d Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 4 Aug 2017 10:41:09 -0400 Subject: [PATCH 073/100] more weird arch fixes --- v8-6.2.91-nounused-function.patch | 11 +++++++++++ v8.spec | 13 ++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 v8-6.2.91-nounused-function.patch diff --git a/v8-6.2.91-nounused-function.patch b/v8-6.2.91-nounused-function.patch new file mode 100644 index 0000000..e3e6108 --- /dev/null +++ b/v8-6.2.91-nounused-function.patch @@ -0,0 +1,11 @@ +diff -up v8-6.2.91/build/config/compiler/BUILD.gn.nounused v8-6.2.91/build/config/compiler/BUILD.gn +--- v8-6.2.91/build/config/compiler/BUILD.gn.nounused 2017-08-04 10:35:44.212100721 -0400 ++++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-04 10:36:25.554097933 -0400 +@@ -1740,6 +1740,7 @@ config("symbols") { + cflags += [ "-gdwarf-3" ] + } + cflags += [ "-g2" ] ++ cflags += [ "-Wno-unused-function" ] + } + if (use_debug_fission) { + cflags += [ "-gsplit-dwarf" ] diff --git a/v8.spec b/v8.spec index a0b2194..da5419d 100644 --- a/v8.spec +++ b/v8.spec @@ -64,11 +64,15 @@ Patch7: v8-6.2.91-noxlocale.patch # do not assume we are cross compiling # silly google Patch8: v8-6.2.91-notcross.patch -# On i686, use -g1 to avoid mem exhaust +# On i686 and armv7hl, use -g1 to avoid mem exhaust Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch +# On s390x +Patch10: v8-6.2.91-nounused-function.patch + # PPC64 doesn't like libcxx code. # error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression -ExclusiveArch: %{ix86} x86_64 %{arm} ppc aarch64 mipsel mips64el s390 s390x +# aarch64 doesn't work either. +ExclusiveArch: %{ix86} x86_64 %{arm} ppc mipsel mips64el s390 s390x BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel, libatomic BuildRequires: clang, llvm @@ -103,9 +107,12 @@ Python libraries from v8. %patch6 -p1 -b .sover %patch7 -p1 -b .noxlocale %patch8 -p1 -b .notcross -%ifarch i686 +%ifarch i686 armv7hl %patch9 -p1 -b .memexhaust %endif +%ifarch s390x +%patch10 -p1 -b .nounused +%endif cp -a %{SOURCE2} third_party/icu/BUILD.gn From d9d42c9fee94637656a4c982043e7604d541efdf Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 4 Aug 2017 12:23:25 -0400 Subject: [PATCH 074/100] add Wno-unused-result for s390 --- v8-6.2.91-nounused-function.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8-6.2.91-nounused-function.patch b/v8-6.2.91-nounused-function.patch index e3e6108..a70ed05 100644 --- a/v8-6.2.91-nounused-function.patch +++ b/v8-6.2.91-nounused-function.patch @@ -5,7 +5,7 @@ diff -up v8-6.2.91/build/config/compiler/BUILD.gn.nounused v8-6.2.91/build/confi cflags += [ "-gdwarf-3" ] } cflags += [ "-g2" ] -+ cflags += [ "-Wno-unused-function" ] ++ cflags += [ "-Wno-unused-function" , "-Wno-unused-result" ] } if (use_debug_fission) { cflags += [ "-gsplit-dwarf" ] From 22eda50fa18565700b9ec87c1748ef7915065ab2 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 4 Aug 2017 23:10:09 -0400 Subject: [PATCH 075/100] disable s390 --- v8.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/v8.spec b/v8.spec index da5419d..cd83640 100644 --- a/v8.spec +++ b/v8.spec @@ -66,13 +66,12 @@ Patch7: v8-6.2.91-noxlocale.patch Patch8: v8-6.2.91-notcross.patch # On i686 and armv7hl, use -g1 to avoid mem exhaust Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch -# On s390x -Patch10: v8-6.2.91-nounused-function.patch # PPC64 doesn't like libcxx code. # error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression # aarch64 doesn't work either. -ExclusiveArch: %{ix86} x86_64 %{arm} ppc mipsel mips64el s390 s390x +# code does not compile on s390 +ExclusiveArch: %{ix86} x86_64 %{arm} ppc mipsel mips64el BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel, libatomic BuildRequires: clang, llvm @@ -110,9 +109,6 @@ Python libraries from v8. %ifarch i686 armv7hl %patch9 -p1 -b .memexhaust %endif -%ifarch s390x -%patch10 -p1 -b .nounused -%endif cp -a %{SOURCE2} third_party/icu/BUILD.gn From 2658cd340490b307a4255dbe23d56d585b0868a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 19 Aug 2017 09:44:16 -0400 Subject: [PATCH 076/100] Python 2 binary package renamed to python2-v8 --- v8.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/v8.spec b/v8.spec index da5419d..e64f9f9 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -90,11 +90,15 @@ Requires: %{name} = %{epoch}:%{version}-%{release} %description devel Development headers and libraries for v8. -%package python +%package -n python2-v8 +%{?python_provide:%python_provide python2-v8} +# Remove before F30 +Provides: %{name}-python%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-python < %{version}-%{release} Summary: Python libraries from v8 Requires: %{name} = %{epoch}:%{version}-%{release} -%description python +%description -n python2-v8 Python libraries from v8. %prep @@ -265,10 +269,14 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{_includedir}/v8/extensions/ %{_libdir}/*.so -%files python +%files -n python2-v8 %{python_sitelib}/j*.py* %changelog +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1:6.2.91-2 +- Python 2 binary package renamed to python2-v8 + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + * Mon Jul 31 2017 Tom Callaway - 1:6.2.91-1 - 6.2.91 From 267f0d30fa934187102de1fcae8d075f5edeed9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 20 Aug 2017 10:44:01 -0400 Subject: [PATCH 077/100] Add Provides for the old name without %_isa --- v8.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index e64f9f9..8a3117f 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -93,6 +93,7 @@ Development headers and libraries for v8. %package -n python2-v8 %{?python_provide:%python_provide python2-v8} # Remove before F30 +Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: Python libraries from v8 @@ -273,6 +274,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 1:6.2.91-3 +- Add Provides for the old name without %%_isa + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1:6.2.91-2 - Python 2 binary package renamed to python2-v8 See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 From e1c1ef71a015af833659c7a50fbf1cf560e043dc Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 31 Aug 2017 21:09:19 -0400 Subject: [PATCH 078/100] disable some cflags on fedora 25 or older --- v8-6.2.91-oldclang-flags.patch | 19 +++++++++++++++++++ v8.spec | 11 ++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 v8-6.2.91-oldclang-flags.patch diff --git a/v8-6.2.91-oldclang-flags.patch b/v8-6.2.91-oldclang-flags.patch new file mode 100644 index 0000000..ed61d57 --- /dev/null +++ b/v8-6.2.91-oldclang-flags.patch @@ -0,0 +1,19 @@ +diff -up v8-6.2.91/build/config/compiler/BUILD.gn.oldclang v8-6.2.91/build/config/compiler/BUILD.gn +--- v8-6.2.91/build/config/compiler/BUILD.gn.oldclang 2017-08-31 21:05:13.342875120 -0400 ++++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-31 21:05:40.092124090 -0400 +@@ -1168,13 +1168,13 @@ config("default_warnings") { + "-Wno-nonportable-include-path", + + # TODO(hans): https://crbug.com/637306 +- "-Wno-address-of-packed-member", ++ # "-Wno-address-of-packed-member", + + # TODO(hans): https://crbug.com/681136 + # "-Wno-unused-lambda-capture", + + # TODO(thakis ): https://crbug.com/683349 +- "-Wno-user-defined-warnings", ++ # "-Wno-user-defined-warnings", + ] + } else if (use_xcode_clang && xcode_version_int >= 830) { + # This is necessary to allow a progressive transition from using xcode 8.0 diff --git a/v8.spec b/v8.spec index 0643180..71b8b79 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -66,6 +66,9 @@ Patch7: v8-6.2.91-noxlocale.patch Patch8: v8-6.2.91-notcross.patch # On i686 and armv7hl, use -g1 to avoid mem exhaust Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch +# Fedora 25 and older need less flags +# and clang is not tolerant of flags it doesn't know about +Patch10: v8-6.2.91-oldclang-flags.patch # PPC64 doesn't like libcxx code. # error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression @@ -114,6 +117,9 @@ Python libraries from v8. %ifarch i686 armv7hl %patch9 -p1 -b .memexhaust %endif +%if 0%{?fedora} <= 25 +%patch10 -p1 -b .oldflags +%endif cp -a %{SOURCE2} third_party/icu/BUILD.gn @@ -270,6 +276,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Thu Aug 31 2017 Tom Callaway - 1:6.2.91-4 +- disable some cflags on fedora 25 or older + * Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 1:6.2.91-3 - Add Provides for the old name without %%_isa From 12974b749add8b5229855f7af74899369660ce09 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Thu, 30 Nov 2017 20:55:18 +0000 Subject: [PATCH 079/100] Rebuild for ICU 60.1 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 71b8b79..467d132 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -276,6 +276,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Thu Nov 30 2017 Pete Walter - 1:6.2.91-5 +- Rebuild for ICU 60.1 + * Thu Aug 31 2017 Tom Callaway - 1:6.2.91-4 - disable some cflags on fedora 25 or older From f9123b41805757046f6f12bbc804cca89881409f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 22 Jan 2018 12:38:43 -0500 Subject: [PATCH 080/100] Add symlink for libv8_libplatform.so --- v8.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/v8.spec b/v8.spec index 467d132..ba9e2b6 100644 --- a/v8.spec +++ b/v8.spec @@ -241,6 +241,7 @@ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ # Make shared library links pushd %{buildroot}%{_libdir} ln -sf libv8.so.%{somajor} libv8.so +ln -sf libv8_libplatform.so.%{somajor} libv8_libplatform.so popd # install Python JS minifier scripts for nodejs From de0cf1e11f5c0b16593fe76dede1ddb2fa1c8da4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:15:04 +0000 Subject: [PATCH 081/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 467d132..3d5f35d 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -276,6 +276,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1:6.2.91-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Nov 30 2017 Pete Walter - 1:6.2.91-5 - Rebuild for ICU 60.1 From 93d511b5e990349aa4d3802344cd067bcdecd420 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 19 Feb 2018 17:01:17 -0500 Subject: [PATCH 082/100] fix platform library symlink --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index c0271b8..46257c8 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -277,6 +277,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Mon Feb 19 2018 Tom Callaway - 1:6.2.91-7 +- fix platform library symlink + * Fri Feb 09 2018 Fedora Release Engineering - 1:6.2.91-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From c294b122ff82689f4d581fabaab063ff99b74cd8 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 7 Mar 2018 20:39:08 -0800 Subject: [PATCH 083/100] Rebuild to fix GCC 8 mis-compilation See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64") --- v8.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 46257c8..d670b94 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -277,6 +277,10 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Wed Mar 07 2018 Adam Williamson - 1:6.2.91-8 +- Rebuild to fix GCC 8 mis-compilation + See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64") + * Mon Feb 19 2018 Tom Callaway - 1:6.2.91-7 - fix platform library symlink From 6fbf9a9fbfd45f41c0c2a44a8db97334766046eb Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 14 Mar 2018 16:27:09 -0400 Subject: [PATCH 084/100] 6.7.17 --- .gitignore | 1 + sources | 2 +- v8-6.7.17-fixme.patch | 335 +++++++++++++++++++++++++++++++++++++++ v8-6.7.17-notcross.patch | 141 ++++++++++++++++ v8-6.7.17-optflags.patch | 21 +++ v8.spec | 60 +++++-- 6 files changed, 544 insertions(+), 16 deletions(-) create mode 100644 v8-6.7.17-fixme.patch create mode 100644 v8-6.7.17-notcross.patch create mode 100644 v8-6.7.17-optflags.patch diff --git a/.gitignore b/.gitignore index 18f89b5..0c89236 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /depot_tools.git-master.tar.gz /chromium-base-git2d35e4d.tar.bz2 /gn-source-gitf833e90.tar.bz2 +/v8-6.7.17.tar.xz diff --git a/sources b/sources index 4948b37..52c5db6 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (v8-6.2.91.tar.xz) = 08cb841936c0463f12bc7cacda2d9d27dfd3814deb4788efaa66cc931331bd43bfeb606bbdfe1256f277bf46c007789268a45ffb1fc6a35b7607360c0c026139 SHA512 (depot_tools.git-master.tar.gz) = e4edee0fe870caf93a92e40cd30dc8b03a3cce27e73e9cbf5a26f4f3048611b2e485963cf9c738fca2c381f61838187b2c082e798d0456434a558e2eea9864b0 SHA512 (chromium-base-git2d35e4d.tar.bz2) = a1dc21fb69908def3baaaccffbd9bc32b9e9b0c51bd6cee2d1509e0175c77c57e3b87dc18751aa6f2406724f41f7972576e66455f6d23765471315265704644e SHA512 (gn-source-gitf833e90.tar.bz2) = 24a06a6fc1afbb6a7de5b702310dcff151250643a059e5f2540a3a12750f9880d865955b5a1f1ed8185c320db6f09a6c8c4540720c340b4a148fa9d87dda2938 +SHA512 (v8-6.7.17.tar.xz) = 770de7234667fe22e1a517c806716a57cc4cf1f1fe82a618f14c8fe0a886770b4e67677b95d885783618a41f05f620cb8e85a26928d482e02335fd0303375b18 diff --git a/v8-6.7.17-fixme.patch b/v8-6.7.17-fixme.patch new file mode 100644 index 0000000..0a0d835 --- /dev/null +++ b/v8-6.7.17-fixme.patch @@ -0,0 +1,335 @@ +diff -up v8-6.7.17/build/config/compiler/BUILD.gn.fixme v8-6.7.17/build/config/compiler/BUILD.gn +--- v8-6.7.17/build/config/compiler/BUILD.gn.fixme 2018-03-14 11:47:13.723221338 -0400 ++++ v8-6.7.17/build/config/compiler/BUILD.gn 2018-03-14 11:47:13.712221590 -0400 +@@ -185,7 +185,7 @@ config("compiler") { + ldflags = [] + defines = [] + configs = [] +- inputs = [] ++ # inputs = [] + + # System-specific flags. If your compiler flags apply to one of the + # categories here, add it to the associated file to keep this shared config +@@ -1278,6 +1278,9 @@ config("default_warnings") { + # [1] https://gcc.gnu.org/gcc-6/porting_to.html#this-cannot-be-null + # [2] https://crbug.com/784492#c13 + cflags += [ "-fno-delete-null-pointer-checks" ] ++ ++ # workaround tests ++ cflags += [ "-Wno-error=subobject-linkage" ] + } + } + +diff -up v8-6.7.17/src/base/file-utils.cc.fixme v8-6.7.17/src/base/file-utils.cc +--- v8-6.7.17/src/base/file-utils.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/base/file-utils.cc 2018-03-14 11:47:12.586247445 -0400 +@@ -25,7 +25,7 @@ char* RelativePath(char** buffer, const + reinterpret_cast(calloc(path_separator + name_length + 2, 1)); + *buffer[0] = '\0'; + strncat(*buffer, exec_path, path_separator + 1); +- strncat(*buffer, name, name_length); ++ strncat(*buffer, name, name_length + 1); + } else { + *buffer = strdup(name); + } +diff -up v8-6.7.17/src/base/macros.h.fixme v8-6.7.17/src/base/macros.h +--- v8-6.7.17/src/base/macros.h.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/base/macros.h 2018-03-14 11:47:12.587247422 -0400 +@@ -102,7 +102,7 @@ V8_INLINE Dest bit_cast(Source const& so + static_assert(sizeof(Dest) == sizeof(Source), + "source and dest must be same size"); + Dest dest; +- memcpy(&dest, &source, sizeof(dest)); ++ memcpy(static_cast(&dest), &source, sizeof(dest)); + return dest; + } + +@@ -387,10 +387,10 @@ bool is_inbounds(float_t v) { + static_cast(std::numeric_limits::min()) - 1; + constexpr float_t kUpperBound = + static_cast(std::numeric_limits::max()) + 1; +- constexpr bool kLowerBoundIsMin = ++ constexpr bool kLowerBoundIsMin __attribute__((unused)) = + static_cast(kLowerBound) == + static_cast(std::numeric_limits::min()); +- constexpr bool kUpperBoundIsMax = ++ constexpr bool kUpperBoundIsMax __attribute__((unused)) = + static_cast(kUpperBound) == + static_cast(std::numeric_limits::max()); + return (kLowerBoundIsMin ? (kLowerBound <= v) : (kLowerBound < v)) && +diff -up v8-6.7.17/src/compiler/node-cache.cc.fixme v8-6.7.17/src/compiler/node-cache.cc +--- v8-6.7.17/src/compiler/node-cache.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/compiler/node-cache.cc 2018-03-14 11:47:12.587247422 -0400 +@@ -38,7 +38,7 @@ bool NodeCache::Resize( + size_ *= 4; + size_t num_entries = size_ + kLinearProbe; + entries_ = zone->NewArray(num_entries); +- memset(entries_, 0, sizeof(Entry) * num_entries); ++ memset(static_cast(entries_), 0, sizeof(Entry) * num_entries); + + // Insert the old entries into the new block. + for (size_t i = 0; i < old_size; ++i) { +@@ -69,7 +69,7 @@ Node** NodeCache::Find( + size_t num_entries = kInitialSize + kLinearProbe; + entries_ = zone->NewArray(num_entries); + size_ = kInitialSize; +- memset(entries_, 0, sizeof(Entry) * num_entries); ++ memset(static_cast(entries_), 0, sizeof(Entry) * num_entries); + Entry* entry = &entries_[hash & (kInitialSize - 1)]; + entry->key_ = key; + return &entry->value_; +diff -up v8-6.7.17/src/compiler/simd-scalar-lowering.cc.fixme v8-6.7.17/src/compiler/simd-scalar-lowering.cc +--- v8-6.7.17/src/compiler/simd-scalar-lowering.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/compiler/simd-scalar-lowering.cc 2018-03-14 11:47:12.587247422 -0400 +@@ -38,7 +38,7 @@ SimdScalarLowering::SimdScalarLowering( + DCHECK_NOT_NULL(graph()); + DCHECK_NOT_NULL(graph()->end()); + replacements_ = zone()->NewArray(graph()->NodeCount()); +- memset(replacements_, 0, sizeof(Replacement) * graph()->NodeCount()); ++ memset(static_cast(replacements_), 0, sizeof(Replacement) * graph()->NodeCount()); + } + + void SimdScalarLowering::LowerGraph() { +diff -up v8-6.7.17/src/d8.cc.fixme v8-6.7.17/src/d8.cc +--- v8-6.7.17/src/d8.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/d8.cc 2018-03-14 11:47:12.588247399 -0400 +@@ -2691,7 +2691,10 @@ void Worker::ExecuteInThread() { + if (Shell::DeserializeValue(isolate, std::move(data)) + .ToLocal(&value)) { + Local argv[] = {value}; +- (void)onmessage_fun->Call(context, global, 1, argv); ++ MaybeLocal result = onmessage_fun->Call(context, global, 1, argv); ++ if (result.IsEmpty()) { ++ Shell::ReportException(isolate, &try_catch); ++ } + } + if (try_catch.HasCaught()) { + Shell::ReportException(isolate, &try_catch); +diff -up v8-6.7.17/src/flags.cc.fixme v8-6.7.17/src/flags.cc +--- v8-6.7.17/src/flags.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/flags.cc 2018-03-14 11:47:12.588247399 -0400 +@@ -557,6 +557,7 @@ static char* SkipBlackSpace(char* p) { + // static + int FlagList::SetFlagsFromString(const char* str, int len) { + // make a 0-terminated copy of str ++ assert(len > 0); + ScopedVector copy0(len + 1); + MemCopy(copy0.start(), str, len); + copy0[len] = '\0'; +diff -up v8-6.7.17/src/frames.h.fixme v8-6.7.17/src/frames.h +--- v8-6.7.17/src/frames.h.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/frames.h 2018-03-14 11:47:12.589247376 -0400 +@@ -44,7 +44,7 @@ class InnerPointerToCodeCache { + } + + void Flush() { +- memset(&cache_[0], 0, sizeof(cache_)); ++ memset(static_cast(&cache_[0]), 0, sizeof(cache_)); + } + + InnerPointerToCodeCacheEntry* GetCacheEntry(Address inner_pointer); +diff -up v8-6.7.17/src/libplatform/tracing/trace-object.cc.fixme v8-6.7.17/src/libplatform/tracing/trace-object.cc +--- v8-6.7.17/src/libplatform/tracing/trace-object.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/libplatform/tracing/trace-object.cc 2018-03-14 11:47:12.589247376 -0400 +@@ -25,7 +25,7 @@ V8_INLINE static void CopyTraceObjectPar + const char** member) { + if (*member) { + size_t length = strlen(*member) + 1; +- strncpy(*buffer, *member, length); ++ memcpy(*buffer, *member, length); + *member = *buffer; + *buffer += length; + } +diff -up v8-6.7.17/src/log.cc.fixme v8-6.7.17/src/log.cc +--- v8-6.7.17/src/log.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/log.cc 2018-03-14 11:47:12.590247353 -0400 +@@ -531,7 +531,7 @@ void JitLogger::LogRecordedBuffer(Abstra + SharedFunctionInfo* shared, const char* name, + int length) { + JitCodeEvent event; +- memset(&event, 0, sizeof(event)); ++ memset(static_cast(&event), 0, sizeof(event)); + event.type = JitCodeEvent::CODE_ADDED; + event.code_start = code->instruction_start(); + event.code_len = code->instruction_size(); +@@ -548,7 +548,7 @@ void JitLogger::LogRecordedBuffer(Abstra + void JitLogger::LogRecordedBuffer(const InstructionStream* stream, + const char* name, int length) { + JitCodeEvent event; +- memset(&event, 0, sizeof(event)); ++ memset(static_cast(&event), 0, sizeof(event)); + event.type = JitCodeEvent::CODE_ADDED; + event.code_start = stream->bytes(); + event.code_len = stream->byte_length(); +@@ -562,7 +562,7 @@ void JitLogger::LogRecordedBuffer(const + void JitLogger::LogRecordedBuffer(wasm::WasmCode* code, const char* name, + int length) { + JitCodeEvent event; +- memset(&event, 0, sizeof(event)); ++ memset(static_cast(&event), 0, sizeof(event)); + event.type = JitCodeEvent::CODE_ADDED; + event.code_start = code->instructions().start(); + event.code_len = code->instructions().length(); +@@ -594,7 +594,7 @@ void JitLogger::AddCodeLinePosInfoEvent( + int position, + JitCodeEvent::PositionType position_type) { + JitCodeEvent event; +- memset(&event, 0, sizeof(event)); ++ memset(static_cast(&event), 0, sizeof(event)); + event.type = JitCodeEvent::CODE_ADD_LINE_POS_INFO; + event.user_data = jit_handler_data; + event.line_info.offset = pc_offset; +@@ -607,7 +607,7 @@ void JitLogger::AddCodeLinePosInfoEvent( + + void* JitLogger::StartCodePosInfoEvent() { + JitCodeEvent event; +- memset(&event, 0, sizeof(event)); ++ memset(static_cast(&event), 0, sizeof(event)); + event.type = JitCodeEvent::CODE_START_LINE_INFO_RECORDING; + + code_event_handler_(&event); +@@ -617,7 +617,7 @@ void* JitLogger::StartCodePosInfoEvent() + void JitLogger::EndCodePosInfoEvent(Address start_address, + void* jit_handler_data) { + JitCodeEvent event; +- memset(&event, 0, sizeof(event)); ++ memset(static_cast(&event), 0, sizeof(event)); + event.type = JitCodeEvent::CODE_END_LINE_INFO_RECORDING; + event.code_start = start_address; + event.user_data = jit_handler_data; +diff -up v8-6.7.17/src/parsing/parser-base.h.fixme v8-6.7.17/src/parsing/parser-base.h +--- v8-6.7.17/src/parsing/parser-base.h.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/parsing/parser-base.h 2018-03-14 11:47:12.591247330 -0400 +@@ -2163,7 +2163,8 @@ template + typename ParserBase::ExpressionT ParserBase::ParsePropertyName( + IdentifierT* name, PropertyKind* kind, bool* is_generator, bool* is_get, + bool* is_set, bool* is_async, bool* is_computed_name, bool* ok) { +- DCHECK_EQ(*kind, PropertyKind::kNotSet); ++ PropertyKind kindns = PropertyKind::kNotSet; ++ DCHECK_EQ(*kind, kindns); + DCHECK(!*is_generator); + DCHECK(!*is_get); + DCHECK(!*is_set); +diff -up v8-6.7.17/src/wasm/wasm-module-builder.h.fixme v8-6.7.17/src/wasm/wasm-module-builder.h +diff -up v8-6.7.17/src/zone/zone-segment.cc.fixme v8-6.7.17/src/zone/zone-segment.cc +--- v8-6.7.17/src/zone/zone-segment.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/src/zone/zone-segment.cc 2018-03-14 11:47:12.591247330 -0400 +@@ -15,7 +15,7 @@ void Segment::ZapContents() { + + void Segment::ZapHeader() { + #ifdef DEBUG +- memset(this, kZapDeadByte, sizeof(Segment)); ++ memset(static_cast(this), kZapDeadByte, sizeof(Segment)); + #endif + } + +diff -up v8-6.7.17/test/cctest/compiler/graph-builder-tester.h.fixme v8-6.7.17/test/cctest/compiler/graph-builder-tester.h +--- v8-6.7.17/test/cctest/compiler/graph-builder-tester.h.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/test/cctest/compiler/graph-builder-tester.h 2018-03-14 11:47:12.591247330 -0400 +@@ -164,9 +164,6 @@ class GraphBuilderTester : public Handle + Node* ChangeUint32ToTagged(Node* a) { + return NewNode(simplified()->ChangeUint32ToTagged(), a); + } +- Node* ChangeFloat64ToTagged(Node* a) { +- return NewNode(simplified()->ChangeFloat64ToTagged(), a); +- } + Node* ChangeTaggedToBit(Node* a) { + return NewNode(simplified()->ChangeTaggedToBit(), a); + } +diff -up v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc.fixme v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc +--- v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc 2018-03-14 11:47:12.591247330 -0400 +@@ -81,7 +81,8 @@ v8::Local BytecodeExpectatio + } + + void BytecodeExpectationsPrinter::Run(v8::Local script) const { +- (void)script->Run(isolate_->GetCurrentContext()); ++ Local result = script->Run(isolate_->GetCurrentContext()).ToLocalChecked(); ++ CHECK(!result.IsEmpty()); + } + + i::Handle +diff -up v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc.fixme v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc +--- v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc.fixme 2018-03-06 13:58:16.000000000 -0500 ++++ v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc 2018-03-14 11:47:12.592247307 -0400 +@@ -194,7 +194,7 @@ TEST(Utf8ChunkBoundaries) { + for (size_t i = 1; i < len; i++) { + // Copy source string into buffer, splitting it at i. + // Then add three chunks, 0..i-1, i..strlen-1, empty. +- strncpy(buffer, unicode_utf8, i); ++ memcpy(buffer, unicode_utf8, i); + strncpy(buffer + i + 1, unicode_utf8 + i, len - i); + buffer[i] = '\0'; + buffer[len + 1] = '\0'; +@@ -220,8 +220,8 @@ TEST(Utf8SingleByteChunks) { + char buffer[arraysize(unicode_utf8) + 4]; + for (size_t i = 1; i < len - 1; i++) { + // Copy source string into buffer, make a single-byte chunk at i. +- strncpy(buffer, unicode_utf8, i); +- strncpy(buffer + i + 3, unicode_utf8 + i + 1, len - i - 1); ++ memcpy(buffer, unicode_utf8, i); ++ memcpy(buffer + i + 3, unicode_utf8 + i + 1, len - i - 1); + buffer[i] = '\0'; + buffer[i + 1] = unicode_utf8[i]; + buffer[i + 2] = '\0'; +diff -up v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h.fixme v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h +--- v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h.fixme 2018-03-14 12:49:02.620027123 -0400 ++++ v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h 2018-03-14 12:51:50.095577470 -0400 +@@ -34,6 +34,8 @@ + #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ + #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ + ++#pragma GCC diagnostic warning "-Wsubobject-linkage" ++ + #include + + #include +diff -up v8-6.7.17/test/unittests/base/functional-unittest.cc.fixme v8-6.7.17/test/unittests/base/functional-unittest.cc +--- v8-6.7.17/test/unittests/base/functional-unittest.cc.fixme 2018-03-06 13:58:17.000000000 -0500 ++++ v8-6.7.17/test/unittests/base/functional-unittest.cc 2018-03-14 11:47:12.592247307 -0400 +@@ -74,7 +74,9 @@ TYPED_TEST(FunctionalTest, EqualToImplie + this->rng()->NextBytes(values, sizeof(values)); + TRACED_FOREACH(TypeParam, v1, values) { + TRACED_FOREACH(TypeParam, v2, values) { +- if (e(v1, v2)) EXPECT_EQ(h(v1), h(v2)); ++ if (e(v1, v2)) { ++ EXPECT_EQ(h(v1), h(v2)); ++ } + } + } + } +@@ -143,7 +145,9 @@ TYPED_TEST(FunctionalTest, BitEqualToImp + this->rng()->NextBytes(&values, sizeof(values)); + TRACED_FOREACH(TypeParam, v1, values) { + TRACED_FOREACH(TypeParam, v2, values) { +- if (e(v1, v2)) EXPECT_EQ(h(v1), h(v2)); ++ if (e(v1, v2)) { ++ EXPECT_EQ(h(v1), h(v2)); ++ } + } + } + } +diff -up v8-6.7.17/test/unittests/detachable-vector-unittest.cc.fixme v8-6.7.17/test/unittests/detachable-vector-unittest.cc +--- v8-6.7.17/test/unittests/detachable-vector-unittest.cc.fixme 2018-03-06 13:58:17.000000000 -0500 ++++ v8-6.7.17/test/unittests/detachable-vector-unittest.cc 2018-03-14 11:47:12.592247307 -0400 +@@ -52,7 +52,7 @@ TEST(DetachableVector, DetachLeaksBackin + // Force allocation of the backing store. + v.push_back(1); + // Bit-copy the data structure. +- memcpy(&v2, &v, sizeof(DetachableVector)); ++ memcpy(static_cast(&v2), &v, sizeof(DetachableVector)); + // The backing store should be leaked here - free was not called. + v.detach(); + +diff -up v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc.fixme v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc +--- v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc.fixme 2018-03-14 12:44:18.816950209 -0400 ++++ v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc 2018-03-14 12:44:26.911778869 -0400 +@@ -28,7 +28,7 @@ TEST_F(WasmModuleBuilderTest, Regression + // Test crashed with asan. + ZoneBuffer buffer(zone()); + const size_t kSize = ZoneBuffer::kInitialSize * 3 + 4096 + 100; +- byte data[kSize]; ++ byte data[kSize] = {}; + buffer.write(data, kSize); + } + diff --git a/v8-6.7.17-notcross.patch b/v8-6.7.17-notcross.patch new file mode 100644 index 0000000..9f10625 --- /dev/null +++ b/v8-6.7.17-notcross.patch @@ -0,0 +1,141 @@ +diff -up v8-6.7.17/build/toolchain/linux/BUILD.gn.notcross v8-6.7.17/build/toolchain/linux/BUILD.gn +--- v8-6.7.17/build/toolchain/linux/BUILD.gn.notcross 2018-03-06 14:20:53.000000000 -0500 ++++ v8-6.7.17/build/toolchain/linux/BUILD.gn 2018-03-06 14:37:22.505146107 -0500 +@@ -6,7 +6,6 @@ import("//build/config/sysroot.gni") + import("//build/toolchain/gcc_toolchain.gni") + + clang_toolchain("clang_arm") { +- toolprefix = "arm-linux-gnueabihf-" + toolchain_args = { + current_cpu = "arm" + current_os = "linux" +@@ -14,7 +13,6 @@ clang_toolchain("clang_arm") { + } + + clang_toolchain("clang_arm64") { +- toolprefix = "aarch64-linux-gnu-" + toolchain_args = { + current_cpu = "arm64" + current_os = "linux" +@@ -22,15 +20,13 @@ clang_toolchain("clang_arm64") { + } + + gcc_toolchain("arm64") { +- toolprefix = "aarch64-linux-gnu-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" ++ cc = "gcc" ++ cxx = "g++" + +- ar = "${toolprefix}ar" ++ ar = "ar" + ld = cxx +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + current_cpu = "arm64" +@@ -40,15 +36,13 @@ gcc_toolchain("arm64") { + } + + gcc_toolchain("arm") { +- toolprefix = "arm-linux-gnueabihf-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" ++ cc = "gcc" ++ cxx = "g++" + +- ar = "${toolprefix}ar" ++ ar = "ar" + ld = cxx +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + current_cpu = "arm" +@@ -178,14 +172,12 @@ clang_toolchain("clang_mips64el") { + } + + gcc_toolchain("mipsel") { +- toolprefix = "mipsel-linux-gnu-" +- +- cc = "${toolprefix}gcc" +- cxx = " ${toolprefix}g++" +- ar = "${toolprefix}ar" ++ cc = "gcc" ++ cxx = "g++" ++ ar = "ar" + ld = cxx +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + cc_wrapper = "" +@@ -197,14 +189,12 @@ gcc_toolchain("mipsel") { + } + + gcc_toolchain("mips64el") { +- toolprefix = "mips64el-linux-gnuabi64-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" +- ar = "${toolprefix}ar" ++ cc = "gcc" ++ cxx = "g++" ++ ar = "ar" + ld = cxx +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" ++ readelf = "readelf" ++ nm = "nm" + + toolchain_args = { + cc_wrapper = "" +@@ -248,14 +238,12 @@ gcc_toolchain("ppc64") { + } + + gcc_toolchain("mips") { +- toolprefix = "mips-linux-gnu-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" ++ cc = "gcc" ++ cxx = "g++" + +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" +- ar = "${toolprefix}ar" ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" + ld = cxx + + toolchain_args = { +@@ -266,14 +254,12 @@ gcc_toolchain("mips") { + } + + gcc_toolchain("mips64") { +- toolprefix = "mips64-linux-gnuabi64-" +- +- cc = "${toolprefix}gcc" +- cxx = "${toolprefix}g++" ++ cc = "gcc" ++ cxx = "g++" + +- readelf = "${toolprefix}readelf" +- nm = "${toolprefix}nm" +- ar = "${toolprefix}ar" ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" + ld = cxx + + toolchain_args = { diff --git a/v8-6.7.17-optflags.patch b/v8-6.7.17-optflags.patch new file mode 100644 index 0000000..fbb327d --- /dev/null +++ b/v8-6.7.17-optflags.patch @@ -0,0 +1,21 @@ +diff -up v8-6.7.17/build/config/compiler/BUILD.gn.optflags v8-6.7.17/build/config/compiler/BUILD.gn +--- v8-6.7.17/build/config/compiler/BUILD.gn.optflags 2018-03-14 14:20:29.275684642 -0400 ++++ v8-6.7.17/build/config/compiler/BUILD.gn 2018-03-14 14:22:25.056966902 -0400 +@@ -1849,7 +1849,7 @@ config("optimize_speed") { + # "default_optimization", below. + configs = [ "//build/config/nacl:irt_optimize" ] + } else { +- ldflags = common_optimize_on_ldflags ++ ldflags = [ "$OPTLDFLAGS" ] + common_optimize_on_ldflags + if (is_win) { + # Favor speed over size, /O2 must be before the common flags. The GYP + # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. +@@ -1870,7 +1870,7 @@ config("optimize_speed") { + } else if (optimize_for_fuzzing) { + cflags = [ "-O1" ] + common_optimize_on_cflags + } else { +- cflags = [ "-O3" ] + common_optimize_on_cflags ++ cflags = [ "$OPTFLAGS" ] + common_optimize_on_cflags + } + } + } diff --git a/v8.spec b/v8.spec index 46257c8..be57a14 100644 --- a/v8.spec +++ b/v8.spec @@ -19,13 +19,13 @@ # Hey, now there are four digits. What do they mean? Popsicle. # Now there are three digits. Yeah. HOW ABOUT DEM APPLES?!? %global somajor 6 -%global sominor 2 -%global sobuild 91 +%global sominor 7 +%global sobuild 17 %global sover %{somajor} Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 7%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -38,12 +38,12 @@ URL: https://chromium.googlesource.com/v8/v8/ # cd v8-tmp # fetch v8 # cd v8 -# git checkout 6.2.91 +# git checkout 6.7.17 # gclient sync # cd .. -# mv v8 v8-6.2.91 -# tar -c --exclude=.git --exclude=build/linux -J -f v8-6.2.91.tar.xz v8-6.2.91 -Source0: v8-6.2.91.tar.xz +# mv v8 v8-6.7.17 +# tar -c --exclude=.git --exclude=build/linux -J -f v8-6.7.17.tar.xz v8-6.7.17 +Source0: v8-6.7.17.tar.xz # https://chromium.googlesource.com/chromium/tools/depot_tools.git/+archive/7e7a454f9afdddacf63e10be48f0eab603be654e.tar.gz Source1: depot_tools.git-master.tar.gz # Taken from chromium-60.0.3112.78/build/linux/unbundle/icu.gn @@ -55,20 +55,26 @@ Source3: chromium-base-git2d35e4d.tar.bz2 # git clone https://chromium.googlesource.com/chromium/src/tools/gn # tar cvfj gn-source-gitf833e90.tar.bz2 gn/ Source4: gn-source-gitf833e90.tar.bz2 -Patch0: v8-4.10.91-system_icu.patch -Patch2: v8-5.2.258-bundled-binutils.patch +# Patch0: v8-4.10.91-system_icu.patch +# Patch2: v8-5.2.258-bundled-binutils.patch Patch3: v8-5.2.258-gcc7.patch Patch5: v8-6.2.91-nolambda.patch Patch6: v8-6.2.91-sover.patch -Patch7: v8-6.2.91-noxlocale.patch +# Patch7: v8-6.2.91-noxlocale.patch # do not assume we are cross compiling # silly google -Patch8: v8-6.2.91-notcross.patch +Patch8: v8-6.7.17-notcross.patch # On i686 and armv7hl, use -g1 to avoid mem exhaust Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch # Fedora 25 and older need less flags # and clang is not tolerant of flags it doesn't know about Patch10: v8-6.2.91-oldclang-flags.patch +# Workaround gcc8 bug in gn +Patch11: v8-6.2.91-gcc8-gn-fabi11.patch +# So many gcc fixes +Patch12: v8-6.7.17-fixme.patch +# Use Fedora optflags +Patch13: v8-6.7.17-optflags.patch # PPC64 doesn't like libcxx code. # error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression @@ -77,7 +83,8 @@ Patch10: v8-6.2.91-oldclang-flags.patch ExclusiveArch: %{ix86} x86_64 %{arm} ppc mipsel mips64el BuildRequires: readline-devel, libicu-devel, ninja-build BuildRequires: python2-devel, glib2-devel, libatomic -BuildRequires: clang, llvm +# BuildRequires: clang, llvm +BuildRequires: gcc, gcc-c++ %description V8 is Google's open source JavaScript engine. V8 is written in C++ and is used @@ -107,12 +114,12 @@ Python libraries from v8. %prep %setup -q -T -c -n depot_tools -a 1 %setup -q -n %{name}-%{version} -a 3 -%patch0 -p1 -b .system_icu -%patch2 -p1 -b .bb +# %%patch0 -p1 -b .system_icu +# %%patch2 -p1 -b .bb # %%patch3 -p1 -b .gcc7 %patch5 -p1 -b .nolambda %patch6 -p1 -b .sover -%patch7 -p1 -b .noxlocale +# %%patch7 -p1 -b .noxlocale %patch8 -p1 -b .notcross %ifarch i686 armv7hl %patch9 -p1 -b .memexhaust @@ -127,6 +134,25 @@ pushd tools tar xvf %{SOURCE4} popd +%patch11 -p1 -b .fabi11 +%patch12 -p1 -b .fixme +%patch13 -p1 -b .optflags + +SPLITOPTFLAGS="" +for i in `echo %{optflags} | sed 's/ /\n/g'`; do + SPLITOPTFLAGS+="\"$i\", " +done +export SPLITOPTFLAGS + +SPLITLDFLAGS="" +for j in `echo %{build_ldflags} | sed 's/ /\n/g'`; do + SPLITLDFLAGS+="\"$j\", " +done +export SPLITLDFLAGS + +sed -i "s|\"\$OPTFLAGS\"|$SPLITOPTFLAGS|g" build/config/compiler/BUILD.gn +sed -i "s|\"\$OPTLDFLAGS\"|$SPLITLDFLAGS|g" build/config/compiler/BUILD.gn + # Use system header ... except it doesn't work. # rm -rf src/third_party/valgrind/valgrind.h # ln -s /usr/include/valgrind/valgrind.h src/third_party/valgrind/valgrind.h @@ -201,6 +227,7 @@ V8_GN_DEFINES="" V8_GN_DEFINES+=' use_sysroot=false use_gold=false enable_nacl=false linux_use_bundled_binutils=false is_component_build=true clang_use_chrome_plugins=false' V8_GN_DEFINES+=' libcpp_is_static=true v8_use_external_startup_data=false' V8_GN_DEFINES+=' v8_target_cpu="%{v8arch}"' +V8_GN_DEFINES+=' is_clang=false' %ifarch armv7hl armv7hnl V8_GN_DEFINES+=' arm_float_abi="hard"' %endif @@ -277,6 +304,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Tue Mar 6 2018 Tom Callaway - 1:6.7.17-1 +- update to 6.7.17 + * Mon Feb 19 2018 Tom Callaway - 1:6.2.91-7 - fix platform library symlink From a9c7ab9c26a1cef6c221e027e51aed6d2aefe6ed Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 15 Mar 2018 10:06:40 -0400 Subject: [PATCH 085/100] missing patch --- v8-6.2.91-gcc8-gn-fabi11.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 v8-6.2.91-gcc8-gn-fabi11.patch diff --git a/v8-6.2.91-gcc8-gn-fabi11.patch b/v8-6.2.91-gcc8-gn-fabi11.patch new file mode 100644 index 0000000..3a7ca51 --- /dev/null +++ b/v8-6.2.91-gcc8-gn-fabi11.patch @@ -0,0 +1,15 @@ +diff -up v8-6.2.91/tools/gn/bootstrap/bootstrap.py.fabi11 v8-6.2.91/tools/gn/bootstrap/bootstrap.py +--- v8-6.2.91/tools/gn/bootstrap/bootstrap.py.fabi11 2018-02-19 17:11:22.650679128 -0500 ++++ v8-6.2.91/tools/gn/bootstrap/bootstrap.py 2018-02-19 17:11:46.579128407 -0500 +@@ -314,6 +314,11 @@ def write_gn_ninja(path, root_gen_dir, o + cflags = os.environ.get('CFLAGS', '').split() + cflags_cc = os.environ.get('CXXFLAGS', '').split() + ldflags = os.environ.get('LDFLAGS', '').split() ++ ++ # Work around GCC8 bug gcc#84286 ++ cflags.extend(['-fabi-version=11']) ++ cflags_cc.extend(['-fabi-version=11']) ++ + include_dirs = [root_gen_dir, SRC_ROOT] + libs = [] + From 3c880f4ed0064017334ab631f963fbfa74505a4f Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 15 Mar 2018 10:21:16 -0400 Subject: [PATCH 086/100] fix i686 patch --- v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch | 12 ++++++++++++ v8.spec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch diff --git a/v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch b/v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch new file mode 100644 index 0000000..760d3bb --- /dev/null +++ b/v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch @@ -0,0 +1,12 @@ +diff -up v8-6.7.17/build/config/compiler/BUILD.gn.memexhaust v8-6.7.17/build/config/compiler/BUILD.gn +--- v8-6.7.17/build/config/compiler/BUILD.gn.memexhaust 2018-03-15 10:19:59.313283572 -0400 ++++ v8-6.7.17/build/config/compiler/BUILD.gn 2018-03-15 10:20:09.750008452 -0400 +@@ -2010,7 +2010,7 @@ config("symbols") { + # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f + cflags += [ "-gdwarf-3" ] + } +- cflags += [ "-g2" ] ++ cflags += [ "-g1" ] + } + if (use_debug_fission && !is_nacl) { + cflags += [ "-gsplit-dwarf" ] diff --git a/v8.spec b/v8.spec index ddad460..00b0a5a 100644 --- a/v8.spec +++ b/v8.spec @@ -65,7 +65,7 @@ Patch6: v8-6.2.91-sover.patch # silly google Patch8: v8-6.7.17-notcross.patch # On i686 and armv7hl, use -g1 to avoid mem exhaust -Patch9: v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch +Patch9: v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch # Fedora 25 and older need less flags # and clang is not tolerant of flags it doesn't know about Patch10: v8-6.2.91-oldclang-flags.patch From 596c60665a96aba115da63b9147ffea0f981d735 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Mon, 30 Apr 2018 20:43:31 +0100 Subject: [PATCH 087/100] Rebuild for ICU 61.1 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 00b0a5a..456416c 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -304,6 +304,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Mon Apr 30 2018 Pete Walter - 1:6.7.17-2 +- Rebuild for ICU 61.1 + * Wed Mar 14 2018 Tom Callaway - 1:6.7.17-1 - update to 6.7.17 From 5671b844eba546041a3720ff56bedf57062164f2 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Tue, 8 May 2018 12:50:21 +0300 Subject: [PATCH 088/100] Fix arm build (libc++abi issue) Upstream ticket: https://bugs.llvm.org/show_bug.cgi?id=35945 Modified patch from https://reviews.llvm.org/D42242 --- v8-6.7.17-fix-gcc-unwind-header.patch | 236 ++++++++++++++++++++++++++ v8.spec | 10 +- 2 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 v8-6.7.17-fix-gcc-unwind-header.patch diff --git a/v8-6.7.17-fix-gcc-unwind-header.patch b/v8-6.7.17-fix-gcc-unwind-header.patch new file mode 100644 index 0000000..6bd2a0c --- /dev/null +++ b/v8-6.7.17-fix-gcc-unwind-header.patch @@ -0,0 +1,236 @@ +diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp +--- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp 2018-03-06 14:20:54.000000000 -0500 ++++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp 2018-05-07 11:01:44.464845299 -0400 +@@ -36,13 +36,10 @@ + { + _Unwind_Exception* unwind_exception = + reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; +- bool native_exception = +- (unwind_exception->exception_class & get_vendor_and_language) == +- (kOurExceptionClass & get_vendor_and_language); +- if (native_exception) ++ if (__isOurExceptionClass(unwind_exception)) + { + void* thrown_object = +- unwind_exception->exception_class == kOurDependentExceptionClass ? ++ __getExceptionClass(unwind_exception) == kOurDependentExceptionClass ? + ((__cxa_dependent_exception*)exception_header)->primaryException : + exception_header + 1; + const __shim_type_info* thrown_type = +diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp +--- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp 2018-03-06 14:20:54.000000000 -0500 ++++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp 2018-05-07 11:01:44.472845276 -0400 +@@ -78,22 +78,37 @@ + alignof(__cxa_exception)); + } + +-static void setExceptionClass(_Unwind_Exception* unwind_exception) { +- unwind_exception->exception_class = kOurExceptionClass; ++void __setExceptionClass(_Unwind_Exception* unwind_exception, uint64_t newValue) { ++ ::memcpy(&unwind_exception->exception_class, &newValue, sizeof(newValue)); ++ } ++ ++ ++static void setOurExceptionClass(_Unwind_Exception* unwind_exception) { ++ __setExceptionClass(unwind_exception, kOurExceptionClass); + } + + static void setDependentExceptionClass(_Unwind_Exception* unwind_exception) { +- unwind_exception->exception_class = kOurDependentExceptionClass; ++ __setExceptionClass(unwind_exception, kOurDependentExceptionClass); + } + + // Is it one of ours? +-static bool isOurExceptionClass(const _Unwind_Exception* unwind_exception) { +- return (unwind_exception->exception_class & get_vendor_and_language) == +- (kOurExceptionClass & get_vendor_and_language); ++uint64_t __getExceptionClass(const _Unwind_Exception* unwind_exception) { ++// On x86 and some ARM unwinders, unwind_exception->exception_class is ++// a uint64_t. On other ARM unwinders, it is a char[8] ++// See: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf ++// So we just copy it into a uint64_t to be sure. ++ uint64_t exClass; ++ ::memcpy(&exClass, &unwind_exception->exception_class, sizeof(exClass)); ++ return exClass; ++} ++ ++bool __isOurExceptionClass(const _Unwind_Exception* unwind_exception) { ++ return (__getExceptionClass(unwind_exception) & get_vendor_and_language) == ++ (kOurExceptionClass & get_vendor_and_language); + } + + static bool isDependentException(_Unwind_Exception* unwind_exception) { +- return (unwind_exception->exception_class & 0xFF) == 0x01; ++ return (__getExceptionClass(unwind_exception) & 0xFF) == 0x01; + } + + // This does not need to be atomic +@@ -248,7 +263,7 @@ + exception_header->terminateHandler = std::get_terminate(); + exception_header->exceptionType = tinfo; + exception_header->exceptionDestructor = dest; +- setExceptionClass(&exception_header->unwindHeader); ++ setOurExceptionClass(&exception_header->unwindHeader); + exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety. + globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local + +@@ -299,7 +314,7 @@ + __cxa_exception* exception_header = + cxa_exception_from_exception_unwind_exception(unwind_exception); + +- if (isOurExceptionClass(unwind_exception)) ++ if (__isOurExceptionClass(unwind_exception)) + { + if (0 == exception_header->propagationCount) + { +@@ -342,7 +357,7 @@ + std::terminate(); + } + +- if (isOurExceptionClass(&exception_header->unwindHeader)) ++ if (__isOurExceptionClass(&exception_header->unwindHeader)) + { + --exception_header->propagationCount; + if (0 == exception_header->propagationCount) +@@ -407,7 +422,7 @@ + __cxa_begin_catch(void* unwind_arg) throw() + { + _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg); +- bool native_exception = isOurExceptionClass(unwind_exception); ++ bool native_exception = __isOurExceptionClass(unwind_exception); + __cxa_eh_globals* globals = __cxa_get_globals(); + // exception_header is a hackish offset from a foreign exception, but it + // works as long as we're careful not to try to access any __cxa_exception +@@ -484,7 +499,7 @@ + // nothing more to be done. Do nothing! + if (NULL != exception_header) + { +- bool native_exception = isOurExceptionClass(&exception_header->unwindHeader); ++ bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader); + if (native_exception) + { + // This is a native exception +@@ -549,7 +564,7 @@ + __cxa_exception *exception_header = globals->caughtExceptions; + if (NULL == exception_header) + return NULL; // No current exception +- if (!isOurExceptionClass(&exception_header->unwindHeader)) ++ if (!__isOurExceptionClass(&exception_header->unwindHeader)) + return NULL; + return exception_header->exceptionType; + } +@@ -571,7 +586,7 @@ + __cxa_exception* exception_header = globals->caughtExceptions; + if (NULL == exception_header) + std::terminate(); // throw; called outside of a exception handler +- bool native_exception = isOurExceptionClass(&exception_header->unwindHeader); ++ bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader); + if (native_exception) + { + // Mark the exception as being rethrown (reverse the effects of __cxa_begin_catch) +@@ -660,7 +675,7 @@ + __cxa_exception* exception_header = globals->caughtExceptions; + if (NULL == exception_header) + return NULL; // No current exception +- if (!isOurExceptionClass(&exception_header->unwindHeader)) ++ if (!__isOurExceptionClass(&exception_header->unwindHeader)) + return NULL; // Can't capture a foreign exception (no way to refcount it) + if (isDependentException(&exception_header->unwindHeader)) { + __cxa_dependent_exception* dep_exception_header = +diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp +--- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp 2018-03-06 14:20:54.000000000 -0500 ++++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp 2018-05-07 13:09:05.371652989 -0400 +@@ -24,6 +24,17 @@ + static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1 + static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++ + ++uint64_t __getExceptionClass (const _Unwind_Exception*); ++void __setExceptionClass ( _Unwind_Exception*, uint64_t); ++bool __isOurExceptionClass(const _Unwind_Exception*); ++ ++#if defined(__arm__) && defined(__GNUC__) ++// missing values from _Unwind_Reason_Code enum ++#define _URC_FATAL_PHASE2_ERROR ((_Unwind_Reason_Code)2) ++#define _URC_FATAL_PHASE1_ERROR ((_Unwind_Reason_Code)3) ++#define _URC_NORMAL_STOP ((_Unwind_Reason_Code)4) ++#endif ++ + struct _LIBCXXABI_HIDDEN __cxa_exception { + #if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI) + // This is a new field to support C++ 0x exception_ptr. +diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp +--- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp 2018-03-06 14:20:54.000000000 -0500 ++++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp 2018-05-07 11:01:44.474845270 -0400 +@@ -89,10 +89,7 @@ + { + _Unwind_Exception* unwind_exception = + reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; +- bool native_exception = +- (unwind_exception->exception_class & get_vendor_and_language) == +- (kOurExceptionClass & get_vendor_and_language); +- if (native_exception) ++ if (__isOurExceptionClass(unwind_exception)) + __terminate(exception_header->terminateHandler); + } + } +diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp +--- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp 2018-03-06 14:20:54.000000000 -0500 ++++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp 2018-05-07 15:08:40.666231128 -0400 +@@ -492,7 +492,7 @@ + // Even for foreign exceptions, the exception object is *probably* at unwind_exception + 1 + // Regardless, this library is prohibited from touching a foreign exception + void* adjustedPtr = unwind_exception + 1; +- if (unwind_exception->exception_class == kOurDependentExceptionClass) ++ if (__getExceptionClass(unwind_exception) == kOurDependentExceptionClass) + adjustedPtr = ((__cxa_dependent_exception*)adjustedPtr - 1)->primaryException; + return adjustedPtr; + } +@@ -1073,8 +1073,7 @@ + if (unwind_exception == 0 || context == 0) + return _URC_FATAL_PHASE1_ERROR; + +- bool native_exception = (unwind_exception->exception_class & get_vendor_and_language) == +- (kOurExceptionClass & get_vendor_and_language); ++ bool native_exception = __isOurExceptionClass(unwind_exception); + + #if !defined(LIBCXXABI_USE_LLVM_UNWINDER) + // Copy the address of _Unwind_Control_Block to r12 so that +@@ -1085,7 +1084,7 @@ + + // Check the undocumented force unwinding behavior + bool is_force_unwinding = state & _US_FORCE_UNWIND; +- state &= ~_US_FORCE_UNWIND; ++ state = (_Unwind_State)(state & ~_US_FORCE_UNWIND); + + scan_results results; + switch (state) { +@@ -1178,9 +1177,7 @@ + if (unwind_exception == 0) + call_terminate(false, unwind_exception); + __cxa_begin_catch(unwind_exception); +- bool native_old_exception = +- (unwind_exception->exception_class & get_vendor_and_language) == +- (kOurExceptionClass & get_vendor_and_language); ++ bool native_old_exception = __isOurExceptionClass(unwind_exception); + std::unexpected_handler u_handler; + std::terminate_handler t_handler; + __cxa_exception* old_exception_header = 0; +@@ -1242,16 +1239,14 @@ + if (new_exception_header == 0) + // This shouldn't be able to happen! + std::__terminate(t_handler); +- bool native_new_exception = +- (new_exception_header->unwindHeader.exception_class & get_vendor_and_language) == +- (kOurExceptionClass & get_vendor_and_language); ++ bool native_new_exception = __isOurExceptionClass(&new_exception_header->unwindHeader); + void* adjustedPtr; + if (native_new_exception && (new_exception_header != old_exception_header)) + { + const __shim_type_info* excpType = + static_cast(new_exception_header->exceptionType); + adjustedPtr = +- new_exception_header->unwindHeader.exception_class == kOurDependentExceptionClass ? ++ __getExceptionClass(&new_exception_header->unwindHeader) == kOurDependentExceptionClass ? + ((__cxa_dependent_exception*)new_exception_header)->primaryException : + new_exception_header + 1; + if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding, diff --git a/v8.spec b/v8.spec index 456416c..8d4807f 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -75,6 +75,10 @@ Patch11: v8-6.2.91-gcc8-gn-fabi11.patch Patch12: v8-6.7.17-fixme.patch # Use Fedora optflags Patch13: v8-6.7.17-optflags.patch +# Reconcile libc++abi with unwind.h from gcc +# https://bugs.llvm.org/show_bug.cgi?id=35945 +# Modified patch from https://reviews.llvm.org/D42242 +Patch14: v8-6.7.17-fix-gcc-unwind-header.patch # PPC64 doesn't like libcxx code. # error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression @@ -137,6 +141,7 @@ popd %patch11 -p1 -b .fabi11 %patch12 -p1 -b .fixme %patch13 -p1 -b .optflags +%patch14 -p1 -b .unwind SPLITOPTFLAGS="" for i in `echo %{optflags} | sed 's/ /\n/g'`; do @@ -304,6 +309,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Tue May 8 2018 Sergey Avseyev - 1:6.7.17-3 +- Fix ARM build. Integrate fix for https://bugs.llvm.org/show_bug.cgi?id=35945 + * Mon Apr 30 2018 Pete Walter - 1:6.7.17-2 - Rebuild for ICU 61.1 From 635f6696af1a126640707a690653437f4c511c77 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Tue, 15 May 2018 08:46:48 +0300 Subject: [PATCH 089/100] Add libv8_libbase.so symlink to devel package --- v8.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 8d4807f..ff20577 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -274,6 +274,7 @@ install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ pushd %{buildroot}%{_libdir} ln -sf libv8.so.%{somajor} libv8.so ln -sf libv8_libplatform.so.%{somajor} libv8_libplatform.so +ln -sf libv8_libbase.so.%{somajor} libv8_libbase.so popd # install Python JS minifier scripts for nodejs @@ -309,6 +310,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Tue May 15 2018 Sergey Avseyev - 1:6.7.17-4 +- Add libv8_libbase.so symlink to devel package. + * Tue May 8 2018 Sergey Avseyev - 1:6.7.17-3 - Fix ARM build. Integrate fix for https://bugs.llvm.org/show_bug.cgi?id=35945 From c6c75a4d108e45529c33a2d5aeb0befb3da3cdcb Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Tue, 10 Jul 2018 22:04:58 +0100 Subject: [PATCH 090/100] Rebuild for ICU 62 --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index ff20577..82c2f9a 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -310,6 +310,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Tue Jul 10 2018 Pete Walter - 1:6.7.17-5 +- Rebuild for ICU 62 + * Tue May 15 2018 Sergey Avseyev - 1:6.7.17-4 - Add libv8_libbase.so symlink to devel package. From 1d10652fdf73367ed1debc29943a429a326fc7d7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:22:40 +0000 Subject: [PATCH 091/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 82c2f9a..40d2e90 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -310,6 +310,9 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{python_sitelib}/j*.py* %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1:6.7.17-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Tue Jul 10 2018 Pete Walter - 1:6.7.17-5 - Rebuild for ICU 62 From e761db14fb409539f8a08bf4b98814fd0f42f8be Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 24 Jul 2018 10:07:11 -0400 Subject: [PATCH 092/100] cleanup unversioned python parts, use_rtti=true --- v8.spec | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/v8.spec b/v8.spec index 40d2e90..39b4441 100644 --- a/v8.spec +++ b/v8.spec @@ -25,7 +25,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -183,6 +183,11 @@ for i in `grep -rl "Wno-undefined-var-template" *`; do sed -i 's|-Wno-undefined-var-template||g' $i done +# cleanup unversioned python parts +for i in `grep -r "/usr/bin/env python" * |grep -v "python3" |cut -d : -f 1`; do + sed -i 's|/usr/bin/env python|/usr/bin/env python2|g' $i +done + %build %ifarch x86_64 %global v8arch x64 @@ -233,6 +238,7 @@ V8_GN_DEFINES+=' use_sysroot=false use_gold=false enable_nacl=false linux_use_bu V8_GN_DEFINES+=' libcpp_is_static=true v8_use_external_startup_data=false' V8_GN_DEFINES+=' v8_target_cpu="%{v8arch}"' V8_GN_DEFINES+=' is_clang=false' +V8_GN_DEFINES+=' use_rtti=true' %ifarch armv7hl armv7hnl V8_GN_DEFINES+=' arm_float_abi="hard"' %endif @@ -278,12 +284,12 @@ ln -sf libv8_libbase.so.%{somajor} libv8_libbase.so popd # install Python JS minifier scripts for nodejs -install -d %{buildroot}%{python_sitelib} -sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/jsmin.py -sed -i 's|/usr/bin/python2.4|/usr/bin/env python|g' tools/js2c.py -install -p -m0744 tools/jsmin.py %{buildroot}%{python_sitelib}/ -install -p -m0744 tools/js2c.py %{buildroot}%{python_sitelib}/ -chmod -R -x %{buildroot}%{python_sitelib}/*.py* +install -d %{buildroot}%{python2_sitelib} +sed -i 's|/usr/bin/python2.4|/usr/bin/env python2|g' tools/jsmin.py +sed -i 's|/usr/bin/python2.4|/usr/bin/env python2|g' tools/js2c.py +install -p -m0744 tools/jsmin.py %{buildroot}%{python2_sitelib}/ +install -p -m0744 tools/js2c.py %{buildroot}%{python2_sitelib}/ +chmod -R -x %{buildroot}%{python2_sitelib}/*.py* %post -p /sbin/ldconfig @@ -307,9 +313,13 @@ chmod -R -x %{buildroot}%{python_sitelib}/*.py* %{_libdir}/*.so %files -n python2-v8 -%{python_sitelib}/j*.py* +%{python2_sitelib}/j*.py* %changelog +* Tue Jul 24 2018 Tom Callaway - 1:6.7.17-7 +- add use_rtti=true flag +- cleanup unversioned python bits + * Sat Jul 14 2018 Fedora Release Engineering - 1:6.7.17-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 54f35ffafe7aae93465d4df5ca90afbf1ae86080 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 24 Jul 2018 10:18:01 -0400 Subject: [PATCH 093/100] fix python calls in depot_tools too --- v8.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v8.spec b/v8.spec index 39b4441..82ba852 100644 --- a/v8.spec +++ b/v8.spec @@ -187,6 +187,8 @@ done for i in `grep -r "/usr/bin/env python" * |grep -v "python3" |cut -d : -f 1`; do sed -i 's|/usr/bin/env python|/usr/bin/env python2|g' $i done +sed -i 's|exec python|exec python2|g' ../depot_tools/gn +sed -i 's|/usr/bin/env python|/usr/bin/env python2|g' ../depot_tools/gn.py %build %ifarch x86_64 From 352b2d6fa7be0355b498980030b0c4dea9011731 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 24 Jul 2018 10:48:58 -0400 Subject: [PATCH 094/100] force python2 in gn --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 82ba852..f1781de 100644 --- a/v8.spec +++ b/v8.spec @@ -249,7 +249,7 @@ V8_GN_DEFINES+=' arm_float_abi="softfp"' %endif export PATH=$PATH:%{_builddir}/depot_tools -CHROMIUM_BUILDTOOLS_PATH=./buildtools/ gn gen out.gn/%{v8arch}.release --args="$V8_GN_DEFINES" +CHROMIUM_BUILDTOOLS_PATH=./buildtools/ gn --script-executable=/usr/bin/python2 gen out.gn/%{v8arch}.release --args="$V8_GN_DEFINES" mkdir -p out.gn/%{v8arch}.release/gen/shim_headers/icui18n_shim/third_party/icu/source/i18n/unicode mkdir -p out.gn/%{v8arch}.release/gen/shim_headers/icuuc_shim/third_party/icu/source/common/unicode ../depot_tools/ninja -vvv -C out.gn/%{v8arch}.release From 6ee2d66a8553cedb6d6c075ed580872570c994f7 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 24 Jul 2018 14:37:49 -0400 Subject: [PATCH 095/100] try with gold to see if it links on arm --- v8.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index f1781de..064972a 100644 --- a/v8.spec +++ b/v8.spec @@ -236,7 +236,7 @@ rm -rf ../depot_tools/ninja ln -s /usr/bin/ninja ../depot_tools/ninja V8_GN_DEFINES="" -V8_GN_DEFINES+=' use_sysroot=false use_gold=false enable_nacl=false linux_use_bundled_binutils=false is_component_build=true clang_use_chrome_plugins=false' +V8_GN_DEFINES+=' use_sysroot=false use_gold=true enable_nacl=false linux_use_bundled_binutils=false is_component_build=true clang_use_chrome_plugins=false' V8_GN_DEFINES+=' libcpp_is_static=true v8_use_external_startup_data=false' V8_GN_DEFINES+=' v8_target_cpu="%{v8arch}"' V8_GN_DEFINES+=' is_clang=false' From 778e2e26569ba9cb11b340d633c70ae96ca86da2 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 5 Oct 2018 10:35:40 -0400 Subject: [PATCH 096/100] disable python2 subpackage --- v8.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 064972a..6dd3a59 100644 --- a/v8.spec +++ b/v8.spec @@ -1,3 +1,5 @@ +%global with_python 0 + # clang doesn't understand hardening, specifically "-specs=" %global clang_optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1||g') %global clang_ldflags %(echo "%{__global_ldflags} -Wl,--build-id" | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-ld||g') @@ -25,7 +27,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Summary: JavaScript Engine Group: System Environment/Libraries @@ -103,6 +105,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} %description devel Development headers and libraries for v8. +%if %{with_python} %package -n python2-v8 %{?python_provide:%python_provide python2-v8} # Remove before F30 @@ -114,6 +117,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} %description -n python2-v8 Python libraries from v8. +%endif %prep %setup -q -T -c -n depot_tools -a 1 @@ -285,6 +289,7 @@ ln -sf libv8_libplatform.so.%{somajor} libv8_libplatform.so ln -sf libv8_libbase.so.%{somajor} libv8_libbase.so popd +%if %{with_python} # install Python JS minifier scripts for nodejs install -d %{buildroot}%{python2_sitelib} sed -i 's|/usr/bin/python2.4|/usr/bin/env python2|g' tools/jsmin.py @@ -292,6 +297,7 @@ sed -i 's|/usr/bin/python2.4|/usr/bin/env python2|g' tools/js2c.py install -p -m0744 tools/jsmin.py %{buildroot}%{python2_sitelib}/ install -p -m0744 tools/js2c.py %{buildroot}%{python2_sitelib}/ chmod -R -x %{buildroot}%{python2_sitelib}/*.py* +%endif %post -p /sbin/ldconfig @@ -314,10 +320,15 @@ chmod -R -x %{buildroot}%{python2_sitelib}/*.py* %{_includedir}/v8/extensions/ %{_libdir}/*.so +%if %{with_python} %files -n python2-v8 %{python2_sitelib}/j*.py* +%endif %changelog +* Fri Oct 5 2018 Tom Callaway - 1:6.7.17-8 +- disable python2 subpackage + * Tue Jul 24 2018 Tom Callaway - 1:6.7.17-7 - add use_rtti=true flag - cleanup unversioned python bits From 2743eb7f00849d291cf23856035834b99229642c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:41:16 +0100 Subject: [PATCH 097/100] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- v8.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/v8.spec b/v8.spec index 6dd3a59..f3ca9ad 100644 --- a/v8.spec +++ b/v8.spec @@ -299,9 +299,7 @@ install -p -m0744 tools/js2c.py %{buildroot}%{python2_sitelib}/ chmod -R -x %{buildroot}%{python2_sitelib}/*.py* %endif -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %license LICENSE From d27c852231af8bc7ce60a7efa4f9678eb49d5c1f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:29 +0100 Subject: [PATCH 098/100] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- v8.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/v8.spec b/v8.spec index f3ca9ad..9e470db 100644 --- a/v8.spec +++ b/v8.spec @@ -30,7 +30,6 @@ Version: %{somajor}.%{sominor}.%{sobuild} Release: 8%{?dist} Epoch: 1 Summary: JavaScript Engine -Group: System Environment/Libraries License: BSD URL: https://chromium.googlesource.com/v8/v8/ # To make the source, you need to have depot_tools installed and in your PATH @@ -98,7 +97,6 @@ in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 3rd edition. %package devel -Group: Development/Libraries Summary: Development headers and libraries for v8 Requires: %{name} = %{epoch}:%{version}-%{release} From 0c04b3fd1dd6114293e00d4bba8c6f93ce8b866e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:01:31 +0000 Subject: [PATCH 099/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- v8.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v8.spec b/v8.spec index 9e470db..21b7ca8 100644 --- a/v8.spec +++ b/v8.spec @@ -27,7 +27,7 @@ Name: v8 Version: %{somajor}.%{sominor}.%{sobuild} -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 Summary: JavaScript Engine License: BSD @@ -322,6 +322,9 @@ chmod -R -x %{buildroot}%{python2_sitelib}/*.py* %endif %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 1:6.7.17-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Oct 5 2018 Tom Callaway - 1:6.7.17-8 - disable python2 subpackage From 0bee89231afb8d35ff077d5a58a3b86598bab3dd Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 7 Feb 2019 15:28:32 -0500 Subject: [PATCH 100/100] extremely difficult to maintain, nothing uses it --- .gitignore | 17 - dead.package | 1 + icu.gn | 235 ----- sources | 4 - v8-2.5.9-ccflags.patch | 55 -- v8-2.5.9-shebangs.patch | 35 - v8-3.14.5.10-CVE-2013-2882.patch | 55 -- v8-3.14.5.10-CVE-2013-6640.patch | 316 ------- v8-3.14.5.10-CVE-2013-6650.patch | 80 -- v8-3.14.5.10-CVE-2013-6668-segfault.patch | 60 -- v8-3.14.5.10-CVE-2013-6668.patch | 186 ---- v8-3.14.5.10-CVE-2014-1704-1.patch | 77 -- v8-3.14.5.10-REPLACE_INVALID_UTF8.patch | 195 ----- v8-3.14.5.10-abort-uncaught-exception.patch | 139 --- v8-3.14.5.10-busy-loop.patch | 137 --- v8-3.14.5.10-enumeration.patch | 30 - v8-3.14.5.10-interrupts-stack-overflow.patch | 31 - ...4.5.10-mem-corruption-stack-overflow.patch | 33 - v8-3.14.5.10-profiler-log.patch | 43 - v8-3.14.5.10-system-valgrind.patch | 44 - v8-3.14.5.10-unhandled-ReferenceError.patch | 37 - v8-3.14.5.10-unused-local-typedefs.patch | 39 - v8-3.14.5.10-use-clock_gettime.patch | 122 --- v8-3.14.5.10-x64-MathMinMax.patch | 105 --- v8-3.14.5.10-x64-compare-stubs.patch | 116 --- v8-3.14.5.8-CVE-2013-2634.patch | 134 --- v8-3.3.10-enable-experimental.patch | 59 -- v8-3.3.10-language-matcher-fix.patch | 24 - v8-3.4.14-CVE-2014-3152.patch | 13 - v8-3.4.14-enable-experimental.patch | 61 -- v8-3.4.14-fix-experimental-compile.patch | 243 ------ v8-3.4.14-i18n-js2c.patch | 40 - v8-3.5.1-versioned-v8.patch | 14 - v8-4.10.91-system_icu.patch | 14 - v8-5.2.197-readdir-fix.patch | 27 - v8-5.2.258-bundled-binutils.patch | 16 - v8-5.2.258-gcc7.patch | 119 --- v8-5.2.258-ppc64.patch | 21 - v8-6.2.91-gcc8-gn-fabi11.patch | 15 - v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch | 12 - v8-6.2.91-nolambda.patch | 12 - v8-6.2.91-notcross.patch | 79 -- v8-6.2.91-nounused-function.patch | 11 - v8-6.2.91-noxlocale.patch | 12 - v8-6.2.91-oldclang-flags.patch | 19 - v8-6.2.91-ppc64.patch | 21 - v8-6.2.91-sover.patch | 28 - v8-6.7.17-fix-gcc-unwind-header.patch | 236 ----- v8-6.7.17-fixme.patch | 335 -------- v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch | 12 - v8-6.7.17-notcross.patch | 141 --- v8-6.7.17-optflags.patch | 21 - v8-daily-tarball.sh | 94 -- v8-js2c | 4 - v8.spec | 809 ------------------ 55 files changed, 1 insertion(+), 4837 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 icu.gn delete mode 100644 sources delete mode 100644 v8-2.5.9-ccflags.patch delete mode 100644 v8-2.5.9-shebangs.patch delete mode 100644 v8-3.14.5.10-CVE-2013-2882.patch delete mode 100644 v8-3.14.5.10-CVE-2013-6640.patch delete mode 100644 v8-3.14.5.10-CVE-2013-6650.patch delete mode 100644 v8-3.14.5.10-CVE-2013-6668-segfault.patch delete mode 100644 v8-3.14.5.10-CVE-2013-6668.patch delete mode 100644 v8-3.14.5.10-CVE-2014-1704-1.patch delete mode 100644 v8-3.14.5.10-REPLACE_INVALID_UTF8.patch delete mode 100644 v8-3.14.5.10-abort-uncaught-exception.patch delete mode 100644 v8-3.14.5.10-busy-loop.patch delete mode 100644 v8-3.14.5.10-enumeration.patch delete mode 100644 v8-3.14.5.10-interrupts-stack-overflow.patch delete mode 100644 v8-3.14.5.10-mem-corruption-stack-overflow.patch delete mode 100644 v8-3.14.5.10-profiler-log.patch delete mode 100644 v8-3.14.5.10-system-valgrind.patch delete mode 100644 v8-3.14.5.10-unhandled-ReferenceError.patch delete mode 100644 v8-3.14.5.10-unused-local-typedefs.patch delete mode 100644 v8-3.14.5.10-use-clock_gettime.patch delete mode 100644 v8-3.14.5.10-x64-MathMinMax.patch delete mode 100644 v8-3.14.5.10-x64-compare-stubs.patch delete mode 100644 v8-3.14.5.8-CVE-2013-2634.patch delete mode 100644 v8-3.3.10-enable-experimental.patch delete mode 100644 v8-3.3.10-language-matcher-fix.patch delete mode 100644 v8-3.4.14-CVE-2014-3152.patch delete mode 100644 v8-3.4.14-enable-experimental.patch delete mode 100644 v8-3.4.14-fix-experimental-compile.patch delete mode 100644 v8-3.4.14-i18n-js2c.patch delete mode 100644 v8-3.5.1-versioned-v8.patch delete mode 100644 v8-4.10.91-system_icu.patch delete mode 100644 v8-5.2.197-readdir-fix.patch delete mode 100644 v8-5.2.258-bundled-binutils.patch delete mode 100644 v8-5.2.258-gcc7.patch delete mode 100644 v8-5.2.258-ppc64.patch delete mode 100644 v8-6.2.91-gcc8-gn-fabi11.patch delete mode 100644 v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch delete mode 100644 v8-6.2.91-nolambda.patch delete mode 100644 v8-6.2.91-notcross.patch delete mode 100644 v8-6.2.91-nounused-function.patch delete mode 100644 v8-6.2.91-noxlocale.patch delete mode 100644 v8-6.2.91-oldclang-flags.patch delete mode 100644 v8-6.2.91-ppc64.patch delete mode 100644 v8-6.2.91-sover.patch delete mode 100644 v8-6.7.17-fix-gcc-unwind-header.patch delete mode 100644 v8-6.7.17-fixme.patch delete mode 100644 v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch delete mode 100644 v8-6.7.17-notcross.patch delete mode 100644 v8-6.7.17-optflags.patch delete mode 100644 v8-daily-tarball.sh delete mode 100644 v8-js2c delete mode 100644 v8.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0c89236..0000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -/v8-3.0.0.1.tar.gz -/v8-3.5.1.tar.bz2 -/v8-3.3.10.tar.bz2 -/v8-3.8.9-20120127svn10526.tar.bz2 -/v8-3.7.12.tar.bz2 -/v8-3.10.8.tar.bz2 -/v8-3.13.7.5.tar.bz2 -/v8-3.14.5.7.tar.bz2 -/v8-3.14.5.8.tar.bz2 -/v8-3.14.5.10.tar.bz2 -/v8-5.2.258.tar.bz2 -/v8-5.2.258.tar.xz -/v8-6.2.91.tar.xz -/depot_tools.git-master.tar.gz -/chromium-base-git2d35e4d.tar.bz2 -/gn-source-gitf833e90.tar.bz2 -/v8-6.7.17.tar.xz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..d6ea8a4 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +extremely difficult to maintain, nothing uses it diff --git a/icu.gn b/icu.gn deleted file mode 100644 index f3734b7..0000000 --- a/icu.gn +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/linux/pkg_config.gni") -import("//build/shim_headers.gni") - -group("icu") { - public_deps = [ - ":icui18n", - ":icuuc", - ] -} - -config("icu_config") { - defines = [ - "USING_SYSTEM_ICU=1", - "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", - ] -} - -pkg_config("system_icui18n") { - packages = [ "icu-i18n" ] -} - -pkg_config("system_icuuc") { - packages = [ "icu-uc" ] -} - -source_set("icui18n") { - deps = [ - ":icui18n_shim", - ] - public_configs = [ - ":icu_config", - ":system_icui18n", - ] -} - -source_set("icuuc") { - deps = [ - ":icuuc_shim", - ] - public_configs = [ - ":icu_config", - ":system_icuuc", - ] -} - -shim_headers("icui18n_shim") { - root_path = "source/i18n" - headers = [ - # This list can easily be updated using the command below: - # find third_party/icu/source/i18n/unicode \ - # -iname '*.h' -printf '"%p",\n' | \ - # sed -e 's|third_party/icu/i18n/common/||' | sort -u - "unicode/alphaindex.h", - "unicode/basictz.h", - "unicode/calendar.h", - "unicode/choicfmt.h", - "unicode/coleitr.h", - "unicode/coll.h", - "unicode/compactdecimalformat.h", - "unicode/curramt.h", - "unicode/currpinf.h", - "unicode/currunit.h", - "unicode/datefmt.h", - "unicode/dcfmtsym.h", - "unicode/decimfmt.h", - "unicode/dtfmtsym.h", - "unicode/dtitvfmt.h", - "unicode/dtitvinf.h", - "unicode/dtptngen.h", - "unicode/dtrule.h", - "unicode/fieldpos.h", - "unicode/fmtable.h", - "unicode/format.h", - "unicode/fpositer.h", - "unicode/gender.h", - "unicode/gregocal.h", - "unicode/locdspnm.h", - "unicode/measfmt.h", - "unicode/measunit.h", - "unicode/measure.h", - "unicode/msgfmt.h", - "unicode/numfmt.h", - "unicode/numsys.h", - "unicode/plurfmt.h", - "unicode/plurrule.h", - "unicode/rbnf.h", - "unicode/rbtz.h", - "unicode/regex.h", - "unicode/region.h", - "unicode/reldatefmt.h", - "unicode/scientificnumberformatter.h", - "unicode/search.h", - "unicode/selfmt.h", - "unicode/simpletz.h", - "unicode/smpdtfmt.h", - "unicode/sortkey.h", - "unicode/stsearch.h", - "unicode/tblcoll.h", - "unicode/timezone.h", - "unicode/tmunit.h", - "unicode/tmutamt.h", - "unicode/tmutfmt.h", - "unicode/translit.h", - "unicode/tzfmt.h", - "unicode/tznames.h", - "unicode/tzrule.h", - "unicode/tztrans.h", - "unicode/ucal.h", - "unicode/ucol.h", - "unicode/ucoleitr.h", - "unicode/ucsdet.h", - "unicode/ucurr.h", - "unicode/udat.h", - "unicode/udateintervalformat.h", - "unicode/udatpg.h", - "unicode/udisplaycontext.h", - "unicode/ufieldpositer.h", - "unicode/uformattable.h", - "unicode/ugender.h", - "unicode/uldnames.h", - "unicode/ulocdata.h", - "unicode/umsg.h", - "unicode/unirepl.h", - "unicode/unum.h", - "unicode/unumsys.h", - "unicode/upluralrules.h", - "unicode/uregex.h", - "unicode/uregion.h", - "unicode/usearch.h", - "unicode/uspoof.h", - "unicode/utmscale.h", - "unicode/utrans.h", - "unicode/vtzone.h", - ] -} - -shim_headers("icuuc_shim") { - root_path = "source/common" - headers = [ - # This list can easily be updated using the command below: - # find third_party/icu/source/common/unicode \ - # -iname '*.h' -printf '"%p",\n' | \ - # sed -e 's|third_party/icu/source/common/||' | sort -u - "unicode/appendable.h", - "unicode/brkiter.h", - "unicode/bytestream.h", - "unicode/bytestrie.h", - "unicode/bytestriebuilder.h", - "unicode/caniter.h", - "unicode/chariter.h", - "unicode/dbbi.h", - "unicode/docmain.h", - "unicode/dtintrv.h", - "unicode/enumset.h", - "unicode/errorcode.h", - "unicode/filteredbrk.h", - "unicode/icudataver.h", - "unicode/icuplug.h", - "unicode/idna.h", - "unicode/listformatter.h", - "unicode/localpointer.h", - "unicode/locid.h", - "unicode/messagepattern.h", - "unicode/normalizer2.h", - "unicode/normlzr.h", - "unicode/parseerr.h", - "unicode/parsepos.h", - "unicode/platform.h", - "unicode/ptypes.h", - "unicode/putil.h", - "unicode/rbbi.h", - "unicode/rep.h", - "unicode/resbund.h", - "unicode/schriter.h", - "unicode/std_string.h", - "unicode/strenum.h", - "unicode/stringpiece.h", - "unicode/stringtriebuilder.h", - "unicode/symtable.h", - "unicode/ubidi.h", - "unicode/ubrk.h", - "unicode/ucasemap.h", - "unicode/ucat.h", - "unicode/uchar.h", - "unicode/ucharstrie.h", - "unicode/ucharstriebuilder.h", - "unicode/uchriter.h", - "unicode/uclean.h", - "unicode/ucnv.h", - "unicode/ucnv_cb.h", - "unicode/ucnv_err.h", - "unicode/ucnvsel.h", - "unicode/uconfig.h", - "unicode/udata.h", - "unicode/uenum.h", - "unicode/uidna.h", - "unicode/uiter.h", - "unicode/ulistformatter.h", - "unicode/uloc.h", - "unicode/umachine.h", - "unicode/umisc.h", - "unicode/unifilt.h", - "unicode/unifunct.h", - "unicode/unimatch.h", - "unicode/uniset.h", - "unicode/unistr.h", - "unicode/unorm.h", - "unicode/unorm2.h", - "unicode/uobject.h", - "unicode/urename.h", - "unicode/urep.h", - "unicode/ures.h", - "unicode/uscript.h", - "unicode/uset.h", - "unicode/usetiter.h", - "unicode/ushape.h", - "unicode/usprep.h", - "unicode/ustring.h", - "unicode/ustringtrie.h", - "unicode/utext.h", - "unicode/utf.h", - "unicode/utf16.h", - "unicode/utf32.h", - "unicode/utf8.h", - "unicode/utf_old.h", - "unicode/utrace.h", - "unicode/utypes.h", - "unicode/uvernum.h", - "unicode/uversion.h", - ] -} diff --git a/sources b/sources deleted file mode 100644 index 52c5db6..0000000 --- a/sources +++ /dev/null @@ -1,4 +0,0 @@ -SHA512 (depot_tools.git-master.tar.gz) = e4edee0fe870caf93a92e40cd30dc8b03a3cce27e73e9cbf5a26f4f3048611b2e485963cf9c738fca2c381f61838187b2c082e798d0456434a558e2eea9864b0 -SHA512 (chromium-base-git2d35e4d.tar.bz2) = a1dc21fb69908def3baaaccffbd9bc32b9e9b0c51bd6cee2d1509e0175c77c57e3b87dc18751aa6f2406724f41f7972576e66455f6d23765471315265704644e -SHA512 (gn-source-gitf833e90.tar.bz2) = 24a06a6fc1afbb6a7de5b702310dcff151250643a059e5f2540a3a12750f9880d865955b5a1f1ed8185c320db6f09a6c8c4540720c340b4a148fa9d87dda2938 -SHA512 (v8-6.7.17.tar.xz) = 770de7234667fe22e1a517c806716a57cc4cf1f1fe82a618f14c8fe0a886770b4e67677b95d885783618a41f05f620cb8e85a26928d482e02335fd0303375b18 diff --git a/v8-2.5.9-ccflags.patch b/v8-2.5.9-ccflags.patch deleted file mode 100644 index 91c8a5b..0000000 --- a/v8-2.5.9-ccflags.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9342a28b524c1679d6d664ed09b8db326ddbeb3e Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Sat, 4 Dec 2010 13:58:10 +0100 -Subject: [PATCH] Let environment variables override what would scons construct - -So that we can have control over CCFLAGS we use. ---- - SConstruct | 19 +++++++++++++++++-- - 1 files changed, 17 insertions(+), 2 deletions(-) - -Index: v8-3.5.1/SConstruct -=================================================================== ---- v8-3.5.1.orig/SConstruct -+++ v8-3.5.1/SConstruct -@@ -1190,6 +1190,13 @@ class BuildContext(object): - self.build_snapshot = (options['snapshot'] == 'on') - self.flags = None - -+ def OverrideFlags(self, initial, overrides): -+ result = initial.copy() -+ for key in initial.keys(): -+ if overrides.has_key(key): -+ result[key] = overrides[key]; -+ return result -+ - def AddRelevantFlags(self, initial, flags): - result = initial.copy() - toolchain = self.options['toolchain'] -@@ -1306,15 +1313,23 @@ def BuildSpecific(env, mode, env_overrid - except KeyError: - pass - -- library_flags = context.AddRelevantFlags(user_environ, LIBRARY_FLAGS) -+ library_flags = context.AddRelevantFlags({}, LIBRARY_FLAGS) - v8_flags = context.AddRelevantFlags(library_flags, V8_EXTRA_FLAGS) - mksnapshot_flags = context.AddRelevantFlags(library_flags, MKSNAPSHOT_EXTRA_FLAGS) - dtoa_flags = context.AddRelevantFlags(library_flags, DTOA_EXTRA_FLAGS) - cctest_flags = context.AddRelevantFlags(v8_flags, CCTEST_EXTRA_FLAGS) -- sample_flags = context.AddRelevantFlags(user_environ, SAMPLE_FLAGS) -- preparser_flags = context.AddRelevantFlags(user_environ, PREPARSER_FLAGS) -+ sample_flags = context.AddRelevantFlags({}, SAMPLE_FLAGS) -+ preparser_flags = context.AddRelevantFlags({}, PREPARSER_FLAGS) - d8_flags = context.AddRelevantFlags(library_flags, D8_FLAGS) - -+ library_flags = context.OverrideFlags(library_flags, user_environ) -+ v8_flags = context.OverrideFlags(v8_flags, user_environ) -+ mksnapshot_flags = context.OverrideFlags(mksnapshot_flags, user_environ) -+ dtoa_flags = context.OverrideFlags(dtoa_flags, user_environ) -+ cctest_flags = context.OverrideFlags(cctest_flags, user_environ) -+ sample_flags = context.OverrideFlags(sample_flags, user_environ) -+ d8_flags = context.OverrideFlags(d8_flags, user_environ) -+ - context.flags = { - 'v8': v8_flags, - 'mksnapshot': mksnapshot_flags, diff --git a/v8-2.5.9-shebangs.patch b/v8-2.5.9-shebangs.patch deleted file mode 100644 index a454d8a..0000000 --- a/v8-2.5.9-shebangs.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 503755a1addc229e917f837e212403e03e7bf243 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Fri, 10 Dec 2010 16:13:42 +0100 -Subject: [PATCH] Drop shebang where they are useless - -jsmin.py is not an executable script and it infuriates rpmlint. -js2c.py is being called from a wrapper in %{_bindir} ---- - tools/js2c.py | 2 -- - tools/jsmin.py | 2 -- - 2 files changed, 0 insertions(+), 4 deletions(-) - -diff --git a/tools/js2c.py b/tools/js2c.py -index 2da132f..c0e014d 100755 ---- a/tools/js2c.py -+++ b/tools/js2c.py -@@ -1,5 +1,3 @@ --#!/usr/bin/env python --# - # Copyright 2006-2008 the V8 project authors. All rights reserved. - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are -diff --git a/tools/jsmin.py b/tools/jsmin.py -index 646bf14..e2bb608 100644 ---- a/tools/jsmin.py -+++ b/tools/jsmin.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python2.4 -- - # Copyright 2009 the V8 project authors. All rights reserved. - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are --- -1.7.3.1 - diff --git a/v8-3.14.5.10-CVE-2013-2882.patch b/v8-3.14.5.10-CVE-2013-2882.patch deleted file mode 100644 index b14dbb5..0000000 --- a/v8-3.14.5.10-CVE-2013-2882.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 18e43f925d5d502b7531f40e4a1becba56089303 Mon Sep 17 00:00:00 2001 -From: "mstarzinger@chromium.org" -Date: Mon, 15 Jul 2013 11:41:41 +0000 -Subject: [PATCH] Use internal array as API function cache. - -R=yangguo@chromium.org -BUG=chromium:260106 -TEST=cctest/test-api/Regress260106 - -Review URL: https://codereview.chromium.org/19159003 - -git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 ---- - src/apinatives.js | 2 +- - test/cctest/test-api.cc | 11 +++++++++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/src/apinatives.js b/src/apinatives.js -index 79b41dd..adefab6 100644 ---- a/src/apinatives.js -+++ b/src/apinatives.js -@@ -37,7 +37,7 @@ function CreateDate(time) { - } - - --var kApiFunctionCache = {}; -+var kApiFunctionCache = new InternalArray(); - var functionCache = kApiFunctionCache; - - -diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc -index 728a8f7..bcd28bd 100644 ---- a/test/cctest/test-api.cc -+++ b/test/cctest/test-api.cc -@@ -17707,6 +17707,17 @@ THREADED_TEST(Regress157124) { - } - - -+THREADED_TEST(Regress260106) { -+ LocalContext context; -+ v8::HandleScope scope(context->GetIsolate()); -+ Local templ = FunctionTemplate::New(DummyCallHandler); -+ CompileRun("for (var i = 0; i < 128; i++) Object.prototype[i] = 0;"); -+ Local function = templ->GetFunction(); -+ CHECK(!function.IsEmpty()); -+ CHECK(function->IsFunction()); -+} -+ -+ - #ifndef WIN32 - class ThreadInterruptTest { - public: --- -1.8.3.1 - diff --git a/v8-3.14.5.10-CVE-2013-6640.patch b/v8-3.14.5.10-CVE-2013-6640.patch deleted file mode 100644 index 1a2a420..0000000 --- a/v8-3.14.5.10-CVE-2013-6640.patch +++ /dev/null @@ -1,316 +0,0 @@ -From 520f94a1da96b0f1fd3d0e0c0b82e4d7c1e7d58f Mon Sep 17 00:00:00 2001 -From: "T.C. Hollingsworth" -Date: Fri, 13 Dec 2013 00:45:27 -0700 -Subject: [PATCH] Limit size of dehoistable array indices - -backported from upstream r17801 ---- - src/elements-kind.cc | 30 ++++++++++++++++ - src/elements-kind.h | 2 ++ - src/hydrogen-instructions.h | 9 +++++ - src/hydrogen.cc | 2 +- - src/lithium.cc | 30 ---------------- - src/lithium.h | 3 -- - test/mjsunit/regress/regress-crbug-319835.js | 51 ++++++++++++++++++++++++++++ - test/mjsunit/regress/regress-crbug-319860.js | 47 +++++++++++++++++++++++++ - 8 files changed, 140 insertions(+), 34 deletions(-) - create mode 100644 test/mjsunit/regress/regress-crbug-319835.js - create mode 100644 test/mjsunit/regress/regress-crbug-319860.js - -diff --git a/src/elements-kind.cc b/src/elements-kind.cc -index 655a23b..c93a602 100644 ---- a/src/elements-kind.cc -+++ b/src/elements-kind.cc -@@ -35,6 +35,36 @@ namespace v8 { - namespace internal { - - -+int ElementsKindToShiftSize(ElementsKind elements_kind) { -+ switch (elements_kind) { -+ case EXTERNAL_BYTE_ELEMENTS: -+ case EXTERNAL_PIXEL_ELEMENTS: -+ case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: -+ return 0; -+ case EXTERNAL_SHORT_ELEMENTS: -+ case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: -+ return 1; -+ case EXTERNAL_INT_ELEMENTS: -+ case EXTERNAL_UNSIGNED_INT_ELEMENTS: -+ case EXTERNAL_FLOAT_ELEMENTS: -+ return 2; -+ case EXTERNAL_DOUBLE_ELEMENTS: -+ case FAST_DOUBLE_ELEMENTS: -+ case FAST_HOLEY_DOUBLE_ELEMENTS: -+ return 3; -+ case FAST_SMI_ELEMENTS: -+ case FAST_ELEMENTS: -+ case FAST_HOLEY_SMI_ELEMENTS: -+ case FAST_HOLEY_ELEMENTS: -+ case DICTIONARY_ELEMENTS: -+ case NON_STRICT_ARGUMENTS_ELEMENTS: -+ return kPointerSizeLog2; -+ } -+ UNREACHABLE(); -+ return 0; -+} -+ -+ - void PrintElementsKind(FILE* out, ElementsKind kind) { - ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); - PrintF(out, "%s", accessor->name()); -diff --git a/src/elements-kind.h b/src/elements-kind.h -index 3be7711..c5d9df8 100644 ---- a/src/elements-kind.h -+++ b/src/elements-kind.h -@@ -77,6 +77,8 @@ const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1; - const int kFastElementsKindCount = LAST_FAST_ELEMENTS_KIND - - FIRST_FAST_ELEMENTS_KIND + 1; - -+int ElementsKindToShiftSize(ElementsKind elements_kind); -+ - void PrintElementsKind(FILE* out, ElementsKind kind); - - ElementsKind GetInitialFastElementsKind(); -diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h -index 015212d..a1e5b97 100644 ---- a/src/hydrogen-instructions.h -+++ b/src/hydrogen-instructions.h -@@ -4240,6 +4240,7 @@ class ArrayInstructionInterface { - virtual HValue* GetKey() = 0; - virtual void SetKey(HValue* key) = 0; - virtual void SetIndexOffset(uint32_t index_offset) = 0; -+ virtual int MaxIndexOffsetBits() = 0; - virtual bool IsDehoisted() = 0; - virtual void SetDehoisted(bool is_dehoisted) = 0; - virtual ~ArrayInstructionInterface() { }; -@@ -4274,6 +4275,7 @@ class HLoadKeyedFastElement - void SetIndexOffset(uint32_t index_offset) { - bit_field_ = IndexOffsetField::update(bit_field_, index_offset); - } -+ int MaxIndexOffsetBits() { return 25; } - HValue* GetKey() { return key(); } - void SetKey(HValue* key) { SetOperandAt(1, key); } - bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } -@@ -4343,6 +4345,7 @@ class HLoadKeyedFastDoubleElement - HValue* dependency() { return OperandAt(2); } - uint32_t index_offset() { return index_offset_; } - void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } -+ int MaxIndexOffsetBits() { return 25; } - HValue* GetKey() { return key(); } - void SetKey(HValue* key) { SetOperandAt(1, key); } - bool IsDehoisted() { return is_dehoisted_; } -@@ -4420,6 +4423,7 @@ class HLoadKeyedSpecializedArrayElement - ElementsKind elements_kind() const { return elements_kind_; } - uint32_t index_offset() { return index_offset_; } - void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } -+ int MaxIndexOffsetBits() { return 25; } - HValue* GetKey() { return key(); } - void SetKey(HValue* key) { SetOperandAt(1, key); } - bool IsDehoisted() { return is_dehoisted_; } -@@ -4595,6 +4599,7 @@ class HStoreKeyedFastElement - } - uint32_t index_offset() { return index_offset_; } - void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } -+ int MaxIndexOffsetBits() { return 25; } - HValue* GetKey() { return key(); } - void SetKey(HValue* key) { SetOperandAt(1, key); } - bool IsDehoisted() { return is_dehoisted_; } -@@ -4648,6 +4653,7 @@ class HStoreKeyedFastDoubleElement - HValue* value() { return OperandAt(2); } - uint32_t index_offset() { return index_offset_; } - void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } -+ int MaxIndexOffsetBits() { return 25; } - HValue* GetKey() { return key(); } - void SetKey(HValue* key) { SetOperandAt(1, key); } - bool IsDehoisted() { return is_dehoisted_; } -@@ -4706,6 +4712,9 @@ class HStoreKeyedSpecializedArrayElement - ElementsKind elements_kind() const { return elements_kind_; } - uint32_t index_offset() { return index_offset_; } - void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } -+ int MaxIndexOffsetBits() { -+ return 31 - ElementsKindToShiftSize(elements_kind_); -+ } - HValue* GetKey() { return key(); } - void SetKey(HValue* key) { SetOperandAt(1, key); } - bool IsDehoisted() { return is_dehoisted_; } -diff --git a/src/hydrogen.cc b/src/hydrogen.cc -index 8393e51..e3f79ee 100644 ---- a/src/hydrogen.cc -+++ b/src/hydrogen.cc -@@ -3737,7 +3737,7 @@ static void DehoistArrayIndex(ArrayInstructionInterface* array_operation) { - int32_t value = constant->Integer32Value() * sign; - // We limit offset values to 30 bits because we want to avoid the risk of - // overflows when the offset is added to the object header size. -- if (value >= 1 << 30 || value < 0) return; -+ if (value >= 1 << array_operation->MaxIndexOffsetBits() || value < 0) return; - array_operation->SetKey(subexpression); - if (index->HasNoUses()) { - index->DeleteAndReplaceWith(NULL); -diff --git a/src/lithium.cc b/src/lithium.cc -index eb2198d..1232bf1 100644 ---- a/src/lithium.cc -+++ b/src/lithium.cc -@@ -227,36 +227,6 @@ void LPointerMap::PrintTo(StringStream* stream) { - } - - --int ElementsKindToShiftSize(ElementsKind elements_kind) { -- switch (elements_kind) { -- case EXTERNAL_BYTE_ELEMENTS: -- case EXTERNAL_PIXEL_ELEMENTS: -- case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: -- return 0; -- case EXTERNAL_SHORT_ELEMENTS: -- case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: -- return 1; -- case EXTERNAL_INT_ELEMENTS: -- case EXTERNAL_UNSIGNED_INT_ELEMENTS: -- case EXTERNAL_FLOAT_ELEMENTS: -- return 2; -- case EXTERNAL_DOUBLE_ELEMENTS: -- case FAST_DOUBLE_ELEMENTS: -- case FAST_HOLEY_DOUBLE_ELEMENTS: -- return 3; -- case FAST_SMI_ELEMENTS: -- case FAST_ELEMENTS: -- case FAST_HOLEY_SMI_ELEMENTS: -- case FAST_HOLEY_ELEMENTS: -- case DICTIONARY_ELEMENTS: -- case NON_STRICT_ARGUMENTS_ELEMENTS: -- return kPointerSizeLog2; -- } -- UNREACHABLE(); -- return 0; --} -- -- - LLabel* LChunk::GetLabel(int block_id) const { - HBasicBlock* block = graph_->blocks()->at(block_id); - int first_instruction = block->first_instruction_index(); -diff --git a/src/lithium.h b/src/lithium.h -index 089926e..a29d9d0 100644 ---- a/src/lithium.h -+++ b/src/lithium.h -@@ -704,9 +704,6 @@ class LChunk: public ZoneObject { - }; - - --int ElementsKindToShiftSize(ElementsKind elements_kind); -- -- - } } // namespace v8::internal - - #endif // V8_LITHIUM_H_ -diff --git a/test/mjsunit/regress/regress-crbug-319835.js b/test/mjsunit/regress/regress-crbug-319835.js -new file mode 100644 -index 0000000..48f871f ---- /dev/null -+++ b/test/mjsunit/regress/regress-crbug-319835.js -@@ -0,0 +1,51 @@ -+// Copyright 2013 the V8 project authors. All rights reserved. -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following -+// disclaimer in the documentation and/or other materials provided -+// with the distribution. -+// * Neither the name of Google Inc. nor the names of its -+// contributors may be used to endorse or promote products derived -+// from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+// Flags: --allow-natives-syntax -+ -+try {} catch(e) {} // No need to optimize the top level. -+ -+var size = 0x20000; -+var a = new Float64Array(size); -+var training = new Float64Array(10); -+function store(a, index) { -+ var offset = 0x20000000; -+ for (var i = 0; i < 1; i++) { -+ a[index + offset] = 0xcc; -+ } -+} -+ -+store(training, -0x20000000); -+store(training, -0x20000000 + 1); -+store(training, -0x20000000); -+store(training, -0x20000000 + 1); -+%OptimizeFunctionOnNextCall(store); -+ -+// Segfault maybe? -+for (var i = -0x20000000; i < -0x20000000 + size; i++) { -+ store(a, i); -+} -diff --git a/test/mjsunit/regress/regress-crbug-319860.js b/test/mjsunit/regress/regress-crbug-319860.js -new file mode 100644 -index 0000000..b81fb85 ---- /dev/null -+++ b/test/mjsunit/regress/regress-crbug-319860.js -@@ -0,0 +1,47 @@ -+// Copyright 2013 the V8 project authors. All rights reserved. -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following -+// disclaimer in the documentation and/or other materials provided -+// with the distribution. -+// * Neither the name of Google Inc. nor the names of its -+// contributors may be used to endorse or promote products derived -+// from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+// Flags: --allow-natives-syntax -+ -+function read(a, index) { -+ var offset = 0x2000000; -+ var result; -+ for (var i = 0; i < 1; i++) { -+ result = a[index + offset]; -+ } -+ return result; -+} -+ -+var a = new Int8Array(0x2000001); -+read(a, 0); -+read(a, 0); -+%OptimizeFunctionOnNextCall(read); -+ -+// Segfault maybe? -+for (var i = 0; i > -1000000; --i) { -+ read(a, i); -+} --- -1.8.4.2 - diff --git a/v8-3.14.5.10-CVE-2013-6650.patch b/v8-3.14.5.10-CVE-2013-6650.patch deleted file mode 100644 index d44811f..0000000 --- a/v8-3.14.5.10-CVE-2013-6650.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 3928813f014d3cdaed83fefc3a454078272f114b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hr=C4=8Dka?= -Date: Tue, 18 Feb 2014 00:23:04 +0100 -Subject: [PATCH] Backport Fix for CVE-2013-6650 Original patch - https://code.google.com/p/v8/source/detail?r=18483 - -Resolve: rhbz#1059070 ---- - src/store-buffer.cc | 2 +- - test/mjsunit/regress/regress-331444.js | 45 ++++++++++++++++++++++++++++++++++ - 2 files changed, 46 insertions(+), 1 deletion(-) - create mode 100644 test/mjsunit/regress/regress-331444.js - -diff --git a/src/store-buffer.cc b/src/store-buffer.cc -index 66488ae..b9055f8 100644 ---- a/src/store-buffer.cc -+++ b/src/store-buffer.cc -@@ -242,7 +242,7 @@ void StoreBuffer::ExemptPopularPages(int prime_sample_step, int threshold) { - containing_chunk = MemoryChunk::FromAnyPointerAddress(addr); - } - int old_counter = containing_chunk->store_buffer_counter(); -- if (old_counter == threshold) { -+ if (old_counter >= threshold) { - containing_chunk->set_scan_on_scavenge(true); - created_new_scan_on_scavenge_pages = true; - } -diff --git a/test/mjsunit/regress/regress-331444.js b/test/mjsunit/regress/regress-331444.js -new file mode 100644 -index 0000000..3df0a08 ---- /dev/null -+++ b/test/mjsunit/regress/regress-331444.js -@@ -0,0 +1,45 @@ -+// Copyright 2014 the V8 project authors. All rights reserved. -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following -+// disclaimer in the documentation and/or other materials provided -+// with the distribution. -+// * Neither the name of Google Inc. nor the names of its -+// contributors may be used to endorse or promote products derived -+// from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+// Flags: --expose-gc -+ -+ -+function boom() { -+ var args = []; -+ for (var i = 0; i < 125000; i++) -+ args.push(i); -+ return Array.apply(Array, args); -+} -+var array = boom(); -+function fib(n) { -+ var f0 = 0, f1 = 1; -+ for (; n > 0; n = n - 1) { -+ f0 + f1; -+ f0 = array; -+ } -+} -+fib(12); --- -1.8.3.1 - diff --git a/v8-3.14.5.10-CVE-2013-6668-segfault.patch b/v8-3.14.5.10-CVE-2013-6668-segfault.patch deleted file mode 100644 index 8e3d600..0000000 --- a/v8-3.14.5.10-CVE-2013-6668-segfault.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 3122e0eae64c5ab494b29d0a9cadef902d93f1f9 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Fri, 22 Aug 2014 03:59:35 +0400 -Subject: [PATCH] deps: fix up v8 after fd80a3 - -fd80a31e0697d6317ce8c2d289575399f4e06d21 has introduced a segfault -during redundant boundary check elimination (#8208). - -The problem consists of two parts: - - 1. Abscense of instruction iterator in - `EliminateRedundantBoundsChecks`. It was present in recent v8, but - wasn't considered important at the time of backport. However, since - the function is changing instructions order in block, it is - important to not rely at `i->next()` at the end of the loop. - 2. Too strict ASSERT in `MoveIndexIfNecessary`. It is essentially a - backport of a45c96ab from v8's upstream. See - https://github.com/v8/v8/commit/a45c96ab for details. - -fix #8208 ---- - src/hydrogen.cc | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/hydrogen.cc b/src/hydrogen.cc -index 50d8e49..18a6b60 100644 ---- a/src/hydrogen.cc -+++ b/src/hydrogen.cc -@@ -3546,7 +3546,11 @@ class BoundsCheckBbData: public ZoneObject { - void MoveIndexIfNecessary(HValue* index_raw, - HBoundsCheck* insert_before, - HInstruction* end_of_scan_range) { -- ASSERT(index_raw->IsAdd() || index_raw->IsSub()); -+ if (!index_raw->IsAdd() && !index_raw->IsSub()) { -+ // index_raw can be HAdd(index_base, offset), HSub(index_base, offset), -+ // or index_base directly. In the latter case, no need to move anything. -+ return; -+ } - HBinaryOperation* index = - HArithmeticBinaryOperation::cast(index_raw); - HValue* left_input = index->left(); -@@ -3581,7 +3585,6 @@ class BoundsCheckBbData: public ZoneObject { - HBoundsCheck* tighter_check) { - ASSERT(original_check->length() == tighter_check->length()); - MoveIndexIfNecessary(tighter_check->index(), original_check, tighter_check); -- original_check->ReplaceAllUsesWith(original_check->index()); - original_check->SetOperandAt(0, tighter_check->index()); - } - }; -@@ -3624,7 +3627,9 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb, - BoundsCheckTable* table) { - BoundsCheckBbData* bb_data_list = NULL; - -- for (HInstruction* i = bb->first(); i != NULL; i = i->next()) { -+ HInstruction* next; -+ for (HInstruction* i = bb->first(); i != NULL; i = next) { -+ next = i->next(); - if (!i->IsBoundsCheck()) continue; - - HBoundsCheck* check = HBoundsCheck::cast(i); diff --git a/v8-3.14.5.10-CVE-2013-6668.patch b/v8-3.14.5.10-CVE-2013-6668.patch deleted file mode 100644 index fe5cb6d..0000000 --- a/v8-3.14.5.10-CVE-2013-6668.patch +++ /dev/null @@ -1,186 +0,0 @@ -From fd80a31e0697d6317ce8c2d289575399f4e06d21 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Thu, 14 Aug 2014 19:29:28 +0400 -Subject: [PATCH] deps: backport 5f836c from v8 upstream - -Original commit message: - - Fix Hydrogen bounds check elimination - - When combining bounds checks, they must all be moved before the first load/store - that they are guarding. - - BUG=chromium:344186 - LOG=y - R=svenpanne@chromium.org - - Review URL: https://codereview.chromium.org/172093002 - - git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@19475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 - -fix #8070 ---- - src/hydrogen.cc | 106 +++++++++++++++++++++++------------------------- - 1 file changed, 50 insertions(+), 56 deletions(-) - -diff --git a/src/hydrogen.cc b/src/hydrogen.cc -index e3f79ee..50d8e49 100644 ---- a/src/hydrogen.cc -+++ b/src/hydrogen.cc -@@ -3487,13 +3487,7 @@ class BoundsCheckBbData: public ZoneObject { - keep_new_check = true; - upper_check_ = new_check; - } else { -- BuildOffsetAdd(upper_check_, -- &added_upper_index_, -- &added_upper_offset_, -- Key()->IndexBase(), -- new_check->index()->representation(), -- new_offset); -- upper_check_->SetOperandAt(0, added_upper_index_); -+ TightenCheck(upper_check_, new_check); - } - } else if (new_offset < lower_offset_) { - lower_offset_ = new_offset; -@@ -3501,28 +3495,27 @@ class BoundsCheckBbData: public ZoneObject { - keep_new_check = true; - lower_check_ = new_check; - } else { -- BuildOffsetAdd(lower_check_, -- &added_lower_index_, -- &added_lower_offset_, -- Key()->IndexBase(), -- new_check->index()->representation(), -- new_offset); -- lower_check_->SetOperandAt(0, added_lower_index_); -+ TightenCheck(lower_check_, new_check); - } - } else { -- ASSERT(false); -+ // Should never have called CoverCheck() in this case. -+ UNREACHABLE(); - } - - if (!keep_new_check) { - new_check->DeleteAndReplaceWith(NULL); -+ } else { -+ HBoundsCheck* first_check = new_check == lower_check_ ? upper_check_ -+ : lower_check_; -+ // The length is guaranteed to be live at first_check. -+ ASSERT(new_check->length() == first_check->length()); -+ HInstruction* old_position = new_check->next(); -+ new_check->Unlink(); -+ new_check->InsertAfter(first_check); -+ MoveIndexIfNecessary(new_check->index(), new_check, old_position); - } - } - -- void RemoveZeroOperations() { -- RemoveZeroAdd(&added_lower_index_, &added_lower_offset_); -- RemoveZeroAdd(&added_upper_index_, &added_upper_offset_); -- } -- - BoundsCheckBbData(BoundsCheckKey* key, - int32_t lower_offset, - int32_t upper_offset, -@@ -3537,10 +3530,6 @@ class BoundsCheckBbData: public ZoneObject { - basic_block_(bb), - lower_check_(lower_check), - upper_check_(upper_check), -- added_lower_index_(NULL), -- added_lower_offset_(NULL), -- added_upper_index_(NULL), -- added_upper_offset_(NULL), - next_in_bb_(next_in_bb), - father_in_dt_(father_in_dt) { } - -@@ -3551,44 +3540,50 @@ class BoundsCheckBbData: public ZoneObject { - HBasicBlock* basic_block_; - HBoundsCheck* lower_check_; - HBoundsCheck* upper_check_; -- HAdd* added_lower_index_; -- HConstant* added_lower_offset_; -- HAdd* added_upper_index_; -- HConstant* added_upper_offset_; - BoundsCheckBbData* next_in_bb_; - BoundsCheckBbData* father_in_dt_; - -- void BuildOffsetAdd(HBoundsCheck* check, -- HAdd** add, -- HConstant** constant, -- HValue* original_value, -- Representation representation, -- int32_t new_offset) { -- HConstant* new_constant = new(BasicBlock()->zone()) -- HConstant(new_offset, Representation::Integer32()); -- if (*add == NULL) { -- new_constant->InsertBefore(check); -- // Because of the bounds checks elimination algorithm, the index is always -- // an HAdd or an HSub here, so we can safely cast to an HBinaryOperation. -- HValue* context = HBinaryOperation::cast(check->index())->context(); -- *add = new(BasicBlock()->zone()) HAdd(context, -- original_value, -- new_constant); -- (*add)->AssumeRepresentation(representation); -- (*add)->InsertBefore(check); -- } else { -- new_constant->InsertBefore(*add); -- (*constant)->DeleteAndReplaceWith(new_constant); -+ void MoveIndexIfNecessary(HValue* index_raw, -+ HBoundsCheck* insert_before, -+ HInstruction* end_of_scan_range) { -+ ASSERT(index_raw->IsAdd() || index_raw->IsSub()); -+ HBinaryOperation* index = -+ HArithmeticBinaryOperation::cast(index_raw); -+ HValue* left_input = index->left(); -+ HValue* right_input = index->right(); -+ bool must_move_index = false; -+ bool must_move_left_input = false; -+ bool must_move_right_input = false; -+ for (HInstruction* cursor = end_of_scan_range; cursor != insert_before;) { -+ if (cursor == left_input) must_move_left_input = true; -+ if (cursor == right_input) must_move_right_input = true; -+ if (cursor == index) must_move_index = true; -+ if (cursor->previous() == NULL) { -+ cursor = cursor->block()->dominator()->end(); -+ } else { -+ cursor = cursor->previous(); -+ } - } -- *constant = new_constant; -- } - -- void RemoveZeroAdd(HAdd** add, HConstant** constant) { -- if (*add != NULL && (*constant)->Integer32Value() == 0) { -- (*add)->DeleteAndReplaceWith((*add)->left()); -- (*constant)->DeleteAndReplaceWith(NULL); -+ // The BCE algorithm only selects mergeable bounds checks that share -+ // the same "index_base", so we'll only ever have to move constants. -+ if (must_move_left_input) { -+ HConstant::cast(left_input)->Unlink(); -+ HConstant::cast(left_input)->InsertBefore(index); -+ } -+ if (must_move_right_input) { -+ HConstant::cast(right_input)->Unlink(); -+ HConstant::cast(right_input)->InsertBefore(index); - } - } -+ -+ void TightenCheck(HBoundsCheck* original_check, -+ HBoundsCheck* tighter_check) { -+ ASSERT(original_check->length() == tighter_check->length()); -+ MoveIndexIfNecessary(tighter_check->index(), original_check, tighter_check); -+ original_check->ReplaceAllUsesWith(original_check->index()); -+ original_check->SetOperandAt(0, tighter_check->index()); -+ } - }; - - -@@ -3683,7 +3678,6 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb, - for (BoundsCheckBbData* data = bb_data_list; - data != NULL; - data = data->NextInBasicBlock()) { -- data->RemoveZeroOperations(); - if (data->FatherInDominatorTree()) { - table->Insert(data->Key(), data->FatherInDominatorTree(), zone()); - } else { diff --git a/v8-3.14.5.10-CVE-2014-1704-1.patch b/v8-3.14.5.10-CVE-2014-1704-1.patch deleted file mode 100644 index 2df5230..0000000 --- a/v8-3.14.5.10-CVE-2014-1704-1.patch +++ /dev/null @@ -1,77 +0,0 @@ -From bf973073d98660edf35e01e6984029e46eb85368 Mon Sep 17 00:00:00 2001 -From: "dslomov@chromium.org" - -Date: Mon, 13 Jan 2014 13:00:09 +0000 -Subject: [PATCH] Use unsigned integer arithmetic in Zone::NewExpand. - - BUG=328202 - R=jkummerow@chromium.org - LOG=N - - Review URL: https://codereview.chromium.org/108783005 - - git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@18564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 ---- - src/zone.cc | 29 +++++++++++++++++++---------- - 1 file changed, 19 insertions(+), 10 deletions(-) - -diff --git a/src/zone.cc b/src/zone.cc -index 51b8113..c12978f 100644 ---- a/src/zone.cc -+++ b/src/zone.cc -@@ -175,25 +175,31 @@ Address Zone::NewExpand(int size) { - // except that we employ a maximum segment size when we delete. This - // is to avoid excessive malloc() and free() overhead. - Segment* head = segment_head_; -- int old_size = (head == NULL) ? 0 : head->size(); -- static const int kSegmentOverhead = sizeof(Segment) + kAlignment; -- int new_size_no_overhead = size + (old_size << 1); -- int new_size = kSegmentOverhead + new_size_no_overhead; -+ const size_t old_size = (head == NULL) ? 0 : head->size(); -+ static const size_t kSegmentOverhead = sizeof(Segment) + kAlignment; -+ const size_t new_size_no_overhead = size + (old_size << 1); -+ size_t new_size = kSegmentOverhead + new_size_no_overhead; -+ const size_t min_new_size = kSegmentOverhead + static_cast(size); - // Guard against integer overflow. -- if (new_size_no_overhead < size || new_size < kSegmentOverhead) { -+ if (new_size_no_overhead < static_cast(size) || -+ new_size < static_cast(kSegmentOverhead)) { - V8::FatalProcessOutOfMemory("Zone"); - return NULL; - } -- if (new_size < kMinimumSegmentSize) { -+ if (new_size < static_cast(kMinimumSegmentSize)) { - new_size = kMinimumSegmentSize; -- } else if (new_size > kMaximumSegmentSize) { -+ } else if (new_size > static_cast(kMaximumSegmentSize)) { - // Limit the size of new segments to avoid growing the segment size - // exponentially, thus putting pressure on contiguous virtual address space. - // All the while making sure to allocate a segment large enough to hold the - // requested size. -- new_size = Max(kSegmentOverhead + size, kMaximumSegmentSize); -+ new_size = Max(min_new_size, static_cast(kMaximumSegmentSize)); - } -- Segment* segment = NewSegment(new_size); -+ if (new_size > INT_MAX) { -+ V8::FatalProcessOutOfMemory("Zone"); -+ return NULL; -+ } -+ Segment* segment = NewSegment(static_cast(new_size)); - if (segment == NULL) { - V8::FatalProcessOutOfMemory("Zone"); - return NULL; -@@ -203,7 +209,10 @@ Address Zone::NewExpand(int size) { - Address result = RoundUp(segment->start(), kAlignment); - position_ = result + size; - // Check for address overflow. -- if (position_ < result) { -+ // (Should not happen since the segment is guaranteed to accomodate -+ // size bytes + header and alignment padding) -+ if (reinterpret_cast(position_) -+ < reinterpret_cast(result)) { - V8::FatalProcessOutOfMemory("Zone"); - return NULL; - } --- -1.8.5.3 - diff --git a/v8-3.14.5.10-REPLACE_INVALID_UTF8.patch b/v8-3.14.5.10-REPLACE_INVALID_UTF8.patch deleted file mode 100644 index 28db0dd..0000000 --- a/v8-3.14.5.10-REPLACE_INVALID_UTF8.patch +++ /dev/null @@ -1,195 +0,0 @@ -diff -up v8-3.14.5.10/include/v8.h.riu v8-3.14.5.10/include/v8.h ---- v8-3.14.5.10/include/v8.h.riu 2015-09-21 13:31:44.871068685 -0400 -+++ v8-3.14.5.10/include/v8.h 2015-09-21 13:32:08.884868178 -0400 -@@ -1076,7 +1076,11 @@ class String : public Primitive { - NO_OPTIONS = 0, - HINT_MANY_WRITES_EXPECTED = 1, - NO_NULL_TERMINATION = 2, -- PRESERVE_ASCII_NULL = 4 -+ PRESERVE_ASCII_NULL = 4, -+ // Used by WriteUtf8 to replace orphan surrogate code units with the -+ // unicode replacement character. Needs to be set to guarantee valid UTF-8 -+ // output. -+ REPLACE_INVALID_UTF8 = 8 - }; - - // 16-bit character codes. -diff -up v8-3.14.5.10/src/api.cc.riu v8-3.14.5.10/src/api.cc ---- v8-3.14.5.10/src/api.cc.riu 2015-09-21 13:33:24.604235945 -0400 -+++ v8-3.14.5.10/src/api.cc 2015-09-21 13:37:21.428258540 -0400 -@@ -3759,7 +3759,8 @@ static int RecursivelySerializeToUtf8(i: - int end, - int recursion_budget, - int32_t previous_character, -- int32_t* last_character) { -+ int32_t* last_character, -+ bool replace_invalid_utf8) { - int utf8_bytes = 0; - while (true) { - if (string->IsAsciiRepresentation()) { -@@ -3775,7 +3776,10 @@ static int RecursivelySerializeToUtf8(i: - for (int i = start; i < end; i++) { - uint16_t character = data[i]; - current += -- unibrow::Utf8::Encode(current, character, previous_character); -+ unibrow::Utf8::Encode(current, -+ character, -+ previous_character, -+ replace_invalid_utf8); - previous_character = character; - } - *last_character = previous_character; -@@ -3788,7 +3792,10 @@ static int RecursivelySerializeToUtf8(i: - for (int i = start; i < end; i++) { - uint16_t character = data[i]; - current += -- unibrow::Utf8::Encode(current, character, previous_character); -+ unibrow::Utf8::Encode(current, -+ character, -+ previous_character, -+ replace_invalid_utf8); - previous_character = character; - } - *last_character = previous_character; -@@ -3824,7 +3831,8 @@ static int RecursivelySerializeToUtf8(i: - boundary, - recursion_budget - 1, - previous_character, -- &previous_character); -+ &previous_character, -+ replace_invalid_utf8); - if (extra_utf8_bytes < 0) return extra_utf8_bytes; - buffer += extra_utf8_bytes; - utf8_bytes += extra_utf8_bytes; -@@ -3879,7 +3887,10 @@ int String::WriteUtf8(char* buffer, - return len; - } - -- if (capacity == -1 || capacity / 3 >= string_length) { -+ bool replace_invalid_utf8 = (options & REPLACE_INVALID_UTF8); -+ int max16BitCodeUnitSize = unibrow::Utf8::kMax16BitCodeUnitSize; -+ -+ if (capacity == -1 || capacity / max16BitCodeUnitSize >= string_length) { - int32_t previous = unibrow::Utf16::kNoPreviousCharacter; - const int kMaxRecursion = 100; - int utf8_bytes = -@@ -3889,7 +3900,8 @@ int String::WriteUtf8(char* buffer, - string_length, - kMaxRecursion, - previous, -- &previous); -+ &previous, -+ replace_invalid_utf8); - if (utf8_bytes >= 0) { - // Success serializing with recursion. - if ((options & NO_NULL_TERMINATION) == 0 && -@@ -3942,14 +3954,16 @@ int String::WriteUtf8(char* buffer, - char intermediate[unibrow::Utf8::kMaxEncodedSize]; - for (; i < len && pos < capacity; i++) { - i::uc32 c = write_input_buffer.GetNext(); -- if (unibrow::Utf16::IsTrailSurrogate(c) && -- unibrow::Utf16::IsLeadSurrogate(previous)) { -+ if (unibrow::Utf16::IsSurrogatePair(previous, c)) { - // We can't use the intermediate buffer here because the encoding - // of surrogate pairs is done under assumption that you can step - // back and fix the UTF8 stream. Luckily we only need space for one - // more byte, so there is always space. - ASSERT(pos < capacity); -- int written = unibrow::Utf8::Encode(buffer + pos, c, previous); -+ int written = unibrow::Utf8::Encode(buffer + pos, -+ c, -+ previous, -+ replace_invalid_utf8); - ASSERT(written == 1); - pos += written; - nchars++; -@@ -3957,7 +3971,8 @@ int String::WriteUtf8(char* buffer, - int written = - unibrow::Utf8::Encode(intermediate, - c, -- unibrow::Utf16::kNoPreviousCharacter); -+ unibrow::Utf16::kNoPreviousCharacter, -+ replace_invalid_utf8); - if (pos + written <= capacity) { - for (int j = 0; j < written; j++) { - buffer[pos + j] = intermediate[j]; -diff -up v8-3.14.5.10/src/unicode.h.riu v8-3.14.5.10/src/unicode.h ---- v8-3.14.5.10/src/unicode.h.riu 2015-09-21 13:38:50.617513839 -0400 -+++ v8-3.14.5.10/src/unicode.h 2015-09-21 13:40:32.019667163 -0400 -@@ -117,6 +117,9 @@ class Buffer { - - class Utf16 { - public: -+ static inline bool IsSurrogatePair(int lead, int trail) { -+ return IsLeadSurrogate(lead) && IsTrailSurrogate(trail); -+ } - static inline bool IsLeadSurrogate(int code) { - if (code == kNoPreviousCharacter) return false; - return (code & 0xfc00) == 0xd800; -@@ -152,13 +155,19 @@ class Utf16 { - class Utf8 { - public: - static inline uchar Length(uchar chr, int previous); -- static inline unsigned Encode( -- char* out, uchar c, int previous); -+ static inline unsigned Encode(char* out, -+ uchar c, -+ int previous, -+ bool replace_invalid = false); - static const byte* ReadBlock(Buffer str, byte* buffer, - unsigned capacity, unsigned* chars_read, unsigned* offset); - static uchar CalculateValue(const byte* str, - unsigned length, - unsigned* cursor); -+ -+ -+ // The unicode replacement character, used to signal invalid unicode -+ // sequences (e.g. an orphan surrogate) when converting to a UTF-8 encoding. - static const uchar kBadChar = 0xFFFD; - static const unsigned kMaxEncodedSize = 4; - static const unsigned kMaxOneByteChar = 0x7f; -@@ -170,6 +179,9 @@ class Utf8 { - // that match are coded as a 4 byte UTF-8 sequence. - static const unsigned kBytesSavedByCombiningSurrogates = 2; - static const unsigned kSizeOfUnmatchedSurrogate = 3; -+ // The maximum size a single UTF-16 code unit may take up when encoded as -+ // UTF-8. -+ static const unsigned kMax16BitCodeUnitSize = 3; - - private: - template friend class Utf8InputBuffer; -diff -up v8-3.14.5.10/src/unicode-inl.h.riu v8-3.14.5.10/src/unicode-inl.h ---- v8-3.14.5.10/src/unicode-inl.h.riu 2015-09-21 13:37:36.002136853 -0400 -+++ v8-3.14.5.10/src/unicode-inl.h 2015-09-21 13:38:41.566589411 -0400 -@@ -79,7 +79,10 @@ template int Mapping> 12); - str[1] = 0x80 | ((c >> 6) & kMask); diff --git a/v8-3.14.5.10-abort-uncaught-exception.patch b/v8-3.14.5.10-abort-uncaught-exception.patch deleted file mode 100644 index b2f2a08..0000000 --- a/v8-3.14.5.10-abort-uncaught-exception.patch +++ /dev/null @@ -1,139 +0,0 @@ -From fbff7054a47551387a99244e2cf0631f30406798 Mon Sep 17 00:00:00 2001 -From: Trevor Norris -Date: Tue, 18 Nov 2014 16:37:54 -0800 -Subject: [PATCH] v8: add api for aborting on uncaught exception - -Add v8::Isolate::SetAbortOnUncaughtException() so the user can be -notified when an uncaught exception has bubbled. - -PR-URL: https://github.com/joyent/node/pull/8666 -Reviewed-by: Trevor Norris ---- - include/v8.h | 11 +++++++++++ - src/api.cc | 5 +++++ - src/isolate.cc | 33 +++++++++++++++++++++++---------- - src/isolate.h | 5 +++++ - 4 files changed, 44 insertions(+), 10 deletions(-) - -diff --git a/include/v8.h b/include/v8.h -index 71a0d01..e229ed9 100644 ---- a/include/v8.h -+++ b/include/v8.h -@@ -2842,6 +2842,17 @@ class V8EXPORT Isolate { - static Isolate* GetCurrent(); - - /** -+ * Custom callback used by embedders to help V8 determine if it should abort -+ * when it throws and no internal handler can catch the exception. -+ * If FLAG_abort_on_uncaught_exception is true, then V8 will abort if either: -+ * - no custom callback is set. -+ * - the custom callback set returns true. -+ * Otherwise it won't abort. -+ */ -+ typedef bool (*abort_on_uncaught_exception_t)(); -+ void SetAbortOnUncaughtException(abort_on_uncaught_exception_t callback); -+ -+ /** - * Methods below this point require holding a lock (using Locker) in - * a multi-threaded environment. - */ -diff --git a/src/api.cc b/src/api.cc -index 96d564f..4b1aa67 100644 ---- a/src/api.cc -+++ b/src/api.cc -@@ -5550,6 +5550,11 @@ void Isolate::Enter() { - isolate->Enter(); - } - -+void Isolate::SetAbortOnUncaughtException( -+ abort_on_uncaught_exception_t callback) { -+ i::Isolate* isolate = reinterpret_cast(this); -+ isolate->SetAbortOnUncaughtException(callback); -+} - - void Isolate::Exit() { - i::Isolate* isolate = reinterpret_cast(this); -diff --git a/src/isolate.cc b/src/isolate.cc -index 5a5293e..0b38616 100644 ---- a/src/isolate.cc -+++ b/src/isolate.cc -@@ -1152,18 +1152,26 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) { - thread_local_top()->pending_message_end_pos_ = location->end_pos(); - } - -- // If the abort-on-uncaught-exception flag is specified, abort on any -- // exception not caught by JavaScript, even when an external handler is -- // present. This flag is intended for use by JavaScript developers, so -- // print a user-friendly stack trace (not an internal one). -+ // If the abort-on-uncaught-exception flag is specified, and if the -+ // exception is not caught by JavaScript (even when an external handler is -+ // present). - if (fatal_exception_depth == 0 && - FLAG_abort_on_uncaught_exception && - (report_exception || can_be_caught_externally)) { -- fatal_exception_depth++; -- fprintf(stderr, "%s\n\nFROM\n", -- *MessageHandler::GetLocalizedMessage(message_obj)); -- PrintCurrentStackTrace(stderr); -- OS::Abort(); -+ // If the embedder didn't specify a custom uncaught exception callback, -+ // or if the custom callback determined that V8 should abort, then -+ // abort -+ bool should_abort = !abort_on_uncaught_exception_callback_ || -+ abort_on_uncaught_exception_callback_(); -+ if (should_abort) { -+ fatal_exception_depth++; -+ // This flag is intended for use by JavaScript developers, so -+ // print a user-friendly stack trace (not an internal one). -+ fprintf(stderr, "%s\n\nFROM\n", -+ *MessageHandler::GetLocalizedMessage(message_obj)); -+ PrintCurrentStackTrace(stderr); -+ OS::Abort(); -+ } - } - } else if (location != NULL && !location->script().is_null()) { - // We are bootstrapping and caught an error where the location is set -@@ -1339,6 +1347,10 @@ void Isolate::SetCaptureStackTraceForUncaughtExceptions( - stack_trace_for_uncaught_exceptions_options_ = options; - } - -+void Isolate::SetAbortOnUncaughtException( -+ v8::Isolate::abort_on_uncaught_exception_t callback) { -+ abort_on_uncaught_exception_callback_ = callback; -+} - - bool Isolate::is_out_of_memory() { - if (has_pending_exception()) { -@@ -1534,7 +1546,8 @@ Isolate::Isolate() - date_cache_(NULL), - context_exit_happened_(false), - deferred_handles_head_(NULL), -- optimizing_compiler_thread_(this) { -+ optimizing_compiler_thread_(this), -+ abort_on_uncaught_exception_callback_(NULL) { - TRACE_ISOLATE(constructor); - - memset(isolate_addresses_, 0, -diff --git a/src/isolate.h b/src/isolate.h -index 2769ca7..8719aa1 100644 ---- a/src/isolate.h -+++ b/src/isolate.h -@@ -692,6 +692,9 @@ class Isolate { - int frame_limit, - StackTrace::StackTraceOptions options); - -+ typedef bool (*abort_on_uncaught_exception_t)(); -+ void SetAbortOnUncaughtException(abort_on_uncaught_exception_t callback); -+ - // Tells whether the current context has experienced an out of memory - // exception. - bool is_out_of_memory(); -@@ -1292,6 +1295,8 @@ class Isolate { - DeferredHandles* deferred_handles_head_; - OptimizingCompilerThread optimizing_compiler_thread_; - -+ abort_on_uncaught_exception_t abort_on_uncaught_exception_callback_; -+ - friend class ExecutionAccess; - friend class HandleScopeImplementer; - friend class IsolateInitializer; diff --git a/v8-3.14.5.10-busy-loop.patch b/v8-3.14.5.10-busy-loop.patch deleted file mode 100644 index fcc906c..0000000 --- a/v8-3.14.5.10-busy-loop.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 6ebd85e10535dfaa9181842fe73834e51d4d3e6c Mon Sep 17 00:00:00 2001 -From: Ben Noordhuis -Date: Thu, 27 Nov 2014 07:15:54 +0100 -Subject: [PATCH] v8: don't busy loop in cpu profiler thread - -Reduce the overhead of the CPU profiler by replacing sched_yield() with -nanosleep() in V8's tick event processor thread. The former only yields -the CPU when there is another process scheduled on the same CPU. - -Before this commit, the thread would effectively busy loop and consume -100% CPU time. By forcing a one nanosecond sleep period rounded up to -the task scheduler's granularity (about 50 us on Linux), CPU usage for -the processor thread now hovers around 10-20% for a busy application. - -PR-URL: https://github.com/joyent/node/pull/8789 -Ref: https://github.com/strongloop/strong-agent/issues/3 -Reviewed-by: Trevor Norris ---- - src/platform-freebsd.cc | 5 ----- - src/platform-linux.cc | 5 ----- - src/platform-macos.cc | 5 ----- - src/platform-openbsd.cc | 5 ----- - src/platform-posix.cc | 6 ++++++ - src/platform-solaris.cc | 5 ----- - tools/gyp/v8.gyp | 2 +- - 7 files changed, 7 insertions(+), 26 deletions(-) - -diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc -index 511759c..5c90c6b 100644 ---- a/src/platform-freebsd.cc -+++ b/src/platform-freebsd.cc -@@ -539,11 +539,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { - } - - --void Thread::YieldCPU() { -- sched_yield(); --} -- -- - class FreeBSDMutex : public Mutex { - public: - FreeBSDMutex() { -diff --git a/src/platform-linux.cc b/src/platform-linux.cc -index beb2cce..3d6b304 100644 ---- a/src/platform-linux.cc -+++ b/src/platform-linux.cc -@@ -812,11 +812,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { - } - - --void Thread::YieldCPU() { -- sched_yield(); --} -- -- - class LinuxMutex : public Mutex { - public: - LinuxMutex() { -diff --git a/src/platform-macos.cc b/src/platform-macos.cc -index a216f6e..e54e3e4 100644 ---- a/src/platform-macos.cc -+++ b/src/platform-macos.cc -@@ -640,11 +640,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { - } - - --void Thread::YieldCPU() { -- sched_yield(); --} -- -- - class MacOSMutex : public Mutex { - public: - MacOSMutex() { -diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc -index 408d4dc..72167de 100644 ---- a/src/platform-openbsd.cc -+++ b/src/platform-openbsd.cc -@@ -593,11 +593,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { - } - - --void Thread::YieldCPU() { -- sched_yield(); --} -- -- - class OpenBSDMutex : public Mutex { - public: - OpenBSDMutex() { -diff --git a/src/platform-posix.cc b/src/platform-posix.cc -index 5c3529d..8aecd56 100644 ---- a/src/platform-posix.cc -+++ b/src/platform-posix.cc -@@ -392,6 +392,12 @@ void OS::StrNCpy(Vector dest, const char* src, size_t n) { - } - - -+void Thread::YieldCPU() { -+ const timespec delay = { 0, 1 }; -+ nanosleep(&delay, NULL); -+} -+ -+ - // ---------------------------------------------------------------------------- - // POSIX socket support. - // -diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc -index 07718fe..4e95ecc 100644 ---- a/src/platform-solaris.cc -+++ b/src/platform-solaris.cc -@@ -527,11 +527,6 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { - } - - --void Thread::YieldCPU() { -- sched_yield(); --} -- -- - class SolarisMutex : public Mutex { - public: - SolarisMutex() { -diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp -index 71cf366..c304925 100644 ---- a/tools/gyp/v8.gyp -+++ b/tools/gyp/v8.gyp -@@ -715,7 +715,7 @@ - ['OS=="solaris"', { - 'link_settings': { - 'libraries': [ -- '-lsocket -lnsl', -+ '-lsocket -lnsl -lrt', - ]}, - 'sources': [ - '../../src/platform-solaris.cc', diff --git a/v8-3.14.5.10-enumeration.patch b/v8-3.14.5.10-enumeration.patch deleted file mode 100644 index 4dea2a5..0000000 --- a/v8-3.14.5.10-enumeration.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 196184d332ba2d2defc56ad0b37653659a7d3ec0 Mon Sep 17 00:00:00 2001 -From: "svenpanne@chromium.org" -Date: Fri, 9 Nov 2012 11:30:05 +0000 -Subject: [PATCH] v8: backport codereview.chromium.org/11362182 - -Keep the number of descriptors below -DescriptorArray::kMaxNumberOfDescriptors even for accessors - -Review URL: https://codereview.chromium.org/11362182 ---- - src/objects.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/objects.cc b/src/objects.cc ---- a/src/objects.cc -+++ b/src/objects.cc -@@ -4453,7 +4453,9 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name, - // to do a lookup, which seems to be a bit of overkill. - Heap* heap = GetHeap(); - bool only_attribute_changes = getter->IsNull() && setter->IsNull(); -- if (HasFastProperties() && !only_attribute_changes) { -+ if (HasFastProperties() && !only_attribute_changes && -+ (map()->NumberOfOwnDescriptors() < -+ DescriptorArray::kMaxNumberOfDescriptors)) { - MaybeObject* getterOk = heap->undefined_value(); - if (!getter->IsNull()) { - getterOk = DefineFastAccessor(name, ACCESSOR_GETTER, getter, attributes); --- -1.8.5.1 - diff --git a/v8-3.14.5.10-interrupts-stack-overflow.patch b/v8-3.14.5.10-interrupts-stack-overflow.patch deleted file mode 100644 index 049b4df..0000000 --- a/v8-3.14.5.10-interrupts-stack-overflow.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 530af9cb8e700e7596b3ec812bad123c9fa06356 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Wed, 30 Jul 2014 15:33:52 -0700 -Subject: [PATCH] v8: Interrupts must not mask stack overflow. - -Backport of https://codereview.chromium.org/339883002 ---- - src/isolate.h | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/src/isolate.h b/src/isolate.h -index b90191d..2769ca7 100644 ---- a/src/isolate.h -+++ b/src/isolate.h -@@ -1392,14 +1392,9 @@ class StackLimitCheck BASE_EMBEDDED { - public: - explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } - -- bool HasOverflowed() const { -+ inline bool HasOverflowed() const { - StackGuard* stack_guard = isolate_->stack_guard(); -- // Stack has overflowed in C++ code only if stack pointer exceeds the C++ -- // stack guard and the limits are not set to interrupt values. -- // TODO(214): Stack overflows are ignored if a interrupt is pending. This -- // code should probably always use the initial C++ limit. -- return (reinterpret_cast(this) < stack_guard->climit()) && -- stack_guard->IsStackOverflow(); -+ return reinterpret_cast(this) < stack_guard->real_climit(); - } - private: - Isolate* isolate_; diff --git a/v8-3.14.5.10-mem-corruption-stack-overflow.patch b/v8-3.14.5.10-mem-corruption-stack-overflow.patch deleted file mode 100644 index 452464b..0000000 --- a/v8-3.14.5.10-mem-corruption-stack-overflow.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 530af9cb8e700e7596b3ec812bad123c9fa06356 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Wed, 30 Jul 2014 15:33:52 -0700 -Subject: [PATCH] v8: Interrupts must not mask stack overflow. - -Backport of https://codereview.chromium.org/339883002 ---- - src/isolate.h | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/src/isolate.h b/src/isolate.h -index b90191d..2769ca7 100644 ---- a/src/isolate.h -+++ b/src/isolate.h -@@ -1392,14 +1392,9 @@ class StackLimitCheck BASE_EMBEDDED { - public: - explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } - -- bool HasOverflowed() const { -+ inline bool HasOverflowed() const { - StackGuard* stack_guard = isolate_->stack_guard(); -- // Stack has overflowed in C++ code only if stack pointer exceeds the C++ -- // stack guard and the limits are not set to interrupt values. -- // TODO(214): Stack overflows are ignored if a interrupt is pending. This -- // code should probably always use the initial C++ limit. -- return (reinterpret_cast(this) < stack_guard->climit()) && -- stack_guard->IsStackOverflow(); -+ return reinterpret_cast(this) < stack_guard->real_climit(); - } - private: - Isolate* isolate_; --- -2.0.3 diff --git a/v8-3.14.5.10-profiler-log.patch b/v8-3.14.5.10-profiler-log.patch deleted file mode 100644 index 2530e54..0000000 --- a/v8-3.14.5.10-profiler-log.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 431eb172f97434a3b0868a610bc14d8ff7d9efd9 Mon Sep 17 00:00:00 2001 -From: Ben Noordhuis -Date: Fri, 16 Jan 2015 13:44:42 +0100 -Subject: [PATCH] deps: log V8 version in profiler log file - -Patch from issue 800293002 authored by ben@strongloop.com - -Review URL: https://codereview.chromium.org/806143002 - -PR-URL: https://github.com/joyent/node/pull/9043 -Reviewed-by: Trevor Norris -Reviewed-By: Timothy J Fontaine ---- - src/log-utils.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/log-utils.cc b/src/log-utils.cc -index 5e607da..622cc51 100644 ---- a/src/log-utils.cc -+++ b/src/log-utils.cc -@@ -29,6 +29,7 @@ - - #include "log-utils.h" - #include "string-stream.h" -+#include "version.h" - - namespace v8 { - namespace internal { -@@ -136,6 +137,14 @@ void Log::Initialize() { - } - } - } -+ -+ if (output_handle_ != NULL) { -+ LogMessageBuilder msg(logger_); -+ msg.Append("v8-version,%d,%d,%d,%d,%d\n", Version::GetMajor(), -+ Version::GetMinor(), Version::GetBuild(), Version::GetPatch(), -+ Version::IsCandidate()); -+ msg.WriteToLogFile(); -+ } - } - - diff --git a/v8-3.14.5.10-system-valgrind.patch b/v8-3.14.5.10-system-valgrind.patch deleted file mode 100644 index 1e5b0cb..0000000 --- a/v8-3.14.5.10-system-valgrind.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 - #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 - #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-3.14.5.10-unhandled-ReferenceError.patch b/v8-3.14.5.10-unhandled-ReferenceError.patch deleted file mode 100644 index 7762fa8..0000000 --- a/v8-3.14.5.10-unhandled-ReferenceError.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0ff51c6e063e3eea9e4d9ea68edc82d935626fc7 Mon Sep 17 00:00:00 2001 -From: Julien Gilli -Date: Fri, 28 Nov 2014 15:33:35 -0800 -Subject: [PATCH] deps: backport 2ad2237 from v8 upstream - -Original commit message: - -Fix Unhandled ReferenceError in debug-debugger.js - -This fixes following exception in Sky on attempt to set a breakpoint -"Unhandled: Uncaught ReferenceError: break_point is not defined" -I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode. - -BUG=None -LOG=N -R=yangguo@chromium.org - -Review URL: https://codereview.chromium.org/741683002 - -Cr-Commit-Position: refs/heads/master@{#25415} ---- - src/debug-debugger.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/debug-debugger.js b/src/debug-debugger.js -index dfad902..a27961f 100644 ---- a/src/debug-debugger.js -+++ b/src/debug-debugger.js -@@ -442,7 +442,7 @@ ScriptBreakPoint.prototype.set = function (script) { - if (position === null) return; - - // Create a break point object and set the break point. -- break_point = MakeBreakPoint(position, this); -+ var break_point = MakeBreakPoint(position, this); - break_point.setIgnoreCount(this.ignoreCount()); - var actual_position = %SetScriptBreakPoint(script, position, break_point); - if (IS_UNDEFINED(actual_position)) { diff --git a/v8-3.14.5.10-unused-local-typedefs.patch b/v8-3.14.5.10-unused-local-typedefs.patch deleted file mode 100644 index c168875..0000000 --- a/v8-3.14.5.10-unused-local-typedefs.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 53b4accb6e5747b156be91a2b90f42607e33a7cc Mon Sep 17 00:00:00 2001 -From: Timothy J Fontaine -Date: Mon, 4 Aug 2014 13:43:50 -0700 -Subject: [PATCH] v8: Fix compliation with GCC 4.8 - -Supresses a very loud warning from GCC 4.8 about unused typedefs - -Original url https://codereview.chromium.org/69413002 ---- - src/checks.h | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/checks.h b/src/checks.h -index d0a0c2b..4396ada 100644 ---- a/src/checks.h -+++ b/src/checks.h -@@ -230,6 +230,13 @@ inline void CheckNonEqualsHelper(const char* file, - #define CHECK_LE(a, b) CHECK((a) <= (b)) - - -+#if defined(__clang__) || defined(__GNUC__) -+# define V8_UNUSED __attribute__((unused)) -+#else -+# define V8_UNUSED -+#endif -+ -+ - // This is inspired by the static assertion facility in boost. This - // is pretty magical. If it causes you trouble on a platform you may - // find a fix in the boost code. -@@ -248,7 +255,7 @@ template class StaticAssertionHelper { }; - #define STATIC_CHECK(test) \ - typedef \ - StaticAssertionHelper((test))>)> \ -- SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) -+ SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) V8_UNUSED - - - extern bool FLAG_enable_slow_asserts; diff --git a/v8-3.14.5.10-use-clock_gettime.patch b/v8-3.14.5.10-use-clock_gettime.patch deleted file mode 100644 index cb25591..0000000 --- a/v8-3.14.5.10-use-clock_gettime.patch +++ /dev/null @@ -1,122 +0,0 @@ -From f9ced08de30c37838756e8227bd091f80ad9cafa Mon Sep 17 00:00:00 2001 -From: Ben Noordhuis -Date: Thu, 24 Apr 2014 04:27:40 +0200 -Subject: [PATCH] deps: make v8 use CLOCK_REALTIME_COARSE - -Date.now() indirectly calls gettimeofday() on Linux and that's a system -call that is extremely expensive on virtualized systems when the host -operating system has to emulate access to the hardware clock. - -Case in point: output from `perf record -c 10000 -e cycles:u -g -i` -for a benchmark/http_simple bytes/8 benchmark with a light load of -50 concurrent clients: - - 53.69% node node [.] v8::internal::OS::TimeCurrentMillis() - | - --- v8::internal::OS::TimeCurrentMillis() - | - |--99.77%-- v8::internal::Runtime_DateCurrentTime(v8::internal::Arguments, v8::internal::Isolate*) - | 0x23587880618e - -That's right - over half of user time spent inside the V8 function that -calls gettimeofday(). - -Notably, nearly all system time gets attributed to acpi_pm_read(), the -kernel function that reads the ACPI power management timer: - - 32.49% node [kernel.kallsyms] [k] acpi_pm_read - | - --- acpi_pm_read - | - |--98.40%-- __getnstimeofday - | getnstimeofday - | | - | |--71.61%-- do_gettimeofday - | | sys_gettimeofday - | | system_call_fastpath - | | 0x7fffbbaf6dbc - | | | - | | |--98.72%-- v8::internal::OS::TimeCurrentMillis() - -The cost of the gettimeofday() system call is normally measured in -nanoseconds but we were seeing 100 us averages and spikes >= 1000 us. -The numbers were so bad, my initial hunch was that the node process was -continuously getting rescheduled inside the system call... - -v8::internal::OS::TimeCurrentMillis()'s most frequent caller is -v8::internal::Runtime_DateCurrentTime(), the V8 run-time function -that's behind Date.now(). The timeout handling logic in lib/http.js -and lib/net.js calls into lib/timers.js and that module will happily -call Date.now() hundreds or even thousands of times per second. -If you saw exports._unrefActive() show up in --prof output a lot, -now you know why. - -That's why this commit makes V8 switch over to clock_gettime() on Linux. -In particular, it checks if CLOCK_REALTIME_COARSE is available and has -a resolution <= 1 ms because in that case the clock_gettime() call can -be fully serviced from the vDSO. - -It speeds up the aforementioned benchmark by about 100% on the affected -systems and should go a long way toward addressing the latency issues -that StrongLoop customers have been reporting. - -This patch will be upstreamed as a CR against V8 3.26. I'm sending it -as a pull request for v0.10 first because that's what our users are -running and because the delta between 3.26 and 3.14 is too big to -reasonably back-port the patch. I'll open a pull request for the -master branch once the CR lands upstream. - -Signed-off-by: Trevor Norris -Signed-off-by: Fedor Indutny ---- - src/platform-posix.cc | 26 ++++++++++++++++++++++---- - 1 file changed, 22 insertions(+), 4 deletions(-) - -diff --git a/src/platform-posix.cc b/src/platform-posix.cc -index ad74eba..3c86868 100644 ---- a/src/platform-posix.cc -+++ b/src/platform-posix.cc -@@ -188,19 +188,37 @@ int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { - - - double OS::TimeCurrentMillis() { -- struct timeval tv; -- if (gettimeofday(&tv, NULL) < 0) return 0.0; -- return (static_cast(tv.tv_sec) * 1000) + -- (static_cast(tv.tv_usec) / 1000); -+ return static_cast(Ticks()) / 1000; - } - - - int64_t OS::Ticks() { -+#if defined(__linux__) -+ static clockid_t clock_id = static_cast(-1); -+ struct timespec spec; -+ if (clock_id == static_cast(-1)) { -+ // CLOCK_REALTIME_COARSE may not be defined by the system headers but -+ // might still be supported by the kernel so use the clock id directly. -+ // Only use CLOCK_REALTIME_COARSE when its granularity <= 1 ms. -+ const clockid_t clock_realtime_coarse = 5; -+ if (clock_getres(clock_realtime_coarse, &spec) == 0 && -+ spec.tv_nsec <= 1000 * 1000) { -+ clock_id = clock_realtime_coarse; -+ } else { -+ clock_id = CLOCK_REALTIME; -+ } -+ } -+ if (clock_gettime(clock_id, &spec) != 0) { -+ return 0; // Not really possible. -+ } -+ return static_cast(spec.tv_sec) * 1000000 + (spec.tv_nsec / 1000); -+#else - // gettimeofday has microsecond resolution. - struct timeval tv; - if (gettimeofday(&tv, NULL) < 0) - return 0; - return (static_cast(tv.tv_sec) * 1000000) + tv.tv_usec; -+#endif - } - - --- -1.9.1 diff --git a/v8-3.14.5.10-x64-MathMinMax.patch b/v8-3.14.5.10-x64-MathMinMax.patch deleted file mode 100644 index e7b167d..0000000 --- a/v8-3.14.5.10-x64-MathMinMax.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 3530fa9cd09f8db8101c4649cab03bcdf760c434 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Fri, 21 Dec 2012 17:52:00 +0000 -Subject: [PATCH] deps: backport 4ed5fde4f from v8 upstream - -Original commit message: - - Fix x64 MathMinMax for negative untagged int32 arguments. - - An untagged int32 has zeros in the upper half even if it is negative. - Using cmpq to compare such numbers will incorrectly ignore the sign. - - BUG=164442 - R=mvstanton@chromium.org - - Review URL: https://chromiumcodereview.appspot.com/11665007 - - git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 - -Signed-off-by: Fedor Indutny ---- - src/x64/lithium-codegen-x64.cc | 6 ++-- - test/mjsunit/regress/regress-164442.js | 45 ++++++++++++++++++++++++++ - 2 files changed, 48 insertions(+), 3 deletions(-) - create mode 100644 test/mjsunit/regress/regress-164442.js - -diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc -index b461e62..ff01f44 100644 ---- a/src/x64/lithium-codegen-x64.cc -+++ b/src/x64/lithium-codegen-x64.cc -@@ -1457,17 +1457,17 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) { - if (right->IsConstantOperand()) { - Immediate right_imm = - Immediate(ToInteger32(LConstantOperand::cast(right))); -- __ cmpq(left_reg, right_imm); -+ __ cmpl(left_reg, right_imm); - __ j(condition, &return_left, Label::kNear); - __ movq(left_reg, right_imm); - } else if (right->IsRegister()) { - Register right_reg = ToRegister(right); -- __ cmpq(left_reg, right_reg); -+ __ cmpl(left_reg, right_reg); - __ j(condition, &return_left, Label::kNear); - __ movq(left_reg, right_reg); - } else { - Operand right_op = ToOperand(right); -- __ cmpq(left_reg, right_op); -+ __ cmpl(left_reg, right_op); - __ j(condition, &return_left, Label::kNear); - __ movq(left_reg, right_op); - } -diff --git a/test/mjsunit/regress/regress-164442.js b/test/mjsunit/regress/regress-164442.js -new file mode 100644 -index 0000000..1160d87 ---- /dev/null -+++ b/test/mjsunit/regress/regress-164442.js -@@ -0,0 +1,45 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following -+// disclaimer in the documentation and/or other materials provided -+// with the distribution. -+// * Neither the name of Google Inc. nor the names of its -+// contributors may be used to endorse or promote products derived -+// from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+// Flags: --allow-natives-syntax -+ -+// Should not take a very long time (n^2 algorithms are bad) -+ -+ -+function ensureNotNegative(x) { -+ return Math.max(0, x | 0); -+} -+ -+ -+ensureNotNegative(1); -+ensureNotNegative(2); -+ -+%OptimizeFunctionOnNextCall(ensureNotNegative); -+ -+var r = ensureNotNegative(-1); -+ -+assertEquals(0, r); --- -2.0.3 - diff --git a/v8-3.14.5.10-x64-compare-stubs.patch b/v8-3.14.5.10-x64-compare-stubs.patch deleted file mode 100644 index bf7c542..0000000 --- a/v8-3.14.5.10-x64-compare-stubs.patch +++ /dev/null @@ -1,116 +0,0 @@ -From a960d1707a0038bfa5546c669b5b63c35bdb75c5 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Fri, 2 May 2014 22:44:45 +0400 -Subject: [PATCH] deps: backport 23f2736a from v8 upstream - -Original text: - - Fix corner case in x64 compare stubs. - - BUG=v8:2416 - - Review URL: https://codereview.chromium.org/11413087 - -fix #7528 ---- - src/x64/code-stubs-x64.cc | 2 +- - test/mjsunit/regress/regress-2416.js | 75 ++++++++++++++++++++++++++++ - 2 files changed, 76 insertions(+), 1 deletion(-) - create mode 100644 test/mjsunit/regress/regress-2416.js - -diff --git a/src/x64/code-stubs-x64.cc b/deps/v8/src/x64/code-stubs-x64.cc -index f0f9c5d..9ad0167 100644 ---- a/src/x64/code-stubs-x64.cc -+++ b/src/x64/code-stubs-x64.cc -@@ -5580,7 +5580,7 @@ void ICCompareStub::GenerateSmis(MacroAssembler* masm) { - __ subq(rdx, rax); - __ j(no_overflow, &done, Label::kNear); - // Correct sign of result in case of overflow. -- __ SmiNot(rdx, rdx); -+ __ not_(rdx); - __ bind(&done); - __ movq(rax, rdx); - } -diff --git a/test/mjsunit/regress/regress-2416.js b/deps/v8/test/mjsunit/regress/regress-2416.js -new file mode 100644 -index 0000000..02afeb9 ---- /dev/null -+++ b/test/mjsunit/regress/regress-2416.js -@@ -0,0 +1,75 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following -+// disclaimer in the documentation and/or other materials provided -+// with the distribution. -+// * Neither the name of Google Inc. nor the names of its -+// contributors may be used to endorse or promote products derived -+// from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+assertFalse(2147483647 < -2147483648) -+assertFalse(2147483647 <= -2147483648) -+assertFalse(2147483647 == -2147483648) -+assertTrue(2147483647 >= -2147483648) -+assertTrue(2147483647 > -2147483648) -+ -+assertTrue(-2147483648 < 2147483647) -+assertTrue(-2147483648 <= 2147483647) -+assertFalse(-2147483648 == 2147483647) -+assertFalse(-2147483648 >= 2147483647) -+assertFalse(-2147483648 > 2147483647) -+ -+assertFalse(2147483647 < 2147483647) -+assertTrue(2147483647 <= 2147483647) -+assertTrue(2147483647 == 2147483647) -+assertTrue(2147483647 >= 2147483647) -+assertFalse(2147483647 > 2147483647) -+ -+assertFalse(-2147483648 < -2147483648) -+assertTrue(-2147483648 <= -2147483648) -+assertTrue(-2147483648 == -2147483648) -+assertTrue(-2147483648 >= -2147483648) -+assertFalse(-2147483648 > -2147483648) -+ -+ -+assertFalse(1073741823 < -1073741824) -+assertFalse(1073741823 <= -1073741824) -+assertFalse(1073741823 == -1073741824) -+assertTrue(1073741823 >= -1073741824) -+assertTrue(1073741823 > -1073741824) -+ -+assertTrue(-1073741824 < 1073741823) -+assertTrue(-1073741824 <= 1073741823) -+assertFalse(-1073741824 == 1073741823) -+assertFalse(-1073741824 >= 1073741823) -+assertFalse(-1073741824 > 1073741823) -+ -+assertFalse(1073741823 < 1073741823) -+assertTrue(1073741823 <= 1073741823) -+assertTrue(1073741823 == 1073741823) -+assertTrue(1073741823 >= 1073741823) -+assertFalse(1073741823 > 1073741823) -+ -+assertFalse(-1073741824 < -1073741824) -+assertTrue(-1073741824 <= -1073741824) -+assertTrue(-1073741824 == -1073741824) -+assertTrue(-1073741824 >= -1073741824) -+assertFalse(-1073741824 > -1073741824) --- -1.9.3 diff --git a/v8-3.14.5.8-CVE-2013-2634.patch b/v8-3.14.5.8-CVE-2013-2634.patch deleted file mode 100644 index 6fdafce..0000000 --- a/v8-3.14.5.8-CVE-2013-2634.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 5b1d2144ebd47ea768ca5b3cfcda830433c88efe Mon Sep 17 00:00:00 2001 -From: "T.C. Hollingsworth" -Date: Thu, 21 Mar 2013 17:34:19 -0700 -Subject: [PATCH] backport fix for CVE-2013-2632 from SVN r13964 - ---- - src/objects-inl.h | 3 ++- - src/objects.h | 7 +++++-- - src/parser.cc | 4 ++-- - src/parser.h | 5 ----- - src/stub-cache.cc | 8 ++++---- - 5 files changed, 13 insertions(+), 14 deletions(-) - -diff --git a/src/objects-inl.h b/src/objects-inl.h -index ea5a93f..4834fa6 100644 ---- a/src/objects-inl.h -+++ b/src/objects-inl.h -@@ -3500,8 +3500,9 @@ Code::Flags Code::ComputeFlags(Kind kind, - kind == CALL_IC || - kind == STORE_IC || - kind == KEYED_STORE_IC); -+ ASSERT(argc <= Code::kMaxArguments); - // Compute the bit mask. -- int bits = KindField::encode(kind) -+ unsigned int bits = KindField::encode(kind) - | ICStateField::encode(ic_state) - | TypeField::encode(type) - | ExtraICStateField::encode(extra_ic_state) -diff --git a/src/objects.h b/src/objects.h -index 755dd42..47d7757 100644 ---- a/src/objects.h -+++ b/src/objects.h -@@ -4180,8 +4180,8 @@ class Code: public HeapObject { - // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that - // enumeration type has correct value range (see Issue 830 for more details). - enum Flags { -- FLAGS_MIN_VALUE = kMinInt, -- FLAGS_MAX_VALUE = kMaxInt -+ FLAGS_MIN_VALUE = 0, -+ FLAGS_MAX_VALUE = kMaxUInt32 - }; - - #define CODE_KIND_LIST(V) \ -@@ -4644,6 +4644,9 @@ class Code: public HeapObject { - // Signed field cannot be encoded using the BitField class. - static const int kArgumentsCountShift = 14; - static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); -+ static const int kArgumentsBits = -+ PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1; -+ static const int kMaxArguments = (1 << kArgumentsBits) - 1; - - // This constant should be encodable in an ARM instruction. - static const int kFlagsNotUsedInLookup = -diff --git a/src/parser.cc b/src/parser.cc -index 03e4b03..6da414a 100644 ---- a/src/parser.cc -+++ b/src/parser.cc -@@ -4243,7 +4243,7 @@ ZoneList* Parser::ParseArguments(bool* ok) { - while (!done) { - Expression* argument = ParseAssignmentExpression(true, CHECK_OK); - result->Add(argument, zone()); -- if (result->length() > kMaxNumFunctionParameters) { -+ if (result->length() > Code::kMaxArguments) { - ReportMessageAt(scanner().location(), "too_many_arguments", - Vector::empty()); - *ok = false; -@@ -4420,7 +4420,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle function_name, - - top_scope_->DeclareParameter(param_name, VAR); - num_parameters++; -- if (num_parameters > kMaxNumFunctionParameters) { -+ if (num_parameters > Code::kMaxArguments) { - ReportMessageAt(scanner().location(), "too_many_parameters", - Vector::empty()); - *ok = false; -diff --git a/src/parser.h b/src/parser.h -index 93fd1b8..e36a9b3 100644 ---- a/src/parser.h -+++ b/src/parser.h -@@ -449,11 +449,6 @@ class Parser { - Vector > args); - - private: -- // Limit on number of function parameters is chosen arbitrarily. -- // Code::Flags uses only the low 17 bits of num-parameters to -- // construct a hashable id, so if more than 2^17 are allowed, this -- // should be checked. -- static const int kMaxNumFunctionParameters = 32766; - static const int kMaxNumFunctionLocals = 131071; // 2^17-1 - - enum Mode { -diff --git a/src/stub-cache.cc b/src/stub-cache.cc -index 4119147..8490c7e 100644 ---- a/src/stub-cache.cc -+++ b/src/stub-cache.cc -@@ -617,7 +617,7 @@ Handle StubCache::ComputeCallConstant(int argc, - Handle code = - compiler.CompileCallConstant(object, holder, function, name, check); - code->set_check_type(check); -- ASSERT_EQ(flags, code->flags()); -+ ASSERT(flags == code->flags()); - PROFILE(isolate_, - CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); - GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); -@@ -655,7 +655,7 @@ Handle StubCache::ComputeCallField(int argc, - Handle code = - compiler.CompileCallField(Handle::cast(object), - holder, index, name); -- ASSERT_EQ(flags, code->flags()); -+ ASSERT(flags == code->flags()); - PROFILE(isolate_, - CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); - GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); -@@ -692,7 +692,7 @@ Handle StubCache::ComputeCallInterceptor(int argc, - Handle code = - compiler.CompileCallInterceptor(Handle::cast(object), - holder, name); -- ASSERT_EQ(flags, code->flags()); -+ ASSERT(flags == code->flags()); - PROFILE(isolate(), - CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); - GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); -@@ -721,7 +721,7 @@ Handle StubCache::ComputeCallGlobal(int argc, - CallStubCompiler compiler(isolate(), argc, kind, extra_state, cache_holder); - Handle code = - compiler.CompileCallGlobal(receiver, holder, cell, function, name); -- ASSERT_EQ(flags, code->flags()); -+ ASSERT(flags == code->flags()); - PROFILE(isolate(), - CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); - GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); --- -1.8.1.4 - diff --git a/v8-3.3.10-enable-experimental.patch b/v8-3.3.10-enable-experimental.patch deleted file mode 100644 index 1b14815..0000000 --- a/v8-3.3.10-enable-experimental.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -up v8-3.3.10/src/SConscript.experimental v8-3.3.10/src/SConscript ---- v8-3.3.10/src/SConscript.experimental 2011-08-10 11:55:38.000000000 -0400 -+++ v8-3.3.10/src/SConscript 2011-08-10 12:07:47.975380113 -0400 -@@ -133,6 +133,12 @@ SOURCES = { - zone.cc - extensions/gc-extension.cc - extensions/externalize-string-extension.cc -+ extensions/experimental/break-iterator.cc -+ extensions/experimental/collator.cc -+ extensions/experimental/i18n-extension.cc -+ extensions/experimental/i18n-locale.cc -+ extensions/experimental/i18n-utils.cc -+ extensions/experimental/language-matcher.cc - """), - 'arch:arm': Split(""" - arm/builtins-arm.cc -@@ -301,6 +307,10 @@ proxy.js - '''.split() - - -+I18N_LIBRARY_FILES = ''' -+extensions/experimental/i18n.js -+'''.split() -+ - def Abort(message): - print message - sys.exit(1) -@@ -328,6 +338,13 @@ def ConfigureObjectFiles(): - ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) - libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) - -+ # Combine the experimental I18N JavaScript library files into a C++ file -+ # and compile it. -+ i18n_library_files = [ s for s in I18N_LIBRARY_FILES ] -+ i18n_library_files.append('macros.py') -+ i18n_libraries_src = env.JS2C(['i18n-libraries.cc'], i18n_library_files, TYPE='I18N') -+ i18n_libraries_obj = context.ConfigureObject(env, i18n_libraries_src, CPPPATH=['.']) -+ - # Combine the experimental JavaScript library files into a C++ file - # and compile it. - experimental_library_files = [ s for s in EXPERIMENTAL_LIBRARY_FILES ] -@@ -351,7 +368,7 @@ def ConfigureObjectFiles(): - mksnapshot_env = env.Copy() - mksnapshot_env.Replace(**context.flags['mksnapshot']) - mksnapshot_src = 'mksnapshot.cc' -- mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') -+ mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, i18n_libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') - if context.use_snapshot: - if context.build_snapshot: - snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath) -@@ -360,7 +377,7 @@ def ConfigureObjectFiles(): - snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) - else: - snapshot_obj = empty_snapshot_obj -- library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj, snapshot_obj] -+ library_objs = [non_snapshot_files, libraries_obj, i18n_libraries_obj, experimental_libraries_obj, snapshot_obj] - return (library_objs, d8_objs, [mksnapshot], preparser_objs) - - diff --git a/v8-3.3.10-language-matcher-fix.patch b/v8-3.3.10-language-matcher-fix.patch deleted file mode 100644 index 85500c1..0000000 --- a/v8-3.3.10-language-matcher-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up v8-3.3.10/src/extensions/experimental/language-matcher.cc.fix v8-3.3.10/src/extensions/experimental/language-matcher.cc ---- v8-3.3.10/src/extensions/experimental/language-matcher.cc.fix 2011-08-10 12:12:39.257368098 -0400 -+++ v8-3.3.10/src/extensions/experimental/language-matcher.cc 2011-08-10 12:12:47.150362828 -0400 -@@ -42,7 +42,7 @@ namespace internal { - const unsigned int LanguageMatcher::kLanguageWeight = 75; - const unsigned int LanguageMatcher::kScriptWeight = 20; - const unsigned int LanguageMatcher::kRegionWeight = 5; --const unsigned int LanguageMatcher::kThreshold = 50; -+const int LanguageMatcher::kThreshold = 50; - const unsigned int LanguageMatcher::kPositionBonus = 1; - const char* const LanguageMatcher::kDefaultLocale = "root"; - -diff -up v8-3.3.10/src/extensions/experimental/language-matcher.h.fix v8-3.3.10/src/extensions/experimental/language-matcher.h ---- v8-3.3.10/src/extensions/experimental/language-matcher.h.fix 2011-08-10 12:13:15.147621253 -0400 -+++ v8-3.3.10/src/extensions/experimental/language-matcher.h 2011-08-10 12:13:24.311742395 -0400 -@@ -76,7 +76,7 @@ class LanguageMatcher { - static const unsigned int kRegionWeight; - - // LocaleID match score has to be over this number to accept the match. -- static const unsigned int kThreshold; -+ static const int kThreshold; - - // For breaking ties in priority queue. - static const unsigned int kPositionBonus; diff --git a/v8-3.4.14-CVE-2014-3152.patch b/v8-3.4.14-CVE-2014-3152.patch deleted file mode 100644 index a399c79..0000000 --- a/v8-3.4.14-CVE-2014-3152.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up v8-3.14.5.10/src/arm/lithium-codegen-arm.cc.cve20143152 v8-3.14.5.10/src/arm/lithium-codegen-arm.cc ---- v8-3.14.5.10/src/arm/lithium-codegen-arm.cc.cve20143152 2015-04-23 14:51:20.095648219 -0400 -+++ v8-3.14.5.10/src/arm/lithium-codegen-arm.cc 2015-04-23 14:53:28.834149299 -0400 -@@ -3034,7 +3034,8 @@ MemOperand LCodeGen::PrepareKeyedOperand - return MemOperand(base, scratch0(), LSL, shift_size); - } else { - ASSERT_EQ(-1, shift_size); -- return MemOperand(base, scratch0(), LSR, 1); -+ // key can be negative, so using ASR here. -+ return MemOperand(base, scratch0(), ASR, 1); - } - } - diff --git a/v8-3.4.14-enable-experimental.patch b/v8-3.4.14-enable-experimental.patch deleted file mode 100644 index 9a7b805..0000000 --- a/v8-3.4.14-enable-experimental.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -up v8-3.4.14-20110721svn8716/src/SConscript.experimental v8-3.4.14-20110721svn8716/src/SConscript ---- v8-3.4.14-20110721svn8716/src/SConscript.experimental 2011-07-21 11:02:27.000000000 -0400 -+++ v8-3.4.14-20110721svn8716/src/SConscript 2011-07-21 13:13:52.678543506 -0400 -@@ -134,6 +134,14 @@ SOURCES = { - zone.cc - extensions/gc-extension.cc - extensions/externalize-string-extension.cc -+ extensions/experimental/break-iterator.cc -+ extensions/experimental/collator.cc -+ extensions/experimental/datetime-format.cc -+ extensions/experimental/i18n-extension.cc -+ extensions/experimental/i18n-locale.cc -+ extensions/experimental/i18n-utils.cc -+ extensions/experimental/language-matcher.cc -+ extensions/experimental/number-format.cc - """), - 'arch:arm': Split(""" - arm/builtins-arm.cc -@@ -310,6 +318,10 @@ proxy.js - '''.split() - - -+I18N_LIBRARY_FILES = ''' -+extensions/experimental/i18n.js -+'''.split() -+ - def Abort(message): - print message - sys.exit(1) -@@ -348,6 +360,13 @@ def ConfigureObjectFiles(): - ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) - libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) - -+ # Combine the experimental I18N JavaScript library files into a C++ file -+ # and compile it. -+ i18n_library_files = [ s for s in I18N_LIBRARY_FILES ] -+ i18n_library_files.append('macros.py') -+ i18n_libraries_src = env.JS2C(['i18n-libraries.cc'], i18n_library_files, **BuildJS2CEnv('I18N')) -+ i18n_libraries_obj = context.ConfigureObject(env, i18n_libraries_src, CPPPATH=['.']) -+ - # Combine the experimental JavaScript library files into a C++ file - # and compile it. - experimental_library_files = [ s for s in EXPERIMENTAL_LIBRARY_FILES ] -@@ -373,7 +392,7 @@ def ConfigureObjectFiles(): - mksnapshot_env = env.Copy() - mksnapshot_env.Replace(**context.flags['mksnapshot']) - mksnapshot_src = 'mksnapshot.cc' -- mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') -+ mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, i18n_libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') - if context.use_snapshot: - if context.build_snapshot: - snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath) -@@ -382,7 +401,7 @@ def ConfigureObjectFiles(): - snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) - else: - snapshot_obj = empty_snapshot_obj -- library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj, snapshot_obj] -+ library_objs = [non_snapshot_files, libraries_obj, i18n_libraries_obj, experimental_libraries_obj, snapshot_obj] - return (library_objs, d8_objs, [mksnapshot], preparser_objs) - - diff --git a/v8-3.4.14-fix-experimental-compile.patch b/v8-3.4.14-fix-experimental-compile.patch deleted file mode 100644 index 5a85fd9..0000000 --- a/v8-3.4.14-fix-experimental-compile.patch +++ /dev/null @@ -1,243 +0,0 @@ -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc.BAD 2011-07-21 12:36:38.117525896 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.cc 2011-07-21 12:36:44.663541775 -0400 -@@ -25,7 +25,7 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/break-iterator.h" -+#include "extensions/experimental/break-iterator.h" - - #include - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h.BAD 2011-07-21 12:37:39.989539464 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/break-iterator.h 2011-07-21 12:37:47.271546557 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_BREAK_ITERATOR_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_BREAK_ITERATOR_H_ - --#include "include/v8.h" -+#include "v8.h" - - #include "unicode/uversion.h" - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc.BAD 2011-07-21 12:38:32.892541085 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.cc 2011-07-21 12:38:42.536540200 -0400 -@@ -25,7 +25,7 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/collator.h" -+#include "extensions/experimental/collator.h" - - #include "unicode/coll.h" - #include "unicode/locid.h" -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h.BAD 2011-07-21 12:40:38.695553065 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/collator.h 2011-07-21 12:40:46.604287238 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_COLLATOR_H - #define V8_EXTENSIONS_EXPERIMENTAL_COLLATOR_H_ - --#include "include/v8.h" -+#include "v8.h" - - #include "unicode/uversion.h" - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc.BAD 2011-07-21 12:42:32.070546811 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.cc 2011-07-21 12:42:43.429540019 -0400 -@@ -25,11 +25,11 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/datetime-format.h" -+#include "extensions/experimental/datetime-format.h" - - #include - --#include "src/extensions/experimental/i18n-utils.h" -+#include "extensions/experimental/i18n-utils.h" - #include "unicode/dtfmtsym.h" - #include "unicode/dtptngen.h" - #include "unicode/locid.h" -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h.BAD 2011-07-21 12:40:53.229295468 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/datetime-format.h 2011-07-21 12:41:00.279541337 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_DATETIME_FORMAT_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_DATETIME_FORMAT_H_ - --#include "include/v8.h" -+#include "v8.h" - - #include "unicode/uversion.h" - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc.BAD 2011-07-21 12:42:51.682535397 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.cc 2011-07-21 12:43:10.905542088 -0400 -@@ -25,14 +25,14 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/i18n-extension.h" -+#include "extensions/experimental/i18n-extension.h" - --#include "src/extensions/experimental/break-iterator.h" --#include "src/extensions/experimental/collator.h" --#include "src/extensions/experimental/datetime-format.h" --#include "src/extensions/experimental/i18n-locale.h" --#include "src/extensions/experimental/i18n-natives.h" --#include "src/extensions/experimental/number-format.h" -+#include "extensions/experimental/break-iterator.h" -+#include "extensions/experimental/collator.h" -+#include "extensions/experimental/datetime-format.h" -+#include "extensions/experimental/i18n-locale.h" -+#include "extensions/experimental/i18n-natives.h" -+#include "extensions/experimental/number-format.h" - - namespace v8 { - namespace internal { -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h.BAD 2011-07-21 12:41:13.170538335 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-extension.h 2011-07-21 12:41:20.023540712 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_I18N_EXTENSION_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_I18N_EXTENSION_H_ - --#include "include/v8.h" -+#include "v8.h" - - namespace v8 { - namespace internal { -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc.BAD 2011-07-21 12:43:18.896539148 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.cc 2011-07-21 12:43:32.626538677 -0400 -@@ -25,10 +25,10 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/i18n-locale.h" -+#include "extensions/experimental/i18n-locale.h" - --#include "src/extensions/experimental/i18n-utils.h" --#include "src/extensions/experimental/language-matcher.h" -+#include "extensions/experimental/i18n-utils.h" -+#include "extensions/experimental/language-matcher.h" - #include "unicode/locid.h" - #include "unicode/uloc.h" - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h.BAD 2011-07-21 12:41:28.401292703 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-locale.h 2011-07-21 12:41:34.887302839 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_I18N_LOCALE_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_I18N_LOCALE_H_ - --#include "include/v8.h" -+#include "v8.h" - - namespace v8 { - namespace internal { -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc.BAD 2011-07-21 12:43:40.641540032 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.cc 2011-07-21 12:43:47.258552856 -0400 -@@ -25,7 +25,7 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/i18n-utils.h" -+#include "extensions/experimental/i18n-utils.h" - - #include - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h.BAD 2011-07-21 12:41:47.436545325 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-utils.h 2011-07-21 12:41:53.749539656 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_I18N_UTILS_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_I18N_UTILS_H_ - --#include "include/v8.h" -+#include "v8.h" - - #include "unicode/uversion.h" - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc.BAD 2011-07-21 12:43:55.484291257 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.cc 2011-07-21 12:47:31.316288453 -0400 -@@ -28,11 +28,11 @@ - // TODO(cira): Remove LanguageMatcher from v8 when ICU implements - // language matching API. - --#include "src/extensions/experimental/language-matcher.h" -+#include "extensions/experimental/language-matcher.h" - - #include - --#include "src/extensions/experimental/i18n-utils.h" -+#include "extensions/experimental/i18n-utils.h" - #include "unicode/datefmt.h" // For getAvailableLocales - #include "unicode/locid.h" - #include "unicode/uloc.h" -@@ -43,7 +43,7 @@ namespace internal { - const unsigned int LanguageMatcher::kLanguageWeight = 75; - const unsigned int LanguageMatcher::kScriptWeight = 20; - const unsigned int LanguageMatcher::kRegionWeight = 5; --const unsigned int LanguageMatcher::kThreshold = 50; -+const int LanguageMatcher::kThreshold = 50; - const unsigned int LanguageMatcher::kPositionBonus = 1; - const char* const LanguageMatcher::kDefaultLocale = "root"; - -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h.BAD 2011-07-21 12:42:00.374537754 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/language-matcher.h 2011-07-21 12:47:59.556286069 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_LANGUAGE_MATCHER_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_LANGUAGE_MATCHER_H_ - --#include "include/v8.h" -+#include "v8.h" - - #include "unicode/uloc.h" - -@@ -76,7 +76,7 @@ class LanguageMatcher { - static const unsigned int kRegionWeight; - - // LocaleID match score has to be over this number to accept the match. -- static const unsigned int kThreshold; -+ static const int kThreshold; - - // For breaking ties in priority queue. - static const unsigned int kPositionBonus; -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc.BAD 2011-07-21 12:44:13.227297121 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.cc 2011-07-21 12:44:23.119292346 -0400 -@@ -25,11 +25,11 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --#include "src/extensions/experimental/number-format.h" -+#include "extensions/experimental/number-format.h" - - #include - --#include "src/extensions/experimental/i18n-utils.h" -+#include "extensions/experimental/i18n-utils.h" - #include "unicode/dcfmtsym.h" - #include "unicode/decimfmt.h" - #include "unicode/locid.h" -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h.BAD v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h.BAD 2011-07-21 12:42:15.678549139 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/number-format.h 2011-07-21 12:42:22.940543222 -0400 -@@ -28,7 +28,7 @@ - #ifndef V8_EXTENSIONS_EXPERIMENTAL_NUMBER_FORMAT_H_ - #define V8_EXTENSIONS_EXPERIMENTAL_NUMBER_FORMAT_H_ - --#include "include/v8.h" -+#include "v8.h" - - #include "unicode/uversion.h" - diff --git a/v8-3.4.14-i18n-js2c.patch b/v8-3.4.14-i18n-js2c.patch deleted file mode 100644 index 4665fff..0000000 --- a/v8-3.4.14-i18n-js2c.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py.i18n-js2c v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py ---- v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py.i18n-js2c 2011-07-21 14:39:22.402295140 -0400 -+++ v8-3.4.14-20110721svn8716/src/extensions/experimental/i18n-js2c.py 2011-07-21 14:39:28.328285018 -0400 -@@ -85,7 +85,7 @@ HEADER_TEMPLATE = """\ - // want to make changes to this file you should either change the - // javascript source files or the i18n-js2c.py script. - --#include "src/extensions/experimental/i18n-natives.h" -+#include "extensions/experimental/i18n-natives.h" - - namespace v8 { - namespace internal { -diff -up v8-3.4.14-20110721svn8716/src/SConscript.i18n-js2c v8-3.4.14-20110721svn8716/src/SConscript ---- v8-3.4.14-20110721svn8716/src/SConscript.i18n-js2c 2011-07-21 14:38:49.828400947 -0400 -+++ v8-3.4.14-20110721svn8716/src/SConscript 2011-07-21 14:38:49.869408897 -0400 -@@ -318,10 +318,6 @@ proxy.js - '''.split() - - --I18N_LIBRARY_FILES = ''' --extensions/experimental/i18n.js --'''.split() -- - def Abort(message): - print message - sys.exit(1) -@@ -360,11 +356,8 @@ def ConfigureObjectFiles(): - ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) - libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) - -- # Combine the experimental I18N JavaScript library files into a C++ file -- # and compile it. -- i18n_library_files = [ s for s in I18N_LIBRARY_FILES ] -- i18n_library_files.append('macros.py') -- i18n_libraries_src = env.JS2C(['i18n-libraries.cc'], i18n_library_files, **BuildJS2CEnv('I18N')) -+ # Compile the experimental I18N JavaScript C++ file we generated outside. -+ i18n_libraries_src = 'i18n-libraries.cc' - i18n_libraries_obj = context.ConfigureObject(env, i18n_libraries_src, CPPPATH=['.']) - - # Combine the experimental JavaScript library files into a C++ file diff --git a/v8-3.5.1-versioned-v8.patch b/v8-3.5.1-versioned-v8.patch deleted file mode 100644 index 25417ee..0000000 --- a/v8-3.5.1-versioned-v8.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: v8-3.5.1/SConstruct -=================================================================== ---- v8-3.5.1.orig/SConstruct -+++ v8-3.5.1/SConstruct -@@ -1350,6 +1350,9 @@ def BuildSpecific(env, mode, env_overrid - # When building shared object with SONAME version the library name. - library_name += '-' + version - -+ # Fedora patch: link d8 against versioned v8 -+ d8_flags['LIBS'][d8_flags['LIBS'].index('v8')] += '-' + version -+ print "BuildSpecific: d8_flags = %s" % d8_flags - # Generate library SONAME if required by the build. - if context.options['soname'] == 'on': - soname = GetSpecificSONAME() diff --git a/v8-4.10.91-system_icu.patch b/v8-4.10.91-system_icu.patch deleted file mode 100644 index 9ff86c0..0000000 --- a/v8-4.10.91-system_icu.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up v8-4.10.91/Makefile.system_icu v8-4.10.91/Makefile ---- v8-4.10.91/Makefile.system_icu 2016-01-27 17:20:20.554136527 -0500 -+++ v8-4.10.91/Makefile 2016-01-27 17:21:03.377907390 -0500 -@@ -44,6 +44,10 @@ endif - ifdef component - GYPFLAGS += -Dcomponent=$(component) - endif -+# system_icu=on -+ifeq ($(system_icu), on) -+ GYPFLAGS += -Duse_system_icu=1 -+endif - # disassembler=on - ifeq ($(disassembler), on) - GYPFLAGS += -Dv8_enable_disassembler=1 diff --git a/v8-5.2.197-readdir-fix.patch b/v8-5.2.197-readdir-fix.patch deleted file mode 100644 index b133d59..0000000 --- a/v8-5.2.197-readdir-fix.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc.readdir v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc ---- v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc.readdir 2016-05-02 09:47:32.000000000 -0400 -+++ v8-5.2.197/test/cctest/interpreter/generate-bytecode-expectations.cc 2016-05-02 15:42:49.961046560 -0400 -@@ -20,6 +20,8 @@ - #include - #endif - -+#include -+ - using v8::internal::interpreter::BytecodeExpectationsPrinter; - - #define REPORT_ERROR(MESSAGE) (((std::cerr << "ERROR: ") << MESSAGE) << '\n') -@@ -174,10 +176,12 @@ bool CollectGoldenFiles(std::vectord_name, ".golden")) { - std::string golden_filename(kGoldenFilesPath); - golden_filename += entry->d_name; diff --git a/v8-5.2.258-bundled-binutils.patch b/v8-5.2.258-bundled-binutils.patch deleted file mode 100644 index e80e5f1..0000000 --- a/v8-5.2.258-bundled-binutils.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up v8-5.2.258/Makefile.bb v8-5.2.258/Makefile ---- v8-5.2.258/Makefile.bb 2016-10-10 14:57:17.275968725 -0400 -+++ v8-5.2.258/Makefile 2016-10-10 14:58:37.012406994 -0400 -@@ -37,6 +37,12 @@ NACL_SDK_ROOT ?= - - # Special build flags. Use them like this: "make library=shared" - -+# bundledbinutils=off -+ifeq ($(bundledbinutils), off) -+ GYPFLAGS += -Dlinux_use_bundled_binutils=0 -+else -+ GYPFLAGS += -Dlinux_use_bundled_binutils=1 -+endif - # library=shared || component=shared_library - ifeq ($(library), shared) - GYPFLAGS += -Dcomponent=shared_library diff --git a/v8-5.2.258-gcc7.patch b/v8-5.2.258-gcc7.patch deleted file mode 100644 index 162a9c4..0000000 --- a/v8-5.2.258-gcc7.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff -up v8-5.2.258/samples/shell.cc.gcc7 v8-5.2.258/samples/shell.cc ---- v8-5.2.258/samples/shell.cc.gcc7 2017-02-28 15:33:38.931424708 -0500 -+++ v8-5.2.258/samples/shell.cc 2017-02-28 15:34:00.759853299 -0500 -@@ -361,6 +361,8 @@ bool ExecuteString(v8::Isolate* isolate, - } else { - v8::Local result; - if (!script->Run(context).ToLocal(&result)) { -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wgnu" - assert(try_catch.HasCaught()); - // Print errors that happened during execution. - if (report_exceptions) -@@ -368,6 +370,7 @@ bool ExecuteString(v8::Isolate* isolate, - return false; - } else { - assert(!try_catch.HasCaught()); -+#pragma GCC diagnostic pop - if (print_result && !result->IsUndefined()) { - // If all went well and the result wasn't undefined then print - // the returned value. -diff -up v8-5.2.258/src/crankshaft/lithium.cc.gcc7 v8-5.2.258/src/crankshaft/lithium.cc ---- v8-5.2.258/src/crankshaft/lithium.cc.gcc7 2016-05-09 10:28:43.000000000 -0400 -+++ v8-5.2.258/src/crankshaft/lithium.cc 2017-02-28 14:42:17.188361709 -0500 -@@ -128,11 +128,6 @@ void LOperand::PrintTo(StringStream* str - - - template --LSubKindOperand* --LSubKindOperand::cache = NULL; -- -- --template - void LSubKindOperand::SetUpCache() { - if (cache) return; - cache = new LSubKindOperand[kNumCachedOperands]; -diff -up v8-5.2.258/src/crankshaft/lithium.h.gcc7 v8-5.2.258/src/crankshaft/lithium.h ---- v8-5.2.258/src/crankshaft/lithium.h.gcc7 2016-05-09 10:28:43.000000000 -0400 -+++ v8-5.2.258/src/crankshaft/lithium.h 2017-02-28 14:42:17.188361709 -0500 -@@ -338,6 +338,9 @@ class LSubKindOperand final : public LOp - explicit LSubKindOperand(int index) : LOperand(kOperandKind, index) { } - }; - -+template -+LSubKindOperand* -+LSubKindOperand::cache = NULL; - - #define LITHIUM_TYPEDEF_SUBKIND_OPERAND_CLASS(name, type, number) \ - typedef LSubKindOperand L##name; -diff -up v8-5.2.258/src/objects-body-descriptors.h.gcc7 v8-5.2.258/src/objects-body-descriptors.h ---- v8-5.2.258/src/objects-body-descriptors.h.gcc7 2016-05-09 10:28:43.000000000 -0400 -+++ v8-5.2.258/src/objects-body-descriptors.h 2017-02-28 14:42:17.189361685 -0500 -@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public - - template - static inline void IterateBody(HeapObject* obj, int object_size) { -- IterateBody(obj); -+ IterateBody(obj); - } - }; - -diff -up v8-5.2.258/src/objects.h.gcc7 v8-5.2.258/src/objects.h ---- v8-5.2.258/src/objects.h.gcc7 2016-05-09 10:28:43.000000000 -0400 -+++ v8-5.2.258/src/objects.h 2017-02-28 14:42:17.190361661 -0500 -@@ -3182,22 +3182,10 @@ class HashTableBase : public FixedArray - template - class HashTable : public HashTableBase { - public: -- // Wrapper methods -- inline uint32_t Hash(Key key) { -- if (Shape::UsesSeed) { -- return Shape::SeededHash(key, GetHeap()->HashSeed()); -- } else { -- return Shape::Hash(key); -- } -- } -- -- inline uint32_t HashForObject(Key key, Object* object) { -- if (Shape::UsesSeed) { -- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -- } else { -- return Shape::HashForObject(key, object); -- } -- } -+ // Wrapper methods. Defined in src/objects-inl.h -+ // to break a cycle with src/heap/heap.h. -+ inline uint32_t Hash(Key key); -+ inline uint32_t HashForObject(Key key, Object* object); - - // Returns a new HashTable object. - MUST_USE_RESULT static Handle New( -diff -up v8-5.2.258/src/objects-inl.h.gcc7 v8-5.2.258/src/objects-inl.h ---- v8-5.2.258/src/objects-inl.h.gcc7 2016-05-09 10:28:43.000000000 -0400 -+++ v8-5.2.258/src/objects-inl.h 2017-02-28 14:42:17.191361638 -0500 -@@ -35,6 +35,25 @@ - namespace v8 { - namespace internal { - -+template -+uint32_t HashTable::Hash(Key key) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHash(key, GetHeap()->HashSeed()); -+ } else { -+ return Shape::Hash(key); -+ } -+} -+ -+template -+uint32_t HashTable::HashForObject(Key key, -+ Object* object) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -+ } else { -+ return Shape::HashForObject(key, object); -+ } -+} -+ - PropertyDetails::PropertyDetails(Smi* smi) { - value_ = smi->value(); - } diff --git a/v8-5.2.258-ppc64.patch b/v8-5.2.258-ppc64.patch deleted file mode 100644 index fcf1777..0000000 --- a/v8-5.2.258-ppc64.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up v8-5.2.258/gypfiles/standalone.gypi.ppcfix v8-5.2.258/gypfiles/standalone.gypi ---- v8-5.2.258/gypfiles/standalone.gypi.ppcfix 2017-03-01 11:15:17.516268618 -0500 -+++ v8-5.2.258/gypfiles/standalone.gypi 2017-03-01 11:16:34.750282604 -0500 -@@ -225,7 +225,7 @@ - }, { - 'v8_enable_gdbjit%': 0, - }], -- ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ -+ ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64" or target_arch=="ppc64") and \ - (v8_target_arch!="x87" and v8_target_arch!="x32")', { - 'clang%': 1, - }, { -@@ -735,7 +735,7 @@ - or v8_target_arch=="mips64el")', { - 'cflags': [ '-Wshorten-64-to-32' ], - }], -- [ 'host_arch=="ppc64" and OS!="aix"', { -+ [ 'host_arch=="ppc64" and OS!="aix" and clang==0', { - 'cflags': [ '-mminimal-toc' ], - }], - [ 'visibility=="hidden" and v8_enable_backtrace==0', { diff --git a/v8-6.2.91-gcc8-gn-fabi11.patch b/v8-6.2.91-gcc8-gn-fabi11.patch deleted file mode 100644 index 3a7ca51..0000000 --- a/v8-6.2.91-gcc8-gn-fabi11.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up v8-6.2.91/tools/gn/bootstrap/bootstrap.py.fabi11 v8-6.2.91/tools/gn/bootstrap/bootstrap.py ---- v8-6.2.91/tools/gn/bootstrap/bootstrap.py.fabi11 2018-02-19 17:11:22.650679128 -0500 -+++ v8-6.2.91/tools/gn/bootstrap/bootstrap.py 2018-02-19 17:11:46.579128407 -0500 -@@ -314,6 +314,11 @@ def write_gn_ninja(path, root_gen_dir, o - cflags = os.environ.get('CFLAGS', '').split() - cflags_cc = os.environ.get('CXXFLAGS', '').split() - ldflags = os.environ.get('LDFLAGS', '').split() -+ -+ # Work around GCC8 bug gcc#84286 -+ cflags.extend(['-fabi-version=11']) -+ cflags_cc.extend(['-fabi-version=11']) -+ - include_dirs = [root_gen_dir, SRC_ROOT] - libs = [] - diff --git a/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch b/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch deleted file mode 100644 index 3c44878..0000000 --- a/v8-6.2.91-i686-g1-to-avoid-mem-exhaust.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up v8-6.2.91/build/config/compiler/BUILD.gn.memexhaust v8-6.2.91/build/config/compiler/BUILD.gn ---- v8-6.2.91/build/config/compiler/BUILD.gn.memexhaust 2017-08-03 17:15:41.355834826 -0400 -+++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-03 17:15:46.587704667 -0400 -@@ -1739,7 +1739,7 @@ config("symbols") { - # TODO(thakis): Remove this again once dump_syms is fixed. - cflags += [ "-gdwarf-3" ] - } -- cflags += [ "-g2" ] -+ cflags += [ "-g1" ] - } - if (use_debug_fission) { - cflags += [ "-gsplit-dwarf" ] diff --git a/v8-6.2.91-nolambda.patch b/v8-6.2.91-nolambda.patch deleted file mode 100644 index 6b7ba48..0000000 --- a/v8-6.2.91-nolambda.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up v8-6.2.91/build/config/compiler/BUILD.gn.nolambda v8-6.2.91/build/config/compiler/BUILD.gn ---- v8-6.2.91/build/config/compiler/BUILD.gn.nolambda 2017-08-01 14:28:53.499913889 -0400 -+++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-01 14:29:03.242607676 -0400 -@@ -1171,7 +1171,7 @@ config("default_warnings") { - "-Wno-address-of-packed-member", - - # TODO(hans): https://crbug.com/681136 -- "-Wno-unused-lambda-capture", -+ # "-Wno-unused-lambda-capture", - - # TODO(thakis ): https://crbug.com/683349 - "-Wno-user-defined-warnings", diff --git a/v8-6.2.91-notcross.patch b/v8-6.2.91-notcross.patch deleted file mode 100644 index 3a0b0be..0000000 --- a/v8-6.2.91-notcross.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff -up v8-6.2.91/build/toolchain/linux/BUILD.gn.notcross v8-6.2.91/build/toolchain/linux/BUILD.gn ---- v8-6.2.91/build/toolchain/linux/BUILD.gn.notcross 2017-08-03 11:29:04.609204048 -0400 -+++ v8-6.2.91/build/toolchain/linux/BUILD.gn 2017-08-03 11:31:14.462146822 -0400 -@@ -6,7 +6,6 @@ import("//build/config/sysroot.gni") - import("//build/toolchain/gcc_toolchain.gni") - - clang_toolchain("clang_arm") { -- toolprefix = "arm-linux-gnueabihf-" - toolchain_args = { - current_cpu = "arm" - current_os = "linux" -@@ -14,7 +13,6 @@ clang_toolchain("clang_arm") { - } - - clang_toolchain("clang_arm64") { -- toolprefix = "aarch64-linux-gnu-" - toolchain_args = { - current_cpu = "arm64" - current_os = "linux" -@@ -22,15 +20,13 @@ clang_toolchain("clang_arm64") { - } - - gcc_toolchain("arm64") { -- toolprefix = "aarch64-linux-gnu-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -+ cc = "gcc" -+ cxx = "g++" - -- ar = "${toolprefix}ar" -+ ar = "ar" - ld = cxx -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - current_cpu = "arm64" -@@ -40,15 +36,13 @@ gcc_toolchain("arm64") { - } - - gcc_toolchain("arm") { -- toolprefix = "arm-linux-gnueabihf-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -+ cc = "gcc" -+ cxx = "g++" - -- ar = "${toolprefix}ar" -+ ar = "ar" - ld = cxx -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - current_cpu = "arm" -@@ -178,12 +172,12 @@ clang_toolchain("clang_mips64el") { - } - - gcc_toolchain("mipsel") { -- cc = "mipsel-linux-gnu-gcc" -- cxx = "mipsel-linux-gnu-g++" -- ar = "mipsel-linux-gnu-ar" -+ cc = "gcc" -+ cxx = "g++" -+ ar = "ar" - ld = cxx -- readelf = "mipsel-linux-gnu-readelf" -- nm = "mipsel-linux-gnu-nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - cc_wrapper = "" diff --git a/v8-6.2.91-nounused-function.patch b/v8-6.2.91-nounused-function.patch deleted file mode 100644 index a70ed05..0000000 --- a/v8-6.2.91-nounused-function.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up v8-6.2.91/build/config/compiler/BUILD.gn.nounused v8-6.2.91/build/config/compiler/BUILD.gn ---- v8-6.2.91/build/config/compiler/BUILD.gn.nounused 2017-08-04 10:35:44.212100721 -0400 -+++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-04 10:36:25.554097933 -0400 -@@ -1740,6 +1740,7 @@ config("symbols") { - cflags += [ "-gdwarf-3" ] - } - cflags += [ "-g2" ] -+ cflags += [ "-Wno-unused-function" , "-Wno-unused-result" ] - } - if (use_debug_fission) { - cflags += [ "-gsplit-dwarf" ] diff --git a/v8-6.2.91-noxlocale.patch b/v8-6.2.91-noxlocale.patch deleted file mode 100644 index 92ee20f..0000000 --- a/v8-6.2.91-noxlocale.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale.noxlocale v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale ---- v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale.noxlocale 2017-08-02 16:00:24.793773137 -0400 -+++ v8-6.2.91/buildtools/third_party/libc++/trunk/include/__locale 2017-08-02 16:00:55.161082370 -0400 -@@ -34,7 +34,7 @@ - # include - #elif defined(_NEWLIB_VERSION) - # include --#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ -+#elif (defined(__APPLE__) || defined(__FreeBSD__) \ - || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) - # include - #elif defined(__Fuchsia__) diff --git a/v8-6.2.91-oldclang-flags.patch b/v8-6.2.91-oldclang-flags.patch deleted file mode 100644 index ed61d57..0000000 --- a/v8-6.2.91-oldclang-flags.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up v8-6.2.91/build/config/compiler/BUILD.gn.oldclang v8-6.2.91/build/config/compiler/BUILD.gn ---- v8-6.2.91/build/config/compiler/BUILD.gn.oldclang 2017-08-31 21:05:13.342875120 -0400 -+++ v8-6.2.91/build/config/compiler/BUILD.gn 2017-08-31 21:05:40.092124090 -0400 -@@ -1168,13 +1168,13 @@ config("default_warnings") { - "-Wno-nonportable-include-path", - - # TODO(hans): https://crbug.com/637306 -- "-Wno-address-of-packed-member", -+ # "-Wno-address-of-packed-member", - - # TODO(hans): https://crbug.com/681136 - # "-Wno-unused-lambda-capture", - - # TODO(thakis ): https://crbug.com/683349 -- "-Wno-user-defined-warnings", -+ # "-Wno-user-defined-warnings", - ] - } else if (use_xcode_clang && xcode_version_int >= 830) { - # This is necessary to allow a progressive transition from using xcode 8.0 diff --git a/v8-6.2.91-ppc64.patch b/v8-6.2.91-ppc64.patch deleted file mode 100644 index d247fef..0000000 --- a/v8-6.2.91-ppc64.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up v8-6.2.91/gypfiles/standalone.gypi.ppc64 v8-6.2.91/gypfiles/standalone.gypi ---- v8-6.2.91/gypfiles/standalone.gypi.ppc64 2017-07-31 11:24:31.000000000 -0400 -+++ v8-6.2.91/gypfiles/standalone.gypi 2017-07-31 11:50:42.467600076 -0400 -@@ -268,7 +268,7 @@ - }, { - 'v8_enable_gdbjit%': 0, - }], -- ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ -+ ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64" or target_arch=="ppc64") and \ - v8_target_arch!="x32"', { - 'clang%': 1, - }, { -@@ -788,7 +788,7 @@ - or v8_target_arch=="mips64el")', { - 'cflags': [ '-Wshorten-64-to-32' ], - }], -- [ 'host_arch=="ppc64" and OS!="aix"', { -+ [ 'host_arch=="ppc64" and OS!="aix" and clang==0', { - 'cflags': [ '-mminimal-toc' ], - }], - [ 'visibility=="hidden" and v8_enable_backtrace==0', { diff --git a/v8-6.2.91-sover.patch b/v8-6.2.91-sover.patch deleted file mode 100644 index 1bef787..0000000 --- a/v8-6.2.91-sover.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up v8-6.2.91/BUILD.gn.sover v8-6.2.91/BUILD.gn ---- v8-6.2.91/BUILD.gn.sover 2017-07-31 11:24:31.000000000 -0400 -+++ v8-6.2.91/BUILD.gn 2017-08-02 12:10:57.825931436 -0400 -@@ -2422,6 +2422,7 @@ v8_component("v8_libbase") { - - if (is_component_build) { - defines = [ "BUILDING_V8_BASE_SHARED" ] -+ output_extension = "so.6" - } - - if (is_posix) { -@@ -2532,6 +2533,7 @@ v8_component("v8_libplatform") { - - if (is_component_build) { - defines = [ "BUILDING_V8_PLATFORM_SHARED" ] -+ output_extension = "so.6" - } - - public_configs = [ ":libplatform_config" ] -@@ -2682,6 +2684,8 @@ if (is_component_build) { - "src/v8dll-main.cc", - ] - -+ output_extension = "so.6" -+ - public_deps = [ - ":v8_base", - ":v8_maybe_snapshot", diff --git a/v8-6.7.17-fix-gcc-unwind-header.patch b/v8-6.7.17-fix-gcc-unwind-header.patch deleted file mode 100644 index 6bd2a0c..0000000 --- a/v8-6.7.17-fix-gcc-unwind-header.patch +++ /dev/null @@ -1,236 +0,0 @@ -diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp ---- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp 2018-03-06 14:20:54.000000000 -0500 -+++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_default_handlers.cpp 2018-05-07 11:01:44.464845299 -0400 -@@ -36,13 +36,10 @@ - { - _Unwind_Exception* unwind_exception = - reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; -- bool native_exception = -- (unwind_exception->exception_class & get_vendor_and_language) == -- (kOurExceptionClass & get_vendor_and_language); -- if (native_exception) -+ if (__isOurExceptionClass(unwind_exception)) - { - void* thrown_object = -- unwind_exception->exception_class == kOurDependentExceptionClass ? -+ __getExceptionClass(unwind_exception) == kOurDependentExceptionClass ? - ((__cxa_dependent_exception*)exception_header)->primaryException : - exception_header + 1; - const __shim_type_info* thrown_type = -diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp ---- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp 2018-03-06 14:20:54.000000000 -0500 -+++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.cpp 2018-05-07 11:01:44.472845276 -0400 -@@ -78,22 +78,37 @@ - alignof(__cxa_exception)); - } - --static void setExceptionClass(_Unwind_Exception* unwind_exception) { -- unwind_exception->exception_class = kOurExceptionClass; -+void __setExceptionClass(_Unwind_Exception* unwind_exception, uint64_t newValue) { -+ ::memcpy(&unwind_exception->exception_class, &newValue, sizeof(newValue)); -+ } -+ -+ -+static void setOurExceptionClass(_Unwind_Exception* unwind_exception) { -+ __setExceptionClass(unwind_exception, kOurExceptionClass); - } - - static void setDependentExceptionClass(_Unwind_Exception* unwind_exception) { -- unwind_exception->exception_class = kOurDependentExceptionClass; -+ __setExceptionClass(unwind_exception, kOurDependentExceptionClass); - } - - // Is it one of ours? --static bool isOurExceptionClass(const _Unwind_Exception* unwind_exception) { -- return (unwind_exception->exception_class & get_vendor_and_language) == -- (kOurExceptionClass & get_vendor_and_language); -+uint64_t __getExceptionClass(const _Unwind_Exception* unwind_exception) { -+// On x86 and some ARM unwinders, unwind_exception->exception_class is -+// a uint64_t. On other ARM unwinders, it is a char[8] -+// See: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf -+// So we just copy it into a uint64_t to be sure. -+ uint64_t exClass; -+ ::memcpy(&exClass, &unwind_exception->exception_class, sizeof(exClass)); -+ return exClass; -+} -+ -+bool __isOurExceptionClass(const _Unwind_Exception* unwind_exception) { -+ return (__getExceptionClass(unwind_exception) & get_vendor_and_language) == -+ (kOurExceptionClass & get_vendor_and_language); - } - - static bool isDependentException(_Unwind_Exception* unwind_exception) { -- return (unwind_exception->exception_class & 0xFF) == 0x01; -+ return (__getExceptionClass(unwind_exception) & 0xFF) == 0x01; - } - - // This does not need to be atomic -@@ -248,7 +263,7 @@ - exception_header->terminateHandler = std::get_terminate(); - exception_header->exceptionType = tinfo; - exception_header->exceptionDestructor = dest; -- setExceptionClass(&exception_header->unwindHeader); -+ setOurExceptionClass(&exception_header->unwindHeader); - exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety. - globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local - -@@ -299,7 +314,7 @@ - __cxa_exception* exception_header = - cxa_exception_from_exception_unwind_exception(unwind_exception); - -- if (isOurExceptionClass(unwind_exception)) -+ if (__isOurExceptionClass(unwind_exception)) - { - if (0 == exception_header->propagationCount) - { -@@ -342,7 +357,7 @@ - std::terminate(); - } - -- if (isOurExceptionClass(&exception_header->unwindHeader)) -+ if (__isOurExceptionClass(&exception_header->unwindHeader)) - { - --exception_header->propagationCount; - if (0 == exception_header->propagationCount) -@@ -407,7 +422,7 @@ - __cxa_begin_catch(void* unwind_arg) throw() - { - _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg); -- bool native_exception = isOurExceptionClass(unwind_exception); -+ bool native_exception = __isOurExceptionClass(unwind_exception); - __cxa_eh_globals* globals = __cxa_get_globals(); - // exception_header is a hackish offset from a foreign exception, but it - // works as long as we're careful not to try to access any __cxa_exception -@@ -484,7 +499,7 @@ - // nothing more to be done. Do nothing! - if (NULL != exception_header) - { -- bool native_exception = isOurExceptionClass(&exception_header->unwindHeader); -+ bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader); - if (native_exception) - { - // This is a native exception -@@ -549,7 +564,7 @@ - __cxa_exception *exception_header = globals->caughtExceptions; - if (NULL == exception_header) - return NULL; // No current exception -- if (!isOurExceptionClass(&exception_header->unwindHeader)) -+ if (!__isOurExceptionClass(&exception_header->unwindHeader)) - return NULL; - return exception_header->exceptionType; - } -@@ -571,7 +586,7 @@ - __cxa_exception* exception_header = globals->caughtExceptions; - if (NULL == exception_header) - std::terminate(); // throw; called outside of a exception handler -- bool native_exception = isOurExceptionClass(&exception_header->unwindHeader); -+ bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader); - if (native_exception) - { - // Mark the exception as being rethrown (reverse the effects of __cxa_begin_catch) -@@ -660,7 +675,7 @@ - __cxa_exception* exception_header = globals->caughtExceptions; - if (NULL == exception_header) - return NULL; // No current exception -- if (!isOurExceptionClass(&exception_header->unwindHeader)) -+ if (!__isOurExceptionClass(&exception_header->unwindHeader)) - return NULL; // Can't capture a foreign exception (no way to refcount it) - if (isDependentException(&exception_header->unwindHeader)) { - __cxa_dependent_exception* dep_exception_header = -diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp ---- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp 2018-03-06 14:20:54.000000000 -0500 -+++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_exception.hpp 2018-05-07 13:09:05.371652989 -0400 -@@ -24,6 +24,17 @@ - static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1 - static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++ - -+uint64_t __getExceptionClass (const _Unwind_Exception*); -+void __setExceptionClass ( _Unwind_Exception*, uint64_t); -+bool __isOurExceptionClass(const _Unwind_Exception*); -+ -+#if defined(__arm__) && defined(__GNUC__) -+// missing values from _Unwind_Reason_Code enum -+#define _URC_FATAL_PHASE2_ERROR ((_Unwind_Reason_Code)2) -+#define _URC_FATAL_PHASE1_ERROR ((_Unwind_Reason_Code)3) -+#define _URC_NORMAL_STOP ((_Unwind_Reason_Code)4) -+#endif -+ - struct _LIBCXXABI_HIDDEN __cxa_exception { - #if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI) - // This is a new field to support C++ 0x exception_ptr. -diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp ---- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp 2018-03-06 14:20:54.000000000 -0500 -+++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_handlers.cpp 2018-05-07 11:01:44.474845270 -0400 -@@ -89,10 +89,7 @@ - { - _Unwind_Exception* unwind_exception = - reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; -- bool native_exception = -- (unwind_exception->exception_class & get_vendor_and_language) == -- (kOurExceptionClass & get_vendor_and_language); -- if (native_exception) -+ if (__isOurExceptionClass(unwind_exception)) - __terminate(exception_header->terminateHandler); - } - } -diff -Nru v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp ---- v8-6.7.17.orig/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp 2018-03-06 14:20:54.000000000 -0500 -+++ v8-6.7.17/buildtools/third_party/libc++abi/trunk/src/cxa_personality.cpp 2018-05-07 15:08:40.666231128 -0400 -@@ -492,7 +492,7 @@ - // Even for foreign exceptions, the exception object is *probably* at unwind_exception + 1 - // Regardless, this library is prohibited from touching a foreign exception - void* adjustedPtr = unwind_exception + 1; -- if (unwind_exception->exception_class == kOurDependentExceptionClass) -+ if (__getExceptionClass(unwind_exception) == kOurDependentExceptionClass) - adjustedPtr = ((__cxa_dependent_exception*)adjustedPtr - 1)->primaryException; - return adjustedPtr; - } -@@ -1073,8 +1073,7 @@ - if (unwind_exception == 0 || context == 0) - return _URC_FATAL_PHASE1_ERROR; - -- bool native_exception = (unwind_exception->exception_class & get_vendor_and_language) == -- (kOurExceptionClass & get_vendor_and_language); -+ bool native_exception = __isOurExceptionClass(unwind_exception); - - #if !defined(LIBCXXABI_USE_LLVM_UNWINDER) - // Copy the address of _Unwind_Control_Block to r12 so that -@@ -1085,7 +1084,7 @@ - - // Check the undocumented force unwinding behavior - bool is_force_unwinding = state & _US_FORCE_UNWIND; -- state &= ~_US_FORCE_UNWIND; -+ state = (_Unwind_State)(state & ~_US_FORCE_UNWIND); - - scan_results results; - switch (state) { -@@ -1178,9 +1177,7 @@ - if (unwind_exception == 0) - call_terminate(false, unwind_exception); - __cxa_begin_catch(unwind_exception); -- bool native_old_exception = -- (unwind_exception->exception_class & get_vendor_and_language) == -- (kOurExceptionClass & get_vendor_and_language); -+ bool native_old_exception = __isOurExceptionClass(unwind_exception); - std::unexpected_handler u_handler; - std::terminate_handler t_handler; - __cxa_exception* old_exception_header = 0; -@@ -1242,16 +1239,14 @@ - if (new_exception_header == 0) - // This shouldn't be able to happen! - std::__terminate(t_handler); -- bool native_new_exception = -- (new_exception_header->unwindHeader.exception_class & get_vendor_and_language) == -- (kOurExceptionClass & get_vendor_and_language); -+ bool native_new_exception = __isOurExceptionClass(&new_exception_header->unwindHeader); - void* adjustedPtr; - if (native_new_exception && (new_exception_header != old_exception_header)) - { - const __shim_type_info* excpType = - static_cast(new_exception_header->exceptionType); - adjustedPtr = -- new_exception_header->unwindHeader.exception_class == kOurDependentExceptionClass ? -+ __getExceptionClass(&new_exception_header->unwindHeader) == kOurDependentExceptionClass ? - ((__cxa_dependent_exception*)new_exception_header)->primaryException : - new_exception_header + 1; - if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding, diff --git a/v8-6.7.17-fixme.patch b/v8-6.7.17-fixme.patch deleted file mode 100644 index 0a0d835..0000000 --- a/v8-6.7.17-fixme.patch +++ /dev/null @@ -1,335 +0,0 @@ -diff -up v8-6.7.17/build/config/compiler/BUILD.gn.fixme v8-6.7.17/build/config/compiler/BUILD.gn ---- v8-6.7.17/build/config/compiler/BUILD.gn.fixme 2018-03-14 11:47:13.723221338 -0400 -+++ v8-6.7.17/build/config/compiler/BUILD.gn 2018-03-14 11:47:13.712221590 -0400 -@@ -185,7 +185,7 @@ config("compiler") { - ldflags = [] - defines = [] - configs = [] -- inputs = [] -+ # inputs = [] - - # System-specific flags. If your compiler flags apply to one of the - # categories here, add it to the associated file to keep this shared config -@@ -1278,6 +1278,9 @@ config("default_warnings") { - # [1] https://gcc.gnu.org/gcc-6/porting_to.html#this-cannot-be-null - # [2] https://crbug.com/784492#c13 - cflags += [ "-fno-delete-null-pointer-checks" ] -+ -+ # workaround tests -+ cflags += [ "-Wno-error=subobject-linkage" ] - } - } - -diff -up v8-6.7.17/src/base/file-utils.cc.fixme v8-6.7.17/src/base/file-utils.cc ---- v8-6.7.17/src/base/file-utils.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/base/file-utils.cc 2018-03-14 11:47:12.586247445 -0400 -@@ -25,7 +25,7 @@ char* RelativePath(char** buffer, const - reinterpret_cast(calloc(path_separator + name_length + 2, 1)); - *buffer[0] = '\0'; - strncat(*buffer, exec_path, path_separator + 1); -- strncat(*buffer, name, name_length); -+ strncat(*buffer, name, name_length + 1); - } else { - *buffer = strdup(name); - } -diff -up v8-6.7.17/src/base/macros.h.fixme v8-6.7.17/src/base/macros.h ---- v8-6.7.17/src/base/macros.h.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/base/macros.h 2018-03-14 11:47:12.587247422 -0400 -@@ -102,7 +102,7 @@ V8_INLINE Dest bit_cast(Source const& so - static_assert(sizeof(Dest) == sizeof(Source), - "source and dest must be same size"); - Dest dest; -- memcpy(&dest, &source, sizeof(dest)); -+ memcpy(static_cast(&dest), &source, sizeof(dest)); - return dest; - } - -@@ -387,10 +387,10 @@ bool is_inbounds(float_t v) { - static_cast(std::numeric_limits::min()) - 1; - constexpr float_t kUpperBound = - static_cast(std::numeric_limits::max()) + 1; -- constexpr bool kLowerBoundIsMin = -+ constexpr bool kLowerBoundIsMin __attribute__((unused)) = - static_cast(kLowerBound) == - static_cast(std::numeric_limits::min()); -- constexpr bool kUpperBoundIsMax = -+ constexpr bool kUpperBoundIsMax __attribute__((unused)) = - static_cast(kUpperBound) == - static_cast(std::numeric_limits::max()); - return (kLowerBoundIsMin ? (kLowerBound <= v) : (kLowerBound < v)) && -diff -up v8-6.7.17/src/compiler/node-cache.cc.fixme v8-6.7.17/src/compiler/node-cache.cc ---- v8-6.7.17/src/compiler/node-cache.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/compiler/node-cache.cc 2018-03-14 11:47:12.587247422 -0400 -@@ -38,7 +38,7 @@ bool NodeCache::Resize( - size_ *= 4; - size_t num_entries = size_ + kLinearProbe; - entries_ = zone->NewArray(num_entries); -- memset(entries_, 0, sizeof(Entry) * num_entries); -+ memset(static_cast(entries_), 0, sizeof(Entry) * num_entries); - - // Insert the old entries into the new block. - for (size_t i = 0; i < old_size; ++i) { -@@ -69,7 +69,7 @@ Node** NodeCache::Find( - size_t num_entries = kInitialSize + kLinearProbe; - entries_ = zone->NewArray(num_entries); - size_ = kInitialSize; -- memset(entries_, 0, sizeof(Entry) * num_entries); -+ memset(static_cast(entries_), 0, sizeof(Entry) * num_entries); - Entry* entry = &entries_[hash & (kInitialSize - 1)]; - entry->key_ = key; - return &entry->value_; -diff -up v8-6.7.17/src/compiler/simd-scalar-lowering.cc.fixme v8-6.7.17/src/compiler/simd-scalar-lowering.cc ---- v8-6.7.17/src/compiler/simd-scalar-lowering.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/compiler/simd-scalar-lowering.cc 2018-03-14 11:47:12.587247422 -0400 -@@ -38,7 +38,7 @@ SimdScalarLowering::SimdScalarLowering( - DCHECK_NOT_NULL(graph()); - DCHECK_NOT_NULL(graph()->end()); - replacements_ = zone()->NewArray(graph()->NodeCount()); -- memset(replacements_, 0, sizeof(Replacement) * graph()->NodeCount()); -+ memset(static_cast(replacements_), 0, sizeof(Replacement) * graph()->NodeCount()); - } - - void SimdScalarLowering::LowerGraph() { -diff -up v8-6.7.17/src/d8.cc.fixme v8-6.7.17/src/d8.cc ---- v8-6.7.17/src/d8.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/d8.cc 2018-03-14 11:47:12.588247399 -0400 -@@ -2691,7 +2691,10 @@ void Worker::ExecuteInThread() { - if (Shell::DeserializeValue(isolate, std::move(data)) - .ToLocal(&value)) { - Local argv[] = {value}; -- (void)onmessage_fun->Call(context, global, 1, argv); -+ MaybeLocal result = onmessage_fun->Call(context, global, 1, argv); -+ if (result.IsEmpty()) { -+ Shell::ReportException(isolate, &try_catch); -+ } - } - if (try_catch.HasCaught()) { - Shell::ReportException(isolate, &try_catch); -diff -up v8-6.7.17/src/flags.cc.fixme v8-6.7.17/src/flags.cc ---- v8-6.7.17/src/flags.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/flags.cc 2018-03-14 11:47:12.588247399 -0400 -@@ -557,6 +557,7 @@ static char* SkipBlackSpace(char* p) { - // static - int FlagList::SetFlagsFromString(const char* str, int len) { - // make a 0-terminated copy of str -+ assert(len > 0); - ScopedVector copy0(len + 1); - MemCopy(copy0.start(), str, len); - copy0[len] = '\0'; -diff -up v8-6.7.17/src/frames.h.fixme v8-6.7.17/src/frames.h ---- v8-6.7.17/src/frames.h.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/frames.h 2018-03-14 11:47:12.589247376 -0400 -@@ -44,7 +44,7 @@ class InnerPointerToCodeCache { - } - - void Flush() { -- memset(&cache_[0], 0, sizeof(cache_)); -+ memset(static_cast(&cache_[0]), 0, sizeof(cache_)); - } - - InnerPointerToCodeCacheEntry* GetCacheEntry(Address inner_pointer); -diff -up v8-6.7.17/src/libplatform/tracing/trace-object.cc.fixme v8-6.7.17/src/libplatform/tracing/trace-object.cc ---- v8-6.7.17/src/libplatform/tracing/trace-object.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/libplatform/tracing/trace-object.cc 2018-03-14 11:47:12.589247376 -0400 -@@ -25,7 +25,7 @@ V8_INLINE static void CopyTraceObjectPar - const char** member) { - if (*member) { - size_t length = strlen(*member) + 1; -- strncpy(*buffer, *member, length); -+ memcpy(*buffer, *member, length); - *member = *buffer; - *buffer += length; - } -diff -up v8-6.7.17/src/log.cc.fixme v8-6.7.17/src/log.cc ---- v8-6.7.17/src/log.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/log.cc 2018-03-14 11:47:12.590247353 -0400 -@@ -531,7 +531,7 @@ void JitLogger::LogRecordedBuffer(Abstra - SharedFunctionInfo* shared, const char* name, - int length) { - JitCodeEvent event; -- memset(&event, 0, sizeof(event)); -+ memset(static_cast(&event), 0, sizeof(event)); - event.type = JitCodeEvent::CODE_ADDED; - event.code_start = code->instruction_start(); - event.code_len = code->instruction_size(); -@@ -548,7 +548,7 @@ void JitLogger::LogRecordedBuffer(Abstra - void JitLogger::LogRecordedBuffer(const InstructionStream* stream, - const char* name, int length) { - JitCodeEvent event; -- memset(&event, 0, sizeof(event)); -+ memset(static_cast(&event), 0, sizeof(event)); - event.type = JitCodeEvent::CODE_ADDED; - event.code_start = stream->bytes(); - event.code_len = stream->byte_length(); -@@ -562,7 +562,7 @@ void JitLogger::LogRecordedBuffer(const - void JitLogger::LogRecordedBuffer(wasm::WasmCode* code, const char* name, - int length) { - JitCodeEvent event; -- memset(&event, 0, sizeof(event)); -+ memset(static_cast(&event), 0, sizeof(event)); - event.type = JitCodeEvent::CODE_ADDED; - event.code_start = code->instructions().start(); - event.code_len = code->instructions().length(); -@@ -594,7 +594,7 @@ void JitLogger::AddCodeLinePosInfoEvent( - int position, - JitCodeEvent::PositionType position_type) { - JitCodeEvent event; -- memset(&event, 0, sizeof(event)); -+ memset(static_cast(&event), 0, sizeof(event)); - event.type = JitCodeEvent::CODE_ADD_LINE_POS_INFO; - event.user_data = jit_handler_data; - event.line_info.offset = pc_offset; -@@ -607,7 +607,7 @@ void JitLogger::AddCodeLinePosInfoEvent( - - void* JitLogger::StartCodePosInfoEvent() { - JitCodeEvent event; -- memset(&event, 0, sizeof(event)); -+ memset(static_cast(&event), 0, sizeof(event)); - event.type = JitCodeEvent::CODE_START_LINE_INFO_RECORDING; - - code_event_handler_(&event); -@@ -617,7 +617,7 @@ void* JitLogger::StartCodePosInfoEvent() - void JitLogger::EndCodePosInfoEvent(Address start_address, - void* jit_handler_data) { - JitCodeEvent event; -- memset(&event, 0, sizeof(event)); -+ memset(static_cast(&event), 0, sizeof(event)); - event.type = JitCodeEvent::CODE_END_LINE_INFO_RECORDING; - event.code_start = start_address; - event.user_data = jit_handler_data; -diff -up v8-6.7.17/src/parsing/parser-base.h.fixme v8-6.7.17/src/parsing/parser-base.h ---- v8-6.7.17/src/parsing/parser-base.h.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/parsing/parser-base.h 2018-03-14 11:47:12.591247330 -0400 -@@ -2163,7 +2163,8 @@ template - typename ParserBase::ExpressionT ParserBase::ParsePropertyName( - IdentifierT* name, PropertyKind* kind, bool* is_generator, bool* is_get, - bool* is_set, bool* is_async, bool* is_computed_name, bool* ok) { -- DCHECK_EQ(*kind, PropertyKind::kNotSet); -+ PropertyKind kindns = PropertyKind::kNotSet; -+ DCHECK_EQ(*kind, kindns); - DCHECK(!*is_generator); - DCHECK(!*is_get); - DCHECK(!*is_set); -diff -up v8-6.7.17/src/wasm/wasm-module-builder.h.fixme v8-6.7.17/src/wasm/wasm-module-builder.h -diff -up v8-6.7.17/src/zone/zone-segment.cc.fixme v8-6.7.17/src/zone/zone-segment.cc ---- v8-6.7.17/src/zone/zone-segment.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/src/zone/zone-segment.cc 2018-03-14 11:47:12.591247330 -0400 -@@ -15,7 +15,7 @@ void Segment::ZapContents() { - - void Segment::ZapHeader() { - #ifdef DEBUG -- memset(this, kZapDeadByte, sizeof(Segment)); -+ memset(static_cast(this), kZapDeadByte, sizeof(Segment)); - #endif - } - -diff -up v8-6.7.17/test/cctest/compiler/graph-builder-tester.h.fixme v8-6.7.17/test/cctest/compiler/graph-builder-tester.h ---- v8-6.7.17/test/cctest/compiler/graph-builder-tester.h.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/test/cctest/compiler/graph-builder-tester.h 2018-03-14 11:47:12.591247330 -0400 -@@ -164,9 +164,6 @@ class GraphBuilderTester : public Handle - Node* ChangeUint32ToTagged(Node* a) { - return NewNode(simplified()->ChangeUint32ToTagged(), a); - } -- Node* ChangeFloat64ToTagged(Node* a) { -- return NewNode(simplified()->ChangeFloat64ToTagged(), a); -- } - Node* ChangeTaggedToBit(Node* a) { - return NewNode(simplified()->ChangeTaggedToBit(), a); - } -diff -up v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc.fixme v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc ---- v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/test/cctest/interpreter/bytecode-expectations-printer.cc 2018-03-14 11:47:12.591247330 -0400 -@@ -81,7 +81,8 @@ v8::Local BytecodeExpectatio - } - - void BytecodeExpectationsPrinter::Run(v8::Local script) const { -- (void)script->Run(isolate_->GetCurrentContext()); -+ Local result = script->Run(isolate_->GetCurrentContext()).ToLocalChecked(); -+ CHECK(!result.IsEmpty()); - } - - i::Handle -diff -up v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc.fixme v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc ---- v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc.fixme 2018-03-06 13:58:16.000000000 -0500 -+++ v8-6.7.17/test/cctest/parsing/test-scanner-streams.cc 2018-03-14 11:47:12.592247307 -0400 -@@ -194,7 +194,7 @@ TEST(Utf8ChunkBoundaries) { - for (size_t i = 1; i < len; i++) { - // Copy source string into buffer, splitting it at i. - // Then add three chunks, 0..i-1, i..strlen-1, empty. -- strncpy(buffer, unicode_utf8, i); -+ memcpy(buffer, unicode_utf8, i); - strncpy(buffer + i + 1, unicode_utf8 + i, len - i); - buffer[i] = '\0'; - buffer[len + 1] = '\0'; -@@ -220,8 +220,8 @@ TEST(Utf8SingleByteChunks) { - char buffer[arraysize(unicode_utf8) + 4]; - for (size_t i = 1; i < len - 1; i++) { - // Copy source string into buffer, make a single-byte chunk at i. -- strncpy(buffer, unicode_utf8, i); -- strncpy(buffer + i + 3, unicode_utf8 + i + 1, len - i - 1); -+ memcpy(buffer, unicode_utf8, i); -+ memcpy(buffer + i + 3, unicode_utf8 + i + 1, len - i - 1); - buffer[i] = '\0'; - buffer[i + 1] = unicode_utf8[i]; - buffer[i + 2] = '\0'; -diff -up v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h.fixme v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h ---- v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h.fixme 2018-03-14 12:49:02.620027123 -0400 -+++ v8-6.7.17/testing/gtest/include/gtest/internal/gtest-param-util.h 2018-03-14 12:51:50.095577470 -0400 -@@ -34,6 +34,8 @@ - #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ - #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ - -+#pragma GCC diagnostic warning "-Wsubobject-linkage" -+ - #include - - #include -diff -up v8-6.7.17/test/unittests/base/functional-unittest.cc.fixme v8-6.7.17/test/unittests/base/functional-unittest.cc ---- v8-6.7.17/test/unittests/base/functional-unittest.cc.fixme 2018-03-06 13:58:17.000000000 -0500 -+++ v8-6.7.17/test/unittests/base/functional-unittest.cc 2018-03-14 11:47:12.592247307 -0400 -@@ -74,7 +74,9 @@ TYPED_TEST(FunctionalTest, EqualToImplie - this->rng()->NextBytes(values, sizeof(values)); - TRACED_FOREACH(TypeParam, v1, values) { - TRACED_FOREACH(TypeParam, v2, values) { -- if (e(v1, v2)) EXPECT_EQ(h(v1), h(v2)); -+ if (e(v1, v2)) { -+ EXPECT_EQ(h(v1), h(v2)); -+ } - } - } - } -@@ -143,7 +145,9 @@ TYPED_TEST(FunctionalTest, BitEqualToImp - this->rng()->NextBytes(&values, sizeof(values)); - TRACED_FOREACH(TypeParam, v1, values) { - TRACED_FOREACH(TypeParam, v2, values) { -- if (e(v1, v2)) EXPECT_EQ(h(v1), h(v2)); -+ if (e(v1, v2)) { -+ EXPECT_EQ(h(v1), h(v2)); -+ } - } - } - } -diff -up v8-6.7.17/test/unittests/detachable-vector-unittest.cc.fixme v8-6.7.17/test/unittests/detachable-vector-unittest.cc ---- v8-6.7.17/test/unittests/detachable-vector-unittest.cc.fixme 2018-03-06 13:58:17.000000000 -0500 -+++ v8-6.7.17/test/unittests/detachable-vector-unittest.cc 2018-03-14 11:47:12.592247307 -0400 -@@ -52,7 +52,7 @@ TEST(DetachableVector, DetachLeaksBackin - // Force allocation of the backing store. - v.push_back(1); - // Bit-copy the data structure. -- memcpy(&v2, &v, sizeof(DetachableVector)); -+ memcpy(static_cast(&v2), &v, sizeof(DetachableVector)); - // The backing store should be leaked here - free was not called. - v.detach(); - -diff -up v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc.fixme v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc ---- v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc.fixme 2018-03-14 12:44:18.816950209 -0400 -+++ v8-6.7.17/test/unittests/wasm/wasm-module-builder-unittest.cc 2018-03-14 12:44:26.911778869 -0400 -@@ -28,7 +28,7 @@ TEST_F(WasmModuleBuilderTest, Regression - // Test crashed with asan. - ZoneBuffer buffer(zone()); - const size_t kSize = ZoneBuffer::kInitialSize * 3 + 4096 + 100; -- byte data[kSize]; -+ byte data[kSize] = {}; - buffer.write(data, kSize); - } - diff --git a/v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch b/v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch deleted file mode 100644 index 760d3bb..0000000 --- a/v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up v8-6.7.17/build/config/compiler/BUILD.gn.memexhaust v8-6.7.17/build/config/compiler/BUILD.gn ---- v8-6.7.17/build/config/compiler/BUILD.gn.memexhaust 2018-03-15 10:19:59.313283572 -0400 -+++ v8-6.7.17/build/config/compiler/BUILD.gn 2018-03-15 10:20:09.750008452 -0400 -@@ -2010,7 +2010,7 @@ config("symbols") { - # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f - cflags += [ "-gdwarf-3" ] - } -- cflags += [ "-g2" ] -+ cflags += [ "-g1" ] - } - if (use_debug_fission && !is_nacl) { - cflags += [ "-gsplit-dwarf" ] diff --git a/v8-6.7.17-notcross.patch b/v8-6.7.17-notcross.patch deleted file mode 100644 index 9f10625..0000000 --- a/v8-6.7.17-notcross.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff -up v8-6.7.17/build/toolchain/linux/BUILD.gn.notcross v8-6.7.17/build/toolchain/linux/BUILD.gn ---- v8-6.7.17/build/toolchain/linux/BUILD.gn.notcross 2018-03-06 14:20:53.000000000 -0500 -+++ v8-6.7.17/build/toolchain/linux/BUILD.gn 2018-03-06 14:37:22.505146107 -0500 -@@ -6,7 +6,6 @@ import("//build/config/sysroot.gni") - import("//build/toolchain/gcc_toolchain.gni") - - clang_toolchain("clang_arm") { -- toolprefix = "arm-linux-gnueabihf-" - toolchain_args = { - current_cpu = "arm" - current_os = "linux" -@@ -14,7 +13,6 @@ clang_toolchain("clang_arm") { - } - - clang_toolchain("clang_arm64") { -- toolprefix = "aarch64-linux-gnu-" - toolchain_args = { - current_cpu = "arm64" - current_os = "linux" -@@ -22,15 +20,13 @@ clang_toolchain("clang_arm64") { - } - - gcc_toolchain("arm64") { -- toolprefix = "aarch64-linux-gnu-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -+ cc = "gcc" -+ cxx = "g++" - -- ar = "${toolprefix}ar" -+ ar = "ar" - ld = cxx -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - current_cpu = "arm64" -@@ -40,15 +36,13 @@ gcc_toolchain("arm64") { - } - - gcc_toolchain("arm") { -- toolprefix = "arm-linux-gnueabihf-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -+ cc = "gcc" -+ cxx = "g++" - -- ar = "${toolprefix}ar" -+ ar = "ar" - ld = cxx -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - current_cpu = "arm" -@@ -178,14 +172,12 @@ clang_toolchain("clang_mips64el") { - } - - gcc_toolchain("mipsel") { -- toolprefix = "mipsel-linux-gnu-" -- -- cc = "${toolprefix}gcc" -- cxx = " ${toolprefix}g++" -- ar = "${toolprefix}ar" -+ cc = "gcc" -+ cxx = "g++" -+ ar = "ar" - ld = cxx -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - cc_wrapper = "" -@@ -197,14 +189,12 @@ gcc_toolchain("mipsel") { - } - - gcc_toolchain("mips64el") { -- toolprefix = "mips64el-linux-gnuabi64-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -- ar = "${toolprefix}ar" -+ cc = "gcc" -+ cxx = "g++" -+ ar = "ar" - ld = cxx -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -+ readelf = "readelf" -+ nm = "nm" - - toolchain_args = { - cc_wrapper = "" -@@ -248,14 +238,12 @@ gcc_toolchain("ppc64") { - } - - gcc_toolchain("mips") { -- toolprefix = "mips-linux-gnu-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -+ cc = "gcc" -+ cxx = "g++" - -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -- ar = "${toolprefix}ar" -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" - ld = cxx - - toolchain_args = { -@@ -266,14 +254,12 @@ gcc_toolchain("mips") { - } - - gcc_toolchain("mips64") { -- toolprefix = "mips64-linux-gnuabi64-" -- -- cc = "${toolprefix}gcc" -- cxx = "${toolprefix}g++" -+ cc = "gcc" -+ cxx = "g++" - -- readelf = "${toolprefix}readelf" -- nm = "${toolprefix}nm" -- ar = "${toolprefix}ar" -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" - ld = cxx - - toolchain_args = { diff --git a/v8-6.7.17-optflags.patch b/v8-6.7.17-optflags.patch deleted file mode 100644 index fbb327d..0000000 --- a/v8-6.7.17-optflags.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up v8-6.7.17/build/config/compiler/BUILD.gn.optflags v8-6.7.17/build/config/compiler/BUILD.gn ---- v8-6.7.17/build/config/compiler/BUILD.gn.optflags 2018-03-14 14:20:29.275684642 -0400 -+++ v8-6.7.17/build/config/compiler/BUILD.gn 2018-03-14 14:22:25.056966902 -0400 -@@ -1849,7 +1849,7 @@ config("optimize_speed") { - # "default_optimization", below. - configs = [ "//build/config/nacl:irt_optimize" ] - } else { -- ldflags = common_optimize_on_ldflags -+ ldflags = [ "$OPTLDFLAGS" ] + common_optimize_on_ldflags - if (is_win) { - # Favor speed over size, /O2 must be before the common flags. The GYP - # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. -@@ -1870,7 +1870,7 @@ config("optimize_speed") { - } else if (optimize_for_fuzzing) { - cflags = [ "-O1" ] + common_optimize_on_cflags - } else { -- cflags = [ "-O3" ] + common_optimize_on_cflags -+ cflags = [ "$OPTFLAGS" ] + common_optimize_on_cflags - } - } - } diff --git a/v8-daily-tarball.sh b/v8-daily-tarball.sh deleted file mode 100644 index ea4a7b6..0000000 --- a/v8-daily-tarball.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -# This script checks out v8 source from svn. - -LOCALDIR=`pwd` -TODAYSDATE=`date +%Y%m%d` -USAGE="Usage: v8-daily-tarball.sh [-hrv]" -VERBOSE=false - -while getopts "hv" opt; do - case $opt in - h ) printf "$USAGE\n" - printf "\nAvailable command line options:\n" - printf "%b\t-h\t\tthis help\n" - printf "%b\t-v\t\tverbose output\n\n" - exit 1 ;; - v ) VERBOSE=true - printf "[VERBOSE]: Enabled\n" ;; - \? ) printf "$USAGE\n" - exit 1 ;; - esac -done - -# If the directory is there, just nuke it and continue. -if [ -d v8-$TODAYSDATE ]; then - if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Conflicting directory found, removing v8-$TODAYSDATE/\n" - fi - rm -rf v8-$TODAYSDATE/ - if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Removed conflicting directory: v8-$TODAYSDATE/\n" - fi -fi - -printf "Checking out the source tree. This will take some time.\n" - -if [ "$VERBOSE" = "true" ]; then - svn checkout http://v8.googlecode.com/svn/trunk/ v8-$TODAYSDATE -else - svn --quiet checkout http://v8.googlecode.com/svn/trunk v8-$TODAYSDATE -fi - -# Determine SVN rev and Version of v8 -cd v8-$TODAYSDATE/ -SVNREV=`svnversion` -V8_VERSION=`head -n1 ChangeLog |cut -f2 -d: |sed 's| Version ||g'` -cd .. - -printf "V8 ($V8_VERSION) svn$SVNREV [$TODAYSDATE] checked out\n" - -FULLVER=`echo ${V8_VERSION}-${TODAYSDATE}svn${SVNREV}` - -# Get rid of .svn bits to save space -if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Removing unnecessary .svn bits\n" -fi -find v8-$TODAYSDATE -depth -name .svn -type d -exec rm -rf {} \; - -# Now, lets look for the final target directory, without svnrev. -if [ -d v8-$FULLVER ]; then - if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Removing conflicting directory: v8-$FULLVER/\n" - fi - rm -rf v8-$FULLVER/ - if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Removed conflicting directory: v8-$FULLVER/\n" - fi -fi - -# At this point, we know the v8 target directory does not exist, time to rename the checkout -if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Renaming checkout directory from: v8-$TODAYSDATE/ to: v8-$FULLVER/\n" -fi -mv v8-$TODAYSDATE/ v8-$FULLVER/ - -# Now, lets look for the tarball. -if [ -f v8-$FULLVER.tar.bz2 ]; then - if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Found existing tarball matching v8-$FULLVER.tar.bz2, removing.\n" - fi - rm -f v8-$FULLVER.tar.bz2 - if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Removed conflicting file: v8-$FULLVER.tar.bz2\n" - fi -fi - -if [ "$VERBOSE" = "true" ]; then - printf "[VERBOSE]: Creating tarball: v8-$FULLVER.tar.bz2\n" -fi -tar cfj v8-$FULLVER.tar.bz2 v8-$FULLVER - -# All done. -printf "Daily v8 source processed and ready: v8-$FULLVER.tar.bz2\n" -exit 0 diff --git a/v8-js2c b/v8-js2c deleted file mode 100644 index 6d76060..0000000 --- a/v8-js2c +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/python - -import js2c -js2c.main () diff --git a/v8.spec b/v8.spec deleted file mode 100644 index 21b7ca8..0000000 --- a/v8.spec +++ /dev/null @@ -1,809 +0,0 @@ -%global with_python 0 - -# clang doesn't understand hardening, specifically "-specs=" -%global clang_optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1||g') -%global clang_ldflags %(echo "%{__global_ldflags} -Wl,--build-id" | sed 's|-specs=/usr/lib/rpm/redhat/redhat-hardened-ld||g') - -# Hi Googlers! If you're looking in here for patches, nifty. -# You (and everyone else) are welcome to use any of my Chromium spec files and -# patches under the terms of the GPLv2 or later. -# You (and everyone else) are welcome to use any of my V8-specific spec files -# and patches under the terms of the BSD license. -# You (and everyone else) may NOT use my spec files or patches under any other -# terms. -# I hate to be a party-pooper here, but I really don't want to help Google -# make a proprietary browser. There are enough of those already. -# All copyrightable work in these spec files and patches is Copyright 2011 -# Tom Callaway - -# For the 1.2 branch, we use 0s here -# For 1.3+, we use the three digit versions -# Hey, now there are four digits. What do they mean? Popsicle. -# Now there are three digits. Yeah. HOW ABOUT DEM APPLES?!? -%global somajor 6 -%global sominor 7 -%global sobuild 17 -%global sover %{somajor} - -Name: v8 -Version: %{somajor}.%{sominor}.%{sobuild} -Release: 9%{?dist} -Epoch: 1 -Summary: JavaScript Engine -License: BSD -URL: https://chromium.googlesource.com/v8/v8/ -# To make the source, you need to have depot_tools installed and in your PATH -# https://chromium.googlesource.com/chromium/tools/depot_tools.git/+archive/7e7a454f9afdddacf63e10be48f0eab603be654e.tar.gz -# Note that the depot_tools tarball above does not unpack into its own directory. -# mkdir v8-tmp -# cd v8-tmp -# fetch v8 -# cd v8 -# git checkout 6.7.17 -# gclient sync -# cd .. -# mv v8 v8-6.7.17 -# tar -c --exclude=.git --exclude=build/linux -J -f v8-6.7.17.tar.xz v8-6.7.17 -Source0: v8-6.7.17.tar.xz -# https://chromium.googlesource.com/chromium/tools/depot_tools.git/+archive/7e7a454f9afdddacf63e10be48f0eab603be654e.tar.gz -Source1: depot_tools.git-master.tar.gz -# Taken from chromium-60.0.3112.78/build/linux/unbundle/icu.gn -Source2: icu.gn -# Needed to build gn. :P -# git clone https://chromium.googlesource.com/chromium/src/base -# tar cvfj chromium-base-git2d35e4d.tar.bz2 base/ -Source3: chromium-base-git2d35e4d.tar.bz2 -# git clone https://chromium.googlesource.com/chromium/src/tools/gn -# tar cvfj gn-source-gitf833e90.tar.bz2 gn/ -Source4: gn-source-gitf833e90.tar.bz2 -# Patch0: v8-4.10.91-system_icu.patch -# Patch2: v8-5.2.258-bundled-binutils.patch -Patch3: v8-5.2.258-gcc7.patch -Patch5: v8-6.2.91-nolambda.patch -Patch6: v8-6.2.91-sover.patch -# Patch7: v8-6.2.91-noxlocale.patch -# do not assume we are cross compiling -# silly google -Patch8: v8-6.7.17-notcross.patch -# On i686 and armv7hl, use -g1 to avoid mem exhaust -Patch9: v8-6.7.17-i686-g1-to-avoid-mem-exhaust.patch -# Fedora 25 and older need less flags -# and clang is not tolerant of flags it doesn't know about -Patch10: v8-6.2.91-oldclang-flags.patch -# Workaround gcc8 bug in gn -Patch11: v8-6.2.91-gcc8-gn-fabi11.patch -# So many gcc fixes -Patch12: v8-6.7.17-fixme.patch -# Use Fedora optflags -Patch13: v8-6.7.17-optflags.patch -# Reconcile libc++abi with unwind.h from gcc -# https://bugs.llvm.org/show_bug.cgi?id=35945 -# Modified patch from https://reviews.llvm.org/D42242 -Patch14: v8-6.7.17-fix-gcc-unwind-header.patch - -# PPC64 doesn't like libcxx code. -# error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression -# aarch64 doesn't work either. -# code does not compile on s390 -ExclusiveArch: %{ix86} x86_64 %{arm} ppc mipsel mips64el -BuildRequires: readline-devel, libicu-devel, ninja-build -BuildRequires: python2-devel, glib2-devel, libatomic -# BuildRequires: clang, llvm -BuildRequires: gcc, gcc-c++ - -%description -V8 is Google's open source JavaScript engine. V8 is written in C++ and is used -in Google Chrome, the open source browser from Google. V8 implements ECMAScript -as specified in ECMA-262, 3rd edition. - -%package devel -Summary: Development headers and libraries for v8 -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description devel -Development headers and libraries for v8. - -%if %{with_python} -%package -n python2-v8 -%{?python_provide:%python_provide python2-v8} -# Remove before F30 -Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} -Summary: Python libraries from v8 -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description -n python2-v8 -Python libraries from v8. -%endif - -%prep -%setup -q -T -c -n depot_tools -a 1 -%setup -q -n %{name}-%{version} -a 3 -# %%patch0 -p1 -b .system_icu -# %%patch2 -p1 -b .bb -# %%patch3 -p1 -b .gcc7 -%patch5 -p1 -b .nolambda -%patch6 -p1 -b .sover -# %%patch7 -p1 -b .noxlocale -%patch8 -p1 -b .notcross -%ifarch i686 armv7hl -%patch9 -p1 -b .memexhaust -%endif -%if 0%{?fedora} <= 25 -%patch10 -p1 -b .oldflags -%endif - -cp -a %{SOURCE2} third_party/icu/BUILD.gn - -pushd tools -tar xvf %{SOURCE4} -popd - -%patch11 -p1 -b .fabi11 -%patch12 -p1 -b .fixme -%patch13 -p1 -b .optflags -%patch14 -p1 -b .unwind - -SPLITOPTFLAGS="" -for i in `echo %{optflags} | sed 's/ /\n/g'`; do - SPLITOPTFLAGS+="\"$i\", " -done -export SPLITOPTFLAGS - -SPLITLDFLAGS="" -for j in `echo %{build_ldflags} | sed 's/ /\n/g'`; do - SPLITLDFLAGS+="\"$j\", " -done -export SPLITLDFLAGS - -sed -i "s|\"\$OPTFLAGS\"|$SPLITOPTFLAGS|g" build/config/compiler/BUILD.gn -sed -i "s|\"\$OPTLDFLAGS\"|$SPLITLDFLAGS|g" build/config/compiler/BUILD.gn - -# Use system header ... except it doesn't work. -# rm -rf src/third_party/valgrind/valgrind.h -# ln -s /usr/include/valgrind/valgrind.h src/third_party/valgrind/valgrind.h - -# Don't make thin libraries. :( -for i in `find . -type f -name '*.mk'`; do sed -i 's|alink_thin|alink|g' $i; done -sed -i "s|'alink_thin'|'alink'|g" tools/gyp/pylib/gyp/generator/make.py -sed -i "s|'alink_thin'|'alink'|g" tools/gyp/pylib/gyp/generator/ninja.py -# sed -i "s|crsT|crs|g" out/Makefile -sed -i "s|crsT|crs|g" tools/gyp/pylib/gyp/generator/make.py - - -rm -rf third_party/binutils/Linux_x64/Release/bin/ld.gold -rm -rf third_party/llvm-build/Release+Asserts -mkdir -p third_party/llvm-build/Release+Asserts/bin -pushd third_party/llvm-build/Release+Asserts/bin -ln -s /usr/bin/clang clang -ln -s /usr/bin/clang++ clang++ -ln -s /usr/bin/llvm-ar llvm-ar -popd - -for i in `grep -rl "Wno-undefined-var-template" *`; do - sed -i 's|-Wno-undefined-var-template||g' $i -done - -# cleanup unversioned python parts -for i in `grep -r "/usr/bin/env python" * |grep -v "python3" |cut -d : -f 1`; do - sed -i 's|/usr/bin/env python|/usr/bin/env python2|g' $i -done -sed -i 's|exec python|exec python2|g' ../depot_tools/gn -sed -i 's|/usr/bin/env python|/usr/bin/env python2|g' ../depot_tools/gn.py - -%build -%ifarch x86_64 -%global v8arch x64 -%endif -%ifarch %{ix86} -%global v8arch x86 -%endif -%ifarch %{arm} -%global v8arch arm -%endif -%ifarch aarch64 -%global v8arch arm64 -%endif -%ifarch mipsel -%global v8arch mipsel -%endif -%ifarch mips64el -%global v8arch mips64el -%endif -%ifarch ppc -%global v8arch ppc -%endif -%ifarch ppc64 -%global v8arch ppc64 -%endif -%ifarch s390 -%global v8arch s390 -%endif -%ifarch s390x -%global v8arch s390x -%endif - -# DO THE HARLEM SHAKE -# err... I mean, build gn from source. -pushd tools/gn -./bootstrap/bootstrap.py -s -popd -rm -rf buildtools/linux64/gn* -# the tooling thinks all linux is "linux64" -cp -a out/Release/gn buildtools/linux64/gn - -# Replace ninja in depot_tools -rm -rf ../depot_tools/ninja -ln -s /usr/bin/ninja ../depot_tools/ninja - -V8_GN_DEFINES="" -V8_GN_DEFINES+=' use_sysroot=false use_gold=true enable_nacl=false linux_use_bundled_binutils=false is_component_build=true clang_use_chrome_plugins=false' -V8_GN_DEFINES+=' libcpp_is_static=true v8_use_external_startup_data=false' -V8_GN_DEFINES+=' v8_target_cpu="%{v8arch}"' -V8_GN_DEFINES+=' is_clang=false' -V8_GN_DEFINES+=' use_rtti=true' -%ifarch armv7hl armv7hnl -V8_GN_DEFINES+=' arm_float_abi="hard"' -%endif -%ifarch armv5tel armv6l armv7l -V8_GN_DEFINES+=' arm_float_abi="softfp"' -%endif - -export PATH=$PATH:%{_builddir}/depot_tools -CHROMIUM_BUILDTOOLS_PATH=./buildtools/ gn --script-executable=/usr/bin/python2 gen out.gn/%{v8arch}.release --args="$V8_GN_DEFINES" -mkdir -p out.gn/%{v8arch}.release/gen/shim_headers/icui18n_shim/third_party/icu/source/i18n/unicode -mkdir -p out.gn/%{v8arch}.release/gen/shim_headers/icuuc_shim/third_party/icu/source/common/unicode -../depot_tools/ninja -vvv -C out.gn/%{v8arch}.release - -%install -pushd out.gn/%{v8arch}.release -# library first -mkdir -p %{buildroot}%{_libdir} -cp -a libv8*.so.%{somajor} %{buildroot}%{_libdir} -# Next, binaries -mkdir -p %{buildroot}%{_bindir} -install -p -m0755 d8 %{buildroot}%{_bindir} -install -p -m0755 mksnapshot %{buildroot}%{_bindir} -# install -p -m0755 parser_fuzzer %{buildroot}%{_bindir} -%if 0 -# BLOBS! (Don't stress. They get built out of source code.) -install -p natives_blob.bin snapshot_blob.bin %{buildroot}%{_libdir} -%endif -popd - -# Now, headers -mkdir -p %{buildroot}%{_includedir} -install -p include/*.h %{buildroot}%{_includedir} -cp -a include/libplatform %{buildroot}%{_includedir} -# Are these still useful? -mkdir -p %{buildroot}%{_includedir}/v8/extensions/ -install -p src/extensions/*.h %{buildroot}%{_includedir}/v8/extensions/ - -# Make shared library links -pushd %{buildroot}%{_libdir} -ln -sf libv8.so.%{somajor} libv8.so -ln -sf libv8_libplatform.so.%{somajor} libv8_libplatform.so -ln -sf libv8_libbase.so.%{somajor} libv8_libbase.so -popd - -%if %{with_python} -# install Python JS minifier scripts for nodejs -install -d %{buildroot}%{python2_sitelib} -sed -i 's|/usr/bin/python2.4|/usr/bin/env python2|g' tools/jsmin.py -sed -i 's|/usr/bin/python2.4|/usr/bin/env python2|g' tools/js2c.py -install -p -m0744 tools/jsmin.py %{buildroot}%{python2_sitelib}/ -install -p -m0744 tools/js2c.py %{buildroot}%{python2_sitelib}/ -chmod -R -x %{buildroot}%{python2_sitelib}/*.py* -%endif - -%ldconfig_scriptlets - -%files -%license LICENSE -%doc AUTHORS ChangeLog -%{_bindir}/d8 -%{_bindir}/mksnapshot -%{_libdir}/*.so.* -%if 0 -%{_libdir}/*.bin -%endif - -%files devel -%{_includedir}/*.h -%{_includedir}/libplatform/ -%dir %{_includedir}/v8/ -%{_includedir}/v8/extensions/ -%{_libdir}/*.so - -%if %{with_python} -%files -n python2-v8 -%{python2_sitelib}/j*.py* -%endif - -%changelog -* Sun Feb 03 2019 Fedora Release Engineering - 1:6.7.17-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Oct 5 2018 Tom Callaway - 1:6.7.17-8 -- disable python2 subpackage - -* Tue Jul 24 2018 Tom Callaway - 1:6.7.17-7 -- add use_rtti=true flag -- cleanup unversioned python bits - -* Sat Jul 14 2018 Fedora Release Engineering - 1:6.7.17-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jul 10 2018 Pete Walter - 1:6.7.17-5 -- Rebuild for ICU 62 - -* Tue May 15 2018 Sergey Avseyev - 1:6.7.17-4 -- Add libv8_libbase.so symlink to devel package. - -* Tue May 8 2018 Sergey Avseyev - 1:6.7.17-3 -- Fix ARM build. Integrate fix for https://bugs.llvm.org/show_bug.cgi?id=35945 - -* Mon Apr 30 2018 Pete Walter - 1:6.7.17-2 -- Rebuild for ICU 61.1 - -* Wed Mar 14 2018 Tom Callaway - 1:6.7.17-1 -- update to 6.7.17 - -* Wed Mar 07 2018 Adam Williamson - 1:6.2.91-8 -- Rebuild to fix GCC 8 mis-compilation - See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64") - -* Mon Feb 19 2018 Tom Callaway - 1:6.2.91-7 -- fix platform library symlink - -* Fri Feb 09 2018 Fedora Release Engineering - 1:6.2.91-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Nov 30 2017 Pete Walter - 1:6.2.91-5 -- Rebuild for ICU 60.1 - -* Thu Aug 31 2017 Tom Callaway - 1:6.2.91-4 -- disable some cflags on fedora 25 or older - -* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 1:6.2.91-3 -- Add Provides for the old name without %%_isa - -* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1:6.2.91-2 -- Python 2 binary package renamed to python2-v8 - See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 - -* Mon Jul 31 2017 Tom Callaway - 1:6.2.91-1 -- 6.2.91 - -* Thu Jul 27 2017 Fedora Release Engineering - 1:5.2.258-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Mar 1 2017 Tom Callaway - 1:5.2.258-11 -- fix ppc64 build - -* Tue Feb 28 2017 Tom Callaway - 1:5.2.258-10 -- fix ftbfs (thanks to Ben Noordhuis) - -* Sat Feb 11 2017 Fedora Release Engineering - 1:5.2.258-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 12 2017 Igor Gnatenko - 1:5.2.258-8 -- Rebuild for readline 7.x - -* Mon Oct 17 2016 Tom Callaway - 1:5.2.258-7 -- force v8 not to make thin libraries - -* Thu Oct 13 2016 Tom Callaway - 1:5.2.258-6 -- use smaller, better compressed source tarball without unnecessary git bits - -* Mon Oct 10 2016 Tom Callaway - 1:5.2.258-5 -- add bundledbinutils option to Makefile to disable "thin" static libs - -* Mon Sep 26 2016 Tom Callaway - 1:5.2.258-4 -- set snapshot=external to enable blob creation -- include blobs, static libraries - -* Tue Jul 19 2016 Fedora Release Engineering - 1:5.2.258-3 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Fri May 13 2016 Tom Callaway - 1:5.2.258-2 -- build with optflags, except for the hardening script which clang has no idea what to do with - -* Mon May 9 2016 Tom Callaway - 1:5.2.258-1 -- update to 5.2.258 - -* Mon May 2 2016 Tom Callaway - 1:5.2.197-1 -- update to 5.2.197 -- WELCOME TO THE WORLD OF TOMORROW - -* Fri Apr 15 2016 David Tardon - 1:3.14.5.10-24 -- rebuild for ICU 57.1 - -* Fri Feb 05 2016 Fedora Release Engineering - 1:3.14.5.10-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Oct 28 2015 David Tardon - 1:3.14.5.10-22 -- rebuild for ICU 56.1 - -* Mon Sep 21 2015 Tom Callaway - 1:3.14.5.10-21 -- add REPLACE_INVALID_UTF8 code needed for nodejs - -* Fri Jun 19 2015 Fedora Release Engineering - 1:3.14.5.10-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Jun 8 2015 Tom Callaway - 1:3.14.5.10-19 -- split off python subpackage (bz 959145) - -* Thu Apr 23 2015 Tom Callaway - 1:3.14.5.10-18 -- backport security fix for ARM - CVE-2014-3152 - -* Thu Feb 19 2015 T.C. Hollingsworth - 1:3.14.5.10-17 -- backports for nodejs 0.10.36 - -* Mon Jan 26 2015 David Tardon - 1:3.14.5.10-16 -- rebuild for ICU 54.1 - -* Tue Dec 2 2014 Tom Callaway - 1:3.14.5.10-15 -- use system valgrind header (bz1141483) - -* Wed Sep 17 2014 T.C. Hollingsworth - 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) -- backport fix to segfault caused by the above patch - -* Tue Aug 26 2014 David Tardon - 1:3.14.5.10-13 -- rebuild for ICU 53.1 - -* Mon Aug 18 2014 Fedora Release Engineering - 1:3.14.5.10-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Thu Jul 31 2014 T.C. Hollingsworth - 1:3.14.5.10-11 -- backport security fix for memory corruption and stack overflow (RHBZ#1125464) - https://groups.google.com/d/msg/nodejs/-siJEObdp10/2xcqqmTHiEMJ -- backport bug fix for x64 MathMinMax for negative untagged int32 arguments. - https://github.com/joyent/node/commit/3530fa9cd09f8db8101c4649cab03bcdf760c434 - -* Thu Jun 19 2014 T.C. Hollingsworth - 1:3.14.5.10-10 -- fix corner case in integer comparisons (v8 bug#2416; nodejs bug#7528) - -* Sun Jun 08 2014 Fedora Release Engineering - 1:3.14.5.10-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sat May 03 2014 T.C. Hollingsworth - 1:3.14.5.10-8 -- use clock_gettime() instead of gettimeofday(), which increases V8 performance - dramatically on virtual machines - -* Tue Mar 18 2014 T.C. Hollingsworth - 1:3.14.5.10-7 -- backport fix for unsigned integer arithmetic (RHBZ#1077136; CVE-2014-1704) - -* Mon Feb 24 2014 Tomas Hrcka - 1:3.14.5.10-6 -- Backport fix for incorrect handling of popular pages (RHBZ#1059070; CVE-2013-6640) - -* Fri Feb 14 2014 T.C. Hollingsworth - 1:3.14.5.10-5 -- rebuild for icu-52 - -* Mon Jan 27 2014 T.C. Hollingsworth - 1:3.14.5.10-4 -- backport fix for enumeration for objects with lots of properties - -* Fri Dec 13 2013 T.C. Hollingsworth - 1:3.14.5.10-3 -- backport fix for out-of-bounds read DoS (RHBZ#1039889; CVE-2013-6640) - -* Fri Aug 02 2013 T.C. Hollingsworth - 1:3.14.5.10-2 -- backport fix for remote DoS or unspecified other impact via type confusion - (RHBZ#991116; CVE-2013-2882) - -* Wed May 29 2013 T.C. Hollingsworth - 1:3.14.5.10-1 -- new upstream release 3.14.5.10 - -* Mon May 06 2013 Stanislav Ochotnicky - 1:3.14.5.8-2 -- Fix ownership of include directory (#958729) - -* Fri Mar 22 2013 T.C. Hollingsworth - 1:3.14.5.8-1 -- new upstream release 3.14.5.8 -- backport security fix for remote DoS via crafted javascript (RHBZ#924495; CVE-2013-2632) - -* Mon Mar 11 2013 Stephen Gallagher - 1:3.14.5.7-3 -- Update to v8 3.14.5.7 for Node.js 0.10.0 - -* Sat Jan 26 2013 T.C. Hollingsworth - 1:3.13.7.5-2 -- rebuild for icu-50 -- ignore new GCC 4.8 warning - -* Tue Dec 4 2012 Tom Callaway - 1:3.13.7.5-1 -- update to 3.13.7.5 (needed for chromium 23) -- Resolves multiple security issues (CVE-2012-5120, CVE-2012-5128) -- d8 is now using a static libv8, resolves bz 881973) - -* Sun Jul 22 2012 Fedora Release Engineering - 1:3.10.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Jul 6 2012 Tom Callaway 1:3.10.8-1 -- update to 3.10.8 (chromium 20) - -* Tue Jun 12 2012 Tom Callaway 1:3.9.24-1 -- update to 3.9.24 (chromium 19) - -* Mon Apr 23 2012 Thomas Spura 1:3.7.12.6 -- rebuild for icu-49 - -* Fri Mar 30 2012 Dennis Gilmore 1:3.7.12-5 -- make sure the right arm abi is used in the second call of scons - -* Thu Mar 29 2012 Dennis Gilmore 1:3.7.12-4 -- use correct arm macros -- use the correct abis for hard and soft float - -* Tue Mar 20 2012 Tom Callaway 3.7.12-3 -- merge changes from Fedora spec file, sync, add epoch - -* Fri Feb 17 2012 Tom Callaway 3.7.12-2 -- add -Wno-error=strict-overflow for gcc 4.7 (hack, hack, hack) - -* Mon Feb 13 2012 Tom Callaway 3.7.12-1 -- update to 3.7.12 - -* Thu Nov 3 2011 Tom Callaway 3.5.10-1 -- update to 3.5.10 - -* Mon Sep 26 2011 Tom Callaway 3.4.14-2 -- final 3.4.14 tag -- include JavaScript minifier scripts in -devel - -* Fri Jun 10 2011 Tom Callaway 3.2.10-1 -- tag 3.2.10 - -* Thu Apr 28 2011 Tom Callaway 3.1.8-1 -- "stable" v8 match for "stable" chromium (tag 3.1.8) - -* Tue Feb 22 2011 Tom Callaway 3.1.5-1.20110222svn6902 -- update to 3.1.5 -- enable experimental i18n icu stuff for chromium - -* Tue Jan 11 2011 Tom Callaway 3.0.7-1.20110111svn6276 -- update to 3.0.7 - -* Tue Dec 14 2010 Tom "spot" Callaway 3.0.0-2.20101209svn5957 -- fix sloppy code where NULL is used - -* Thu Dec 9 2010 Tom "spot" Callaway 3.0.0-1.20101209svn5957 -- update to 3.0.0 - -* Fri Oct 22 2010 Tom "spot" Callaway 2.5.1-1.20101022svn5692 -- update to 2.5.1 -- fix another fwrite with no return checking case - -* Thu Oct 14 2010 Tom "spot" Callaway 2.5.0-1.20101014svn5625 -- update to 2.5.0 - -* Mon Oct 4 2010 Tom "spot" Callaway 2.4.8-1.20101004svn5585 -- update to 2.4.8 - -* Tue Sep 14 2010 Tom "spot" Callaway 2.4.3-1.20100914svn5450 -- update to 2.4.3 - -* Tue Aug 31 2010 Tom "spot" Callaway 2.3.11-1.20100831svn5385 -- update to svn5385 - -* Fri Aug 27 2010 Tom "spot" Callaway 2.3.11-1.20100827svn5365 -- update to 2.3.11, svn5365 - -* Tue Aug 24 2010 Tom "spot" Callaway 2.3.10-1.20100824svn5332 -- update to 2.3.10, svn5332 - -* Wed Aug 18 2010 Tom "spot" Callaway 2.3.9-1.20100819svn5308 -- update to 2.3.9, svn5308 - -* Wed Aug 11 2010 Tom "spot" Callaway 2.3.7-1.20100812svn5251 -- update to svn5251 - -* Wed Aug 11 2010 Tom "spot" Callaway 2.3.7-1.20100811svn5248 -- update to 2.3.7, svn5248 - -* Tue Aug 10 2010 Tom "spot" Callaway 2.3.6-1.20100809svn5217 -- update to 2.3.6, svn5217 - -* Fri Aug 6 2010 Tom "spot" Callaway 2.3.5-1.20100806svn5198 -- update to 2.3.5, svn5198 - -* Mon Jul 26 2010 Tom "spot" Callaway 2.3.3-1.20100726svn5134 -- update to 2.3.3, svn5134 - -* Fri Jul 16 2010 Tom "spot" Callaway 2.3.0-1.20100716svn5088 -- update to 2.3.0, svn5088 - -* Tue Jul 6 2010 Tom "spot" Callaway 2.2.22-1.20100706svn5023 -- update to 2.2.22, svn5023 - -* Fri Jul 2 2010 Tom "spot" Callaway 2.2.21-1.20100702svn5010 -- update to svn5010 - -* Wed Jun 30 2010 Tom "spot" Callaway 2.2.21-1.20100630svn4993 -- update to 2.2.21, svn4993 -- include checkout script - -* Thu Jun 3 2010 Tom "spot" Callaway 2.2.14-1.20100603svn4792 -- update to 2.2.14, svn4792 - -* Tue Jun 1 2010 Tom "spot" Callaway 2.2.13-1.20100601svn4772 -- update to 2.2.13, svn4772 - -* Thu May 27 2010 Tom "spot" Callaway 2.2.12-1.20100527svn4747 -- update to 2.2.12, svn4747 - -* Tue May 25 2010 Tom "spot" Callaway 2.2.11-1.20100525svn4718 -- update to 2.2.11, svn4718 - -* Thu May 20 2010 Tom "spot" Callaway 2.2.10-1.20100520svn4684 -- update to svn4684 - -* Mon May 17 2010 Tom "spot" Callaway 2.2.10-1.20100517svn4664 -- update to 2.2.10, svn4664 - -* Thu May 13 2010 Tom "spot" Callaway 2.2.9-1.20100513svn4653 -- update to svn4653 - -* Mon May 10 2010 Tom "spot" Callaway 2.2.9-1.20100510svn4636 -- update to 2.2.9, svn4636 - -* Tue May 4 2010 Tom "spot" Callaway 2.2.7-1.20100504svn4581 -- update to 2.2.7, svn4581 - -* Mon Apr 19 2010 Tom "spot" Callaway 2.2.3-1.20100419svn4440 -- update to 2.2.3, svn4440 - -* Tue Apr 13 2010 Tom "spot" Callaway 2.2.2-1.20100413svn4397 -- update to 2.2.2, svn4397 - -* Thu Apr 8 2010 Tom "spot" Callaway 2.2.1-1.20100408svn4359 -- update to 2.2.1, svn4359 - -* Mon Mar 29 2010 Tom "spot" Callaway 2.2.0-1.20100329svn4309 -- update to 2.2.0, svn4309 - -* Thu Mar 25 2010 Tom "spot" Callaway 2.1.8-1.20100325svn4273 -- update to 2.1.8, svn4273 - -* Mon Mar 22 2010 Tom "spot" Callaway 2.1.5-1.20100322svn4204 -- update to 2.1.5, svn4204 - -* Mon Mar 15 2010 Tom "spot" Callaway 2.1.4-1.20100315svn4129 -- update to 2.1.4, svn4129 - -* Wed Mar 10 2010 Tom "spot" Callaway 2.1.0-1.20100310svn4088 -- update to 2.1.3, svn4088 - -* Thu Feb 18 2010 Tom "spot" Callaway 2.1.0-1.20100218svn3902 -- update to 2.1.0, svn3902 - -* Fri Jan 22 2010 Tom "spot" Callaway 2.0.6-1.20100122svn3681 -- update to 2.0.6, svn3681 - -* Tue Dec 29 2009 Tom "spot" Callaway 2.0.5-1.20091229svn3528 -- svn3528 - -* Mon Dec 21 2009 Tom "spot" Callaway 2.0.5-1.20091221svn3511 -- update to 2.0.5, svn3511 - -* Wed Dec 9 2009 Tom "spot" Callaway 2.0.3-1.20091209svn3443 -- update to 2.0.3, svn3443 - -* Tue Nov 24 2009 Tom "spot" Callaway 2.0.2-1.20091124svn3353 -- update to 2.0.2, svn3353 - -* Wed Nov 18 2009 Tom "spot" Callaway 2.0.0-1.20091118svn3334 -- update to 2.0.0, svn3334 - -* Tue Oct 27 2009 Tom "spot" Callaway 1.3.16-1.20091027svn3152 -- update to 1.3.16, svn3152 - -* Tue Oct 13 2009 Tom "spot" Callaway 1.3.15-1.20091013svn3058 -- update to svn3058 - -* Thu Oct 8 2009 Tom "spot" Callaway 1.3.15-1.20091008svn3036 -- update to 1.3.15, svn3036 - -* Tue Sep 29 2009 Tom "spot" Callaway 1.3.13-1.20090929svn2985 -- update to svn2985 -- drop unused parameter patch, figured out how to work around it with optflag mangling -- have I mentioned lately that scons is garbage? - -* Mon Sep 28 2009 Tom "spot" Callaway 1.3.13-1.20090928svn2980 -- update to 1.3.13, svn2980 - -* Wed Sep 16 2009 Tom "spot" Callaway 1.3.11-1.20090916svn2903 -- update to 1.3.11, svn2903 - -* Wed Sep 9 2009 Tom "spot" Callaway 1.3.9-1.20090909svn2862 -- update to 1.3.9, svn2862 - -* Thu Aug 27 2009 Tom "spot" Callaway 1.3.8-1.20090827svn2777 -- update to 1.3.8, svn2777 - -* Mon Aug 24 2009 Tom "spot" Callaway 1.3.6-1.20090824svn2747 -- update to 1.3.6, svn2747 - -* Tue Aug 18 2009 Tom "spot" Callaway 1.3.4-1.20090818svn2708 -- update to svn2708, build and package d8 - -* Fri Aug 14 2009 Tom "spot" Callaway 1.3.4-1.20090814svn2692 -- update to 1.3.4, svn2692 - -* Wed Aug 12 2009 Tom "spot" Callaway 1.3.3-1.20090812svn2669 -- update to 1.3.3, svn2669 - -* Mon Aug 10 2009 Tom "spot" Callaway 1.3.2-1.20090810svn2658 -- update to svn2658 - -* Fri Aug 7 2009 Tom "spot" Callaway 1.3.2-1.20090807svn2653 -- update to svn2653 - -* Wed Aug 5 2009 Tom "spot" Callaway 1.3.2-1.20090805svn2628 -- update to 1.3.2, svn2628 - -* Mon Aug 3 2009 Tom "spot" Callaway 1.3.1-1.20090803svn2607 -- update to svn2607 - -* Fri Jul 31 2009 Tom "spot" Callaway 1.3.1-1.20090731svn2602 -- update to svn2602 - -* Thu Jul 30 2009 Tom "spot" Callaway 1.3.1-1.20090730svn2592 -- update to 1.3.1, svn 2592 - -* Mon Jul 27 2009 Tom "spot" Callaway 1.3.0-1.20090727svn2543 -- update to 1.3.0, svn 2543 - -* Fri Jul 24 2009 Tom "spot" Callaway 1.2.14-1.20090724svn2534 -- update to svn2534 - -* Mon Jul 20 2009 Tom "spot" Callaway 1.2.14-1.20090720svn2510 -- update to svn2510 - -* Thu Jul 16 2009 Tom "spot" Callaway 1.2.14-1.20090716svn2488 -- update to svn2488 - -* Wed Jul 15 2009 Tom "spot" Callaway 1.2.14-1.20090715svn2477 -- update to 1.2.14, svn2477 - -* Mon Jul 13 2009 Tom "spot" Callaway 1.2.13-1.20090713svn2434 -- update to svn2434 - -* Sat Jul 11 2009 Tom "spot" Callaway 1.2.13-1.20090711svn2430 -- update to 1.2.13, svn2430 - -* Wed Jul 8 2009 Tom "spot" Callaway 1.2.12-1.20090708svn2391 -- update to 1.2.12, svn2391 - -* Sat Jul 4 2009 Tom "spot" Callaway 1.2.11-1.20090704svn2356 -- update to 1.2.11, svn2356 - -* Fri Jun 26 2009 Tom "spot" Callaway 1.2.9-1.20090626svn2284 -- update to svn2284 - -* Wed Jun 24 2009 Tom "spot" Callaway 1.2.9-1.20090624svn2262 -- update to 1.2.9, svn2262 - -* Thu Jun 18 2009 Tom "spot" Callaway 1.2.7-2.20090618svn2219 -- fix unused-parameter patch - -* Thu Jun 18 2009 Tom "spot" Callaway 1.2.7-1.20090618svn2219 -- update to 1.2.8, svn2219 - -* Mon Jun 8 2009 Tom "spot" Callaway 1.2.7-2.20090608svn2123 -- fix gcc44 compile for Fedora 11 - -* Mon Jun 8 2009 Tom "spot" Callaway 1.2.7-1.20090608svn2123 -- update to 1.2.7, svn2123 - -* Thu May 28 2009 Tom "spot" Callaway 1.2.5-1.20090528svn2072 -- update to newer svn checkout - -* Sun Feb 22 2009 Tom "spot" Callaway 1.0.1-1.20090222svn1332 -- update to newer svn checkout - -* Sun Sep 14 2008 Tom "spot" Callaway 0.2-2.20080914svn300 -- make a versioned shared library properly - -* Sun Sep 14 2008 Tom "spot" Callaway 0.2-1.20080914svn300 -- Initial package for Fedora -