<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>222805</bug_id>
          
          <creation_ts>2021-03-05 08:52:14 -0800</creation_ts>
          <short_desc>Crash with &quot;invalid opcode&quot; if the CPU does not support SSE4</short_desc>
          <delta_ts>2023-08-17 13:52:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>220889</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>calvin.walton</cc>
    
    <cc>cgarcia</cc>
    
    <cc>dennisn</cc>
    
    <cc>jernej.jakob+webkit</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>nekohayo</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1736361</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-03-05 08:52:14 -0800</bug_when>
    <thetext>A user reported this crash with WebKitGTK 2.30.5 after opening www.avito.ru , selecting &quot;Вход и регистрация&quot; on the upper right corner and simply waiting for a few seconds.

(gdb) layout asm
&gt;│0x7f00eb999254 &lt;wasm_entry+56936&gt;       roundss $0x2,%xmm0,%xmm1     │
 │0x7f00eb99925a &lt;wasm_entry+56942&gt;       movsbq 0x1(%r13,%r8,1),%r9   │
 │0x7f00eb999260 &lt;wasm_entry+56948&gt;       movss  %xmm1,0x0(%rbp,%r9,8) │
 │0x7f00eb999267 &lt;wasm_entry+56955&gt;       add    $0x3,%r8              │

This is a 64-bit build but the CPU is an old Intel Core 2 without SSE4 instructions. Disabling the JIT (&quot;JavaScriptCoreUseJIT=0&quot;) 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738910</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-12 08:53:17 -0800</bug_when>
    <thetext>&lt;rdar://problem/75363426&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739359</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2021-03-15 03:57:58 -0700</bug_when>
    <thetext>Is this a duplicate of bug #222358?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739400</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-03-15 06:03:40 -0700</bug_when>
    <thetext>(In reply to Alberto Garcia from comment #0)
&gt; should WebKit disable the JIT conditionally in these cases?

That would be ideal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739660</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-03-15 14:14:10 -0700</bug_when>
    <thetext>*** Bug 222358 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739876</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2021-03-16 01:54:59 -0700</bug_when>
    <thetext>Can we just disable JIT when SSE4 is not available?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739904</commentid>
    <comment_count>6</comment_count>
    <who name="Jernej Jakob">jernej.jakob+webkit</who>
    <bug_when>2021-03-16 05:09:28 -0700</bug_when>
    <thetext>JSC_useBaselineJIT=0 also fixes it for me. I have that exported in my environment .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739911</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-03-16 06:15:15 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #5)
&gt; Can we just disable JIT when SSE4 is not available?

Please, though I&apos;m not sure how to test for that easily.

I checked and Fedora&apos;s baseline is SSE2. I guess Debian&apos;s is probably the same, so we would want to check for SSE3 really.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739913</commentid>
    <comment_count>8</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-03-16 06:24:23 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #7)
&gt; I checked and Fedora&apos;s baseline is SSE2. I guess Debian&apos;s is probably the
&gt; same, so we would want to check for SSE3 really.

It is, according to https://wiki.debian.org/ArchitectureSpecificsMemo#amd64:

&quot;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.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971901</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-08-17 13:41:48 -0700</bug_when>
    <thetext>This issue is basically the same as bug #220889 and there is a patch there with review feedback, so let&apos;s treat this one as the duplicate.

*** This bug has been marked as a duplicate of bug 220889 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971904</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-08-17 13:45:55 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>