From 4062d751707149ebfb3e1a41bb75bef320523073 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 28 2020 09:46:47 +0000 Subject: import mozjs60-60.9.0-4.el8 --- diff --git a/SOURCES/enddianness.patch b/SOURCES/enddianness.patch index 56c622a..8bf7f67 100644 --- a/SOURCES/enddianness.patch +++ b/SOURCES/enddianness.patch @@ -11,11 +11,11 @@ Bug 1488552 - Ensure proper running on 64-bit and 32-bit BE platforms. js/src/vm/StringType.h | 13 +++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) -diff --git a/js/src/gc/Marking-inl.h b/js/src/gc/Marking-inl.h -index 6d2a4c7..c773c21 100644 ---- a/js/src/gc/Marking-inl.h -+++ b/js/src/gc/Marking-inl.h -@@ -82,12 +82,28 @@ inline void RelocationOverlay::forwardTo(Cell* cell) { +Index: firefox-60.9.0/js/src/gc/Marking-inl.h +=================================================================== +--- firefox-60.9.0.orig/js/src/gc/Marking-inl.h 2019-09-01 15:09:17.000000000 +0200 ++++ firefox-60.9.0/js/src/gc/Marking-inl.h 2019-12-09 11:42:31.024301901 +0100 +@@ -82,12 +82,28 @@ MOZ_ASSERT(!isForwarded()); // The location of magic_ is important because it must never be valid to see // the value Relocated there in a GC thing that has not been moved. @@ -44,11 +44,11 @@ index 6d2a4c7..c773c21 100644 static_assert( offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length), "RelocationOverlay::magic_ is in the wrong location"); -diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h -index a568843..399a541 100644 ---- a/js/src/gc/RelocationOverlay.h -+++ b/js/src/gc/RelocationOverlay.h -@@ -33,14 +33,25 @@ class RelocationOverlay { +Index: firefox-60.9.0/js/src/gc/RelocationOverlay.h +=================================================================== +--- firefox-60.9.0.orig/js/src/gc/RelocationOverlay.h 2019-09-01 15:09:17.000000000 +0200 ++++ firefox-60.9.0/js/src/gc/RelocationOverlay.h 2019-12-09 11:42:31.024301901 +0100 +@@ -33,14 +33,25 @@ /* See comment in js/public/HeapAPI.h. */ static const uint32_t Relocated = js::gc::Relocated; @@ -75,10 +75,10 @@ index a568843..399a541 100644 /* The location |this| was moved to. */ Cell* newLocation_; -diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h -index 4b8d18a..70ce0a1 100644 ---- a/js/src/jsfriendapi.h -+++ b/js/src/jsfriendapi.h +Index: firefox-60.9.0/js/src/jsfriendapi.h +=================================================================== +--- firefox-60.9.0.orig/js/src/jsfriendapi.h 2019-09-01 15:09:18.000000000 +0200 ++++ firefox-60.9.0/js/src/jsfriendapi.h 2019-12-09 11:42:31.024301901 +0100 @@ -9,6 +9,7 @@ #include "mozilla/Atomics.h" @@ -87,7 +87,7 @@ index 4b8d18a..70ce0a1 100644 #include "mozilla/Maybe.h" #include "mozilla/MemoryReporting.h" #include "mozilla/UniquePtr.h" -@@ -609,8 +610,15 @@ struct String { +@@ -609,8 +610,15 @@ static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6); static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5); static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1; @@ -103,10 +103,10 @@ index 4b8d18a..70ce0a1 100644 union { const JS::Latin1Char* nonInlineCharsLatin1; const char16_t* nonInlineCharsTwoByte; -diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h -index cde3427..c3400db 100644 ---- a/js/src/vm/StringType.h -+++ b/js/src/vm/StringType.h +Index: firefox-60.9.0/js/src/vm/StringType.h +=================================================================== +--- firefox-60.9.0.orig/js/src/vm/StringType.h 2019-09-01 15:09:39.000000000 +0200 ++++ firefox-60.9.0/js/src/vm/StringType.h 2019-12-09 11:42:31.028301901 +0100 @@ -7,6 +7,7 @@ #ifndef vm_StringType_h #define vm_StringType_h @@ -115,7 +115,7 @@ index cde3427..c3400db 100644 #include "mozilla/MemoryReporting.h" #include "mozilla/PodOperations.h" #include "mozilla/Range.h" -@@ -168,8 +169,20 @@ class JSString : public js::gc::Cell { +@@ -168,8 +169,20 @@ struct Data { union { struct { @@ -136,6 +136,90 @@ index cde3427..c3400db 100644 }; uintptr_t flattenData; /* JSRope (temporary while flattening) */ } u1; --- -2.23.0 +Index: firefox-60.9.0/js/src/js-config.h.in +=================================================================== +--- firefox-60.9.0.orig/js/src/js-config.h.in 2019-09-01 15:09:18.000000000 +0200 ++++ firefox-60.9.0/js/src/js-config.h.in 2019-12-09 11:43:13.052302975 +0100 +@@ -38,6 +38,13 @@ + /* Define to 1 if SpiderMonkey should include ctypes support. */ + #undef JS_HAS_CTYPES + ++/* Define to 1 if SpiderMonkey should include trace logging support. */ ++#undef JS_TRACE_LOGGING ++ ++/* Define to 1 if SpiderMonkey should include a breakpoint function for ++ * artificial OOMs. */ ++#undef JS_OOM_BREAKPOINT ++ + /* Define to 1 if SpiderMonkey should support the ability to perform + entirely too much GC. */ + #undef JS_GC_ZEAL +@@ -48,12 +55,25 @@ + /* Define to 1 to perform extra assertions and heap poisoning. */ + #undef JS_CRASH_DIAGNOSTICS + ++/* Define to 1 if SpiderMonkey is compiled with support for private values at ++ * odd-numbered memory addresses. */ ++#undef JS_UNALIGNED_PRIVATE_VALUES ++ + /* Define to 1 if SpiderMonkey is in NUNBOX32 mode. */ + #undef JS_NUNBOX32 + + /* Define to 1 if SpiderMonkey is in PUNBOX64 mode. */ + #undef JS_PUNBOX64 + ++/* Define exactly one of these to 1 to indicate JIT code generation mode. */ ++#undef JS_CODEGEN_NONE ++#undef JS_CODEGEN_ARM ++#undef JS_CODEGEN_ARM64 ++#undef JS_CODEGEN_MIPS32 ++#undef JS_CODEGEN_MIPS64 ++#undef JS_CODEGEN_X86 ++#undef JS_CODEGEN_X64 ++ + /* MOZILLA JSAPI version number components */ + #undef MOZJS_MAJOR_VERSION + #undef MOZJS_MINOR_VERSION +Index: firefox-60.9.0/js/src/jsapi.cpp +=================================================================== +--- firefox-60.9.0.orig/js/src/jsapi.cpp 2019-09-01 15:09:18.000000000 +0200 ++++ firefox-60.9.0/js/src/jsapi.cpp 2019-12-09 11:43:13.052302975 +0100 +@@ -115,6 +115,14 @@ + #define JS_ADDRESSOF_VA_LIST(ap) (&(ap)) + #endif + ++// See preprocessor definition of JS_BITS_PER_WORD in jstypes.h; make sure ++// JS_64BIT (used internally) agrees with it ++#ifdef JS_64BIT ++static_assert(JS_BITS_PER_WORD == 64, "values must be in sync"); ++#else ++static_assert(JS_BITS_PER_WORD == 32, "values must be in sync"); ++#endif ++ + JS_PUBLIC_API bool JS::CallArgs::requireAtLeast(JSContext* cx, + const char* fnname, + unsigned required) const { +Index: firefox-60.9.0/js/src/jstypes.h +=================================================================== +--- firefox-60.9.0.orig/js/src/jstypes.h 2019-09-01 15:09:18.000000000 +0200 ++++ firefox-60.9.0/js/src/jstypes.h 2019-12-09 11:43:13.052302975 +0100 +@@ -141,12 +141,17 @@ + #define JS_BITS_PER_BYTE 8 + #define JS_BITS_PER_BYTE_LOG2 3 + +-#if defined(JS_64BIT) ++#if (defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8) || \ ++ (defined(UINTPTR_MAX) && UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFu) + #define JS_BITS_PER_WORD 64 + #else + #define JS_BITS_PER_WORD 32 + #endif + ++static_assert(sizeof(void*) == 8 ? JS_BITS_PER_WORD == 64 ++ : JS_BITS_PER_WORD == 32, ++ "preprocessor and compiler must agree"); ++ + /*********************************************************************** + ** MACROS: JS_FUNC_TO_DATA_PTR + ** JS_DATA_TO_FUNC_PTR diff --git a/SOURCES/tests-Expect-a-test-to-fail-on-big-endian.patch b/SOURCES/tests-Expect-a-test-to-fail-on-big-endian.patch new file mode 100644 index 0000000..6b20753 --- /dev/null +++ b/SOURCES/tests-Expect-a-test-to-fail-on-big-endian.patch @@ -0,0 +1,24 @@ +From: Simon McVittie +Date: Fri, 28 Sep 2018 09:51:33 +0100 +Subject: tests: Expect a test to fail on big-endian + +Signed-off-by: Simon McVittie +Forwarded: no +--- + js/src/tests/jstests.list | 3 +++ + 1 file changed, 3 insertions(+) + +Index: firefox-60.9.0/js/src/tests/jstests.list +=================================================================== +--- firefox-60.9.0.orig/js/src/tests/jstests.list 2019-12-10 11:04:22.464247245 +0100 ++++ firefox-60.9.0/js/src/tests/jstests.list 2019-12-10 11:15:21.496264080 +0100 +@@ -451,6 +451,8 @@ + # + skip-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-/)) script non262/extensions/clone-errors.js + ++# Assumes little-endian IEEE representation of floating point numbers ++fails-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-|ppc-/)) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js + + ########################################################### + # Tests disabled due to issues in test262 importer script # + diff --git a/SOURCES/tests-Skip-a-test-on-s390x.patch b/SOURCES/tests-Skip-a-test-on-s390x.patch new file mode 100644 index 0000000..6c57b53 --- /dev/null +++ b/SOURCES/tests-Skip-a-test-on-s390x.patch @@ -0,0 +1,16 @@ +Index: firefox-60.9.0/js/src/tests/jstests.list +=================================================================== +--- firefox-60.9.0.orig/js/src/tests/jstests.list 2019-12-10 11:03:40.064246162 +0100 ++++ firefox-60.9.0/js/src/tests/jstests.list 2019-12-10 11:04:22.464247245 +0100 +@@ -447,6 +447,10 @@ + # https://bugzilla.mozilla.org/show_bug.cgi?id=1321616 + skip script test262/annexB/built-ins/Function/createdynfn-html-close-comment-params.js + ++# Crashes on s390x and ppc64, avoid it ++# ++skip-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-/)) script non262/extensions/clone-errors.js ++ + + ########################################################### + # Tests disabled due to issues in test262 importer script # + diff --git a/SPECS/mozjs60.spec b/SPECS/mozjs60.spec index c9f0bee..3837e26 100644 --- a/SPECS/mozjs60.spec +++ b/SPECS/mozjs60.spec @@ -12,7 +12,7 @@ Name: mozjs%{major} Version: 60.9.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: SpiderMonkey JavaScript library License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0 @@ -38,6 +38,10 @@ Patch14: init_patch.patch Patch15: enddianness.patch # https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/jsproperty-endian.patch Patch16: jsproperty-endian.patch +# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/tests-Skip-a-test-on-s390x.patch +Patch17: tests-Skip-a-test-on-s390x.patch +# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/tests-Expect-a-test-to-fail-on-big-endian.patch +Patch18: tests-Expect-a-test-to-fail-on-big-endian.patch # Patches from Fedora firefox package: Patch26: build-icu-big-endian.patch @@ -94,6 +98,8 @@ pushd ../.. # s390x fixes %patch15 -p1 %patch16 -p1 +%patch17 -p1 +%patch18 -p1 # Patch for big endian platforms only %if 0%{?big_endian} @@ -208,16 +214,16 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so %check # Run SpiderMonkey tests -/usr/bin/python2 tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \ -%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le +/usr/bin/python2-for-tests tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \ +%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390x ; %else || : %endif # Run basic JIT tests -/usr/bin/python2 jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \ -%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le +/usr/bin/python2-for-tests jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \ +%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390x ; %else || : @@ -235,6 +241,11 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so %{_includedir}/mozjs-%{major}/ %changelog +* Mon Feb 17 2020 Kalev Lember - 60.9.0-4 +- Update enddianness.patch with more s390x fixes +- Enable tests on s390x again +- Resolves: #1803824 + * Tue Sep 10 2019 Kalev Lember - 60.9.0-3 - Fix multilib conflicts in js-config.h