pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/spidermonkey52 spidermonkey52: work around GCC op...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a973d8e4a140
branches:  trunk
changeset: 413188:a973d8e4a140
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Mon Mar 16 13:30:57 2020 +0000

description:
spidermonkey52: work around GCC optimizer bug

diffstat:

 lang/spidermonkey52/distinfo                                                   |   4 +-
 lang/spidermonkey52/patches/patch-js_src_jit_x86-shared_Constants-x86-shared.h |  20 ++++++++++
 lang/spidermonkey52/patches/patch-js_src_jsapi-tests_testPrintf.cpp            |  14 +++++++
 3 files changed, 37 insertions(+), 1 deletions(-)

diffs (60 lines):

diff -r acad60d3f455 -r a973d8e4a140 lang/spidermonkey52/distinfo
--- a/lang/spidermonkey52/distinfo      Mon Mar 16 13:22:20 2020 +0000
+++ b/lang/spidermonkey52/distinfo      Mon Mar 16 13:30:57 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2019/10/08 21:34:15 jklos Exp $
+$NetBSD: distinfo,v 1.9 2020/03/16 13:30:57 tnn Exp $
 
 SHA1 (mozjs-52.7.4.tar.bz2) = ff009853040bb46017204fda4ed69a79484fd321
 RMD160 (mozjs-52.7.4.tar.bz2) = 71ee71c2444d8b6a1b2b3c744c9f52a2b7129879
@@ -10,6 +10,8 @@
 SHA1 (patch-intl_icu_source_configure) = 1ff1be8ca68566e153219e15b8db696afd08b746
 SHA1 (patch-js_src_gc_Memory.cpp) = b1bb0c3045163d586c0b4d731d0ed7c23f339f3c
 SHA1 (patch-js_src_jit_IonBuilder.cpp) = b8be1d71d01c5f0e1b1016500be862b73e68df1b
+SHA1 (patch-js_src_jit_x86-shared_Constants-x86-shared.h) = d09ae908a64c8707014694f94134ab7600a52727
+SHA1 (patch-js_src_jsapi-tests_testPrintf.cpp) = e9dcb1be3d7eae8da97ff5368b29cc11b3e04f56
 SHA1 (patch-js_src_jsnativestack.cpp) = 3d0b06ccc3e24b408b97d01faa7758353f2edc85
 SHA1 (patch-js_src_old-configure_in) = 4fd3df4abde94758429d943641e1bd7bad3ca926
 SHA1 (patch-js_src_tests_update-test262.sh) = 10d73d95f4b849090bccb8fe656df79cbcea89f3
diff -r acad60d3f455 -r a973d8e4a140 lang/spidermonkey52/patches/patch-js_src_jit_x86-shared_Constants-x86-shared.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_jit_x86-shared_Constants-x86-shared.h    Mon Mar 16 13:30:57 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-js_src_jit_x86-shared_Constants-x86-shared.h,v 1.1 2020/03/16 13:30:57 tnn Exp $
+
+Since invalid_reg is a valid value for enum RegisterID, it must also
+be acceptable to call GPRegName64 with invalid_reg as input, otherwise
+GCC stupidly thinks we may pass null as a format string argument:
+
+js/src/jit/x64/BaseAssembler-x64.h:596:13: error: '%s' directive argument
+ is null [-Werror=format-overflow=]
+596: spew("movq       " MEM_obs ", %s", ADDR_obs(offset, base, index, scale), GPReg64Name(dst));
+
+--- js/src/jit/x86-shared/Constants-x86-shared.h.orig  2018-04-28 01:04:03.000000000 +0000
++++ js/src/jit/x86-shared/Constants-x86-shared.h
+@@ -61,6 +61,7 @@ inline const char* GPReg64Name(RegisterI
+ #ifdef JS_CODEGEN_X64
+        ,"%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
+ #endif
++      , "invalid_reg"
+     };
+     MOZ_ASSERT(size_t(reg) < mozilla::ArrayLength(names));
+     return names[reg];
diff -r acad60d3f455 -r a973d8e4a140 lang/spidermonkey52/patches/patch-js_src_jsapi-tests_testPrintf.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_jsapi-tests_testPrintf.cpp       Mon Mar 16 13:30:57 2020 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-js_src_jsapi-tests_testPrintf.cpp,v 1.1 2020/03/16 13:30:57 tnn Exp $
+
+testPrintf.cpp:58:20: error: '%s' directive argument is null [-Werror=format-overflow=]
+
+--- js/src/jsapi-tests/testPrintf.cpp.orig     2018-04-28 01:04:03.000000000 +0000
++++ js/src/jsapi-tests/testPrintf.cpp
+@@ -55,7 +55,6 @@ BEGIN_TEST(testPrintf)
+     CHECK(print_one("27270", "%zu", (size_t) 27270));
+     CHECK(print_one("27270", "%" PRIuSIZE, (size_t) 27270));
+     CHECK(print_one("hello", "he%so", "ll"));
+-    CHECK(print_one("(null)", "%s", zero()));
+     CHECK(print_one("0", "%p", (char *) 0));
+     CHECK(print_one("h", "%c", 'h'));
+     CHECK(print_one("1.500000", "%f", 1.5f));



Home | Main Index | Thread Index | Old Index