summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-10-30 19:15:12 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-10-30 19:15:12 +0400
commit0bfed46c782f36c3281a128b879f4c60a05d1b2f (patch)
tree8bc05c7ea070432e611d7f1946f6281654a529b2
parentdfef26b908957b9a2bf6d629a56e71870b656c33 (diff)
downloadqt4-x11-0bfed46c782f36c3281a128b879f4c60a05d1b2f.tar.gz
qt4-x11 (4:4.8.5+dfsg-2+dyson4) unstable; urgency=low
* Added dyson-js-solaris-memory-layout.patch
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/dyson-js-solaris-memory-layout.patch129
-rw-r--r--debian/patches/series1
3 files changed, 136 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 3b20f7e..ee1e23a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qt4-x11 (4:4.8.5+dfsg-2+dyson4) unstable; urgency=low
+
+ * Added dyson-js-solaris-memory-layout.patch
+
+ -- Igor Pashev <pashev.igor@gmail.com> Wed, 30 Oct 2013 09:07:00 +0400
+
qt4-x11 (4:4.8.5+dfsg-2+dyson3) unstable; urgency=low
* Added dyson-solaris-use-system-malloc.patch
diff --git a/debian/patches/dyson-js-solaris-memory-layout.patch b/debian/patches/dyson-js-solaris-memory-layout.patch
new file mode 100644
index 0000000..fef0d57
--- /dev/null
+++ b/debian/patches/dyson-js-solaris-memory-layout.patch
@@ -0,0 +1,129 @@
+Description: Patch for Solaris 64-bit memory layout
+Bug-Dyson: http://osdyson.org/issues/160
+Bug-Dyson: http://osdyson.org/issues/145
+Bug-Dyson: http://osdyson.org/issues/159
+Bug-Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=577056
+Index: qt4-x11-4.8.5+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h
+===================================================================
+--- qt4-x11-4.8.5+dfsg.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h 2013-10-30 05:37:46.172467212 +0400
++++ qt4-x11-4.8.5+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h 2013-10-30 06:26:28.052147518 +0400
+@@ -196,19 +196,43 @@
+
+ static const int32_t signBit = 0x80000000;
+
++#if OS(SOLARIS64)
++// https://bugzilla.mozilla.org/show_bug.cgi?id=577056
++// Memory layout for 64-bit Solaris is different than other 64-bit systems.
++// http://developers.sun.com/solaris/articles/solaris_memory.html
++// User space memory may locate on PART-A (0xFFFFFD80.00000000 - 0xFFFF8000.00000000)
++// and PART-B (0x00008000.00000000 - 0x00000000.04000000).
++ static ALWAYS_INLINE bool isSolaris64StackPointer(JSValue v)
++ {
++ return ((rawValue(v) & 0xFFFF800000000000LL) == 0xFFFF800000000000LL);
++ }
++#endif
++
+ static ALWAYS_INLINE bool isImmediate(JSValue v)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++#endif
+ return rawValue(v) & TagMask;
+ }
+
+ static ALWAYS_INLINE bool isNumber(JSValue v)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++#endif
+ return rawValue(v) & TagTypeNumber;
+ }
+
+ static ALWAYS_INLINE bool isIntegerNumber(JSValue v)
+ {
+ #if USE(JSVALUE64)
++# if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++# endif
+ return (rawValue(v) & TagTypeNumber) == TagTypeNumber;
+ #else
+ return isNumber(v);
+@@ -218,23 +242,39 @@
+ #if USE(JSVALUE64)
+ static ALWAYS_INLINE bool isDouble(JSValue v)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++#endif
+ return isNumber(v) && !isIntegerNumber(v);
+ }
+ #endif
+
+ static ALWAYS_INLINE bool isPositiveIntegerNumber(JSValue v)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++#endif
+ // A single mask to check for the sign bit and the number tag all at once.
+ return (rawValue(v) & (signBit | TagTypeNumber)) == TagTypeNumber;
+ }
+
+ static ALWAYS_INLINE bool isBoolean(JSValue v)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++#endif
+ return (rawValue(v) & FullTagTypeMask) == FullTagTypeBool;
+ }
+
+ static ALWAYS_INLINE bool isUndefinedOrNull(JSValue v)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v))
++ return false;
++#endif
+ // Undefined and null share the same value, bar the 'undefined' bit in the extended tag.
+ return (rawValue(v) & ~ExtendedTagBitUndefined) == FullTagTypeNull;
+ }
+@@ -254,6 +294,10 @@
+
+ static ALWAYS_INLINE bool isEitherImmediate(JSValue v1, JSValue v2)
+ {
++#if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v1) && isSolaris64StackPointer(v2))
++ return false;
++#endif
+ return (rawValue(v1) | rawValue(v2)) & TagMask;
+ }
+
+@@ -265,6 +309,10 @@
+ static ALWAYS_INLINE bool areBothImmediateIntegerNumbers(JSValue v1, JSValue v2)
+ {
+ #if USE(JSVALUE64)
++# if OS(SOLARIS64)
++ if (isSolaris64StackPointer(v1) || isSolaris64StackPointer(v2))
++ return false;
++# endif
+ return (rawValue(v1) & rawValue(v2) & TagTypeNumber) == TagTypeNumber;
+ #else
+ return rawValue(v1) & rawValue(v2) & TagTypeNumber;
+Index: qt4-x11-4.8.5+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+===================================================================
+--- qt4-x11-4.8.5+dfsg.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2013-10-30 06:29:20.587349440 +0400
++++ qt4-x11-4.8.5+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2013-10-30 06:30:45.148834844 +0400
+@@ -427,6 +427,9 @@
+ /* OS(SOLARIS) - Solaris */
+ #if defined(sun) || defined(__sun)
+ #define WTF_OS_SOLARIS 1
++#if defined(__LP64__)
++#define WTF_OS_SOLARIS64 1
++#endif
+ #endif
+
+ /* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
diff --git a/debian/patches/series b/debian/patches/series
index 78b3471..a5c9cc7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -70,3 +70,4 @@ pkgsrc/patch-src_3rdparty_webkit_Source_WebCore_platform_qt_PlatformKeyboardEven
pkgsrc/patch-src_3rdparty_webkit_Source_WebKit_qt_Api_qgraphicswebview.cpp
pkgsrc/patch-src_3rdparty_webkit_Source_WebKit_qt_WebCoreSupport_NotificationPresenterClientQt.cpp
dyson-solaris-use-system-malloc.patch
+dyson-js-solaris-memory-layout.patch