Bug 222805
Summary: | Crash with "invalid opcode" if the CPU does not support SSE4 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alberto Garcia <berto> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | calvin.walton, cgarcia, dennisn, jernej.jakob+webkit, mcatanzaro, nekohayo, webkit-bug-importer, xan.lopez |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Alberto Garcia
A user reported this crash with WebKitGTK 2.30.5 after opening www.avito.ru , selecting "Вход и регистрация" on the upper right corner and simply waiting for a few seconds.
(gdb) layout asm
>│0x7f00eb999254 <wasm_entry+56936> roundss $0x2,%xmm0,%xmm1 │
│0x7f00eb99925a <wasm_entry+56942> movsbq 0x1(%r13,%r8,1),%r9 │
│0x7f00eb999260 <wasm_entry+56948> movss %xmm1,0x0(%rbp,%r9,8) │
│0x7f00eb999267 <wasm_entry+56955> add $0x3,%r8 │
This is a 64-bit build but the CPU is an old Intel Core 2 without SSE4 instructions. Disabling the JIT ("JavaScriptCoreUseJIT=0") seems to solve the problem.
I assume that there is no plan to support such old hardware, but is this simply a WONTFIX or should WebKit disable the JIT conditionally in these cases?
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/75363426>
Carlos Garcia Campos
Is this a duplicate of bug #222358?
Michael Catanzaro
(In reply to Alberto Garcia from comment #0)
> should WebKit disable the JIT conditionally in these cases?
That would be ideal.
Michael Catanzaro
*** Bug 222358 has been marked as a duplicate of this bug. ***
Carlos Garcia Campos
Can we just disable JIT when SSE4 is not available?
Jernej Jakob
JSC_useBaselineJIT=0 also fixes it for me. I have that exported in my environment .
Michael Catanzaro
(In reply to Carlos Garcia Campos from comment #5)
> Can we just disable JIT when SSE4 is not available?
Please, though I'm not sure how to test for that easily.
I checked and Fedora's baseline is SSE2. I guess Debian's is probably the same, so we would want to check for SSE3 really.
Alberto Garcia
(In reply to Michael Catanzaro from comment #7)
> I checked and Fedora's baseline is SSE2. I guess Debian's is probably the
> same, so we would want to check for SSE3 really.
It is, according to https://wiki.debian.org/ArchitectureSpecificsMemo#amd64:
"x86_64 with no optional extensions. The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed."
Michael Catanzaro
This issue is basically the same as bug #220889 and there is a patch there with review feedback, so let's treat this one as the duplicate.
*** This bug has been marked as a duplicate of bug 220889 ***
Michael Catanzaro
Well, one possibility not contemplated in bug #220889 would be to automatically disable the JIT if the system does not support SSE4. If somebody wants to attempt that, we could reopen this one.