Index: qtwebkit/Source/JavaScriptCore/wtf/Platform.h =================================================================== --- qtwebkit.orig/Source/JavaScriptCore/wtf/Platform.h 2013-12-10 19:58:35.228838500 +0400 +++ qtwebkit/Source/JavaScriptCore/wtf/Platform.h 2013-12-18 00:39:02.801401856 +0400 @@ -480,6 +480,19 @@ #define WTF_OS_UNIX 1 #endif +#ifndef WTF_OS_SOLARIS_AMD64 +# if OS(SOLARIS) && CPU(X86_64) +# define WTF_OS_SOLARIS_AMD64 1 +# else +# define WTF_OS_SOLARIS_AMD64 0 +# endif +#endif + +// JIT needs to be ported to solaris/amd64 memory layout: +#if OS(SOLARIS_AMD64) +# define ENABLE_JIT 0 +#endif + /* Operating environments */ /* FIXME: these are all mixes of OS, operating environment and policy choices. */ Index: qtwebkit/Source/JavaScriptCore/runtime/JSValue.h =================================================================== --- qtwebkit.orig/Source/JavaScriptCore/runtime/JSValue.h 2011-12-25 23:12:15.000000000 +0400 +++ qtwebkit/Source/JavaScriptCore/runtime/JSValue.h 2013-12-16 19:45:12.002798264 +0400 @@ -362,6 +362,17 @@ #endif EncodedValueDescriptor u; + +#if OS(SOLARIS_AMD64) +// https://bugzilla.mozilla.org/show_bug.cgi?id=577056 +// Memory layout for 64-bit Solaris is different than other 64-bit systems. +// User space memory may locate on PART-A (0xFFFFFD80.00000000 - 0xFFFF8000.00000000) +// and PART-B (0x00008000.00000000 - 0x00000000.04000000). + ALWAYS_INLINE bool isSolarisAMD64StackPointer() const + { + return ((u.asInt64 & 0xFFFF800000000007LL) == 0xFFFF800000000000LL); + } +#endif }; #if USE(JSVALUE32_64) Index: qtwebkit/Source/JavaScriptCore/runtime/JSValueInlineMethods.h =================================================================== --- qtwebkit.orig/Source/JavaScriptCore/runtime/JSValueInlineMethods.h 2011-12-25 23:12:15.000000000 +0400 +++ qtwebkit/Source/JavaScriptCore/runtime/JSValueInlineMethods.h 2013-12-16 19:51:19.814996750 +0400 @@ -482,11 +482,19 @@ inline bool JSValue::isCell() const { +#if OS(SOLARIS_AMD64) + if (isSolarisAMD64StackPointer()) + return true; +#endif return !(u.asInt64 & TagMask); } inline bool JSValue::isInt32() const { +#if OS(SOLARIS_AMD64) + if (isSolarisAMD64StackPointer()) + return false; +#endif return (u.asInt64 & TagTypeNumber) == TagTypeNumber; } @@ -516,6 +524,10 @@ inline bool JSValue::isNumber() const { +#if OS(SOLARIS_AMD64) + if (isSolarisAMD64StackPointer()) + return false; +#endif return u.asInt64 & TagTypeNumber; }