bstinson / rpms / mozjs60

Forked from rpms/mozjs60 5 years ago
Clone

Blame SOURCES/jsproperty-endian.patch

e43f4b
From a95105b7846c29c5bd3868719621ab3679d9932b Mon Sep 17 00:00:00 2001
e43f4b
From: rpm-build <rpm-build>
e43f4b
Date: Sat, 7 Sep 2019 21:45:58 +0200
e43f4b
Subject: [PATCH] jsproperty-endian.patch
e43f4b
e43f4b
Bug 1543659 - fix JSPropertySpec::ValueWrapper on 64-bit big-endian platforms
e43f4b
e43f4b
Add some padding to make the union's int32 member correspond to the
e43f4b
low-order bits of the string member.  This fixes TypedArray tests on
e43f4b
s390x.
e43f4b
---
e43f4b
 js/src/jsapi.h | 7 +++++++
e43f4b
 1 file changed, 7 insertions(+)
e43f4b
e43f4b
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
e43f4b
index 0f11787f6..f1c084f6a 100644
e43f4b
--- a/js/src/jsapi.h
e43f4b
+++ b/js/src/jsapi.h
e43f4b
@@ -1581,7 +1581,14 @@ struct JSPropertySpec {
e43f4b
     uintptr_t type;
e43f4b
     union {
e43f4b
       const char* string;
e43f4b
+#if MOZ_BIG_ENDIAN && JS_BITS_PER_WORD == 64
e43f4b
+      struct {
e43f4b
+        uint32_t padding;
e43f4b
+        int32_t int32;
e43f4b
+      };
e43f4b
+#else
e43f4b
       int32_t int32;
e43f4b
+#endif
e43f4b
     };
e43f4b
   };
e43f4b
 
e43f4b
-- 
e43f4b
2.23.0
e43f4b