Source: qtscript-opensource-src Version: 5.10.1+dfsg-2 Severity: normal Tags: patch User: debian-sparc@lists.debian.org Usertags: sparc64
Hi! I just noticed there is an easy workaround to address the Javascript crashes on sparc64 [1]. JavaScriptCore allows one to use a 32-bit JSValue - even on 64-bit systems. In fact, this is done on PPC64 for some reason. I have tried this for sparc64 as well and it seems that the Javascript engine works correctly with that change. Attaching a patch, please include in the next upload. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Description: Use 32-bit JSValue on sparc64 sparc64 has a very large virtual address space such that 64-bit tagged pointers can become corrupted. Workaround this problem by limiting JSValue to 32 bits. . Author: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> Last-Update: 2018-06-28 --- qtscript-opensource-src-5.10.1+dfsg.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +++ qtscript-opensource-src-5.10.1+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h @@ -960,9 +960,9 @@ #endif #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) -#if (CPU(X86_64) && !CPU(X32) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(S390X) +#if (CPU(X86_64) && !CPU(X32) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(MIPS64) || CPU(AARCH64) || CPU(S390X) #define WTF_USE_JSVALUE64 1 -#elif CPU(ARM) || CPU(PPC64) +#elif CPU(ARM) || CPU(PPC64) || CPU(SPARC64) #define WTF_USE_JSVALUE32 1 #elif OS(WINDOWS) && COMPILER(MINGW) /* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg