<?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>253501</bug_id>
          
          <creation_ts>2023-03-07 03:07:50 -0800</creation_ts>
          <short_desc>[WebAssembly] Tanks demo crashes</short_desc>
          <delta_ts>2023-03-09 10:34:08 -0800</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>253618</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=253618</see_also>
          <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="Jim Mason">jmason</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>d_degazio</cc>
    
    <cc>joseph.j.griego</cc>
    
    <cc>justin_michaud</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1939413</commentid>
    <comment_count>0</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2023-03-07 03:07:50 -0800</bug_when>
    <thetext>Solaris/x86_64

Sometime between r259365@main (still working) and r261276@main (failing), the WebAssembly Tanks demo stopped working for me.  The Tanks demo is here:

    http://webassembly.org.cn/demo/Tanks/

Not sure if this is just me, or whether it is failing now for everyone with the new BBQ code.

Upon loading the demo, the worker segmentation faults.  Backtrace is as follows:

&gt; Thread 39 received signal SIGSEGV, Segmentation fault.
&gt; [Switching to Thread 24 (LWP 24)]
&gt; 0x00007ff051ec525a in JSC::LinkBuffer::linkCode(JSC::MacroAssembler&amp;, JSC::JITCompilationEffort) () from /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; (gdb) bt
&gt; #0  0x00007ff051ec525a in JSC::LinkBuffer::linkCode(JSC::MacroAssembler&amp;, JSC::JITCompilationEffort) () at
&gt;  /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; #1  0x00007ff0531617eb in JSC::Wasm::BBQPlan::work(JSC::Wasm::Plan::CompilationEffort) () at 
&gt; /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; #2  0x00007ff0532739e0 in JSC::Wasm::Worklist::Thread::work() ()
&gt;    at /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; #3  0x00007ff053364d6b in WTF::Detail::CallableWrapper&lt;WTF::AutomaticThread::start(WTF::AbstractLocker const&amp;)::{lambda()#1}, void&gt;::call() ()
&gt;    at /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; #4  0x00007ff0533955d5 in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) () at /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; #5  0x00007ff053411249 in WTF::wtfThreadEntryPoint(void*) ()
&gt;    at /usr/lib/64/libjavascriptcoregtk-4.0.so.18
&gt; #6  0x00007ff05a0f7ba9 in _thrp_setup () at /lib/64/libc.so.1
&gt; #7  0x00007ff05a0f7e50 in _lwp_start () at /lib/64/libc.so.1
&gt; #8  0x0000000000000000 in  ()

Other WA demos like the Video Editor (https://d2jta7o2zej4pf.cloudfront.net/) still work fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1939579</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2023-03-07 15:58:35 -0800</bug_when>
    <thetext>Thanks. This does not happen on macOS. So this is GTK / Solaris specific issue.
But I don&apos;t think we are supporting JIT on Solaris.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1939582</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-07 16:11:56 -0800</bug_when>
    <thetext>We can&apos;t accept JSC crash reports in WebKitGTK component. Down that path lies only madness. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1939583</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-07 16:12:07 -0800</bug_when>
    <thetext>&lt;rdar://problem/106386416&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940027</commentid>
    <comment_count>4</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2023-03-09 05:08:08 -0800</bug_when>
    <thetext>I found the commit that broke this:

    Enable single-pass BBQ baseline JIT by default
    https://commits.webkit.org/261153@main

Reverting the commit and thus returning to the legacy Air implementation restores the Tanks demo.

The commit notes say, &apos;One notable hole in the new JIT&apos;s support is in some of the recent WASM extensions: typed function references, tail calls, and GC. Since these are still incomplete currently, and disabled by default, single-pass BBQ doesn&apos;t yet support them.&apos;

Is the failure of the Tanks demo due to this incomplete implementation?  Tanks is the only demo which is failing; outside of that, JIT and WASM continue to function normally for me with the single-pass BBQ.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940113</commentid>
    <comment_count>5</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2023-03-09 10:28:18 -0800</bug_when>
    <thetext>Apparently, this is caused by the same issue described in Bug 253618.

I can confirm the patch for that issue, 261417@main, clears the Tanks demo crash on Solaris.

Thanks to Asumu Takikawa &lt;asumu@igalia.com&gt; for the analysis and fix!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940120</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-09 10:34:08 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 253618 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>