Hi,
This bug #824663 is a clone of bug #783293, which was assigned to both
libqtwebkit4 (qtwebkit) and libjavascriptcoregtk-3.0-0 (webkitgtk), but
only solved for the latter.
In message #77 this bug was marked as wontfix for qt until a patch
would show up that would make jitting optional for non-SSE2
architectures. I think the patches mentioned below do just that.
I ran into the bug when using Anki (a flashcard learning program) on a
Debian Jessie on an AMD Athlon XP, a non-SSE2 CPU. Anki crashes with
"Illegal instruction" after clicking the statistics/bar chart button in
the top right of the start screen.
Versions:
anki 2.0.31+dfsg-1
python-qt4 4.11.2+dfsg-1
libqtwebkit4 2.3.4.dfsg-3
Backtrace showed:
#1 0xb44e9db5 in JSC::Interpreter::executeCall (this=0xfffffffb,
callFrame=0xbfffad30, function=0xafab1700, callType=3026728505,
callData=0xb5088000, thisValue=..., args=0xbfffad5c)
at
/build/qtwebkit-bZFpMD/qtwebkit-2.3.4.dfsg/Source/JavaScriptCore/jit/JITCode.h:134
(gdb) display/i $pc shows a MOVSD instruction.
I then applied the [webkitgtk patch] to qtwebkit, except to a
different file. Attached is the patch for qtwebkit as I applied it.
Using a libqtwebkit4 built with this patch, Anki no longer crashes
when clicking the statistics/bar chart button. I have not noticed any
regressions.
Best regards,
Peter
[webkitgtk patch]:
https://anonscm.debian.org/cgit/pkg-webkit/webkit.git/tree/debian/patches/disable-jit-nonsse2.patch
--- qtwebkit-2.3.4.dfsg.orig/Source/JavaScriptCore/runtime/JSGlobalData.cpp
+++ qtwebkit-2.3.4.dfsg/Source/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -109,6 +109,11 @@
if (!executableAllocator.isValid() || (!Options::useJIT() && !Options::useRegExpJIT()))
return false;
+#if CPU(X86)
+ if (!MacroAssembler::supportsFloatingPoint())
+ return false;
+#endif
+
#if USE(CF)
#if COMPILER(GCC) && !COMPILER(CLANG)
// FIXME: remove this once the EWS have been upgraded to LLVM.