<?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>260516</bug_id>
          
          <creation_ts>2023-08-22 05:29:21 -0700</creation_ts>
          <short_desc>[WASM] SEGV in JSC::Wasm::FunctionParser&lt;JSC::Wasm::LLIntGenerator&gt;::parseExpression</short_desc>
          <delta_ts>2023-12-14 10:10:17 -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>WebAssembly</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>
          
          <blocked>247394</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="CAO ZONG">cz18811105578</reporter>
          <assigned_to name="Asumu Takikawa">asumu</assigned_to>
          <cc>justin_michaud</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1972618</commentid>
    <comment_count>0</comment_count>
      <attachid>467386</attachid>
    <who name="CAO ZONG">cz18811105578</who>
    <bug_when>2023-08-22 05:29:21 -0700</bug_when>
    <thetext>Created attachment 467386
Reproducible poc

Commit: 5466cd2c24514bdeee05075d5a2eb35e8c146e40

Run Flag: --useWebAssemblyTypedFunctionReferences=true --useWebAssemblyGC=true

Backtrace:
```
#0  JSC::Wasm::FunctionParser&lt;JSC::Wasm::LLIntGenerator&gt;::parseExpression (this=this@entry=0x7fffa8a78348) at ../../Source/JavaScriptCore/wasm/WasmFunctionParser.h:2728
#1  0x0000555557f34f4b in JSC::Wasm::FunctionParser&lt;JSC::Wasm::LLIntGenerator&gt;::parseBody (this=this@entry=0x7fffa8a78348) at ../../Source/JavaScriptCore/wasm/WasmFunctionParser.h:366
#2  0x0000555557ecb64e in JSC::Wasm::FunctionParser&lt;JSC::Wasm::LLIntGenerator&gt;::parse (this=this@entry=0x7fffa8a78348) at ../../Source/JavaScriptCore/wasm/WasmFunctionParser.h:336
#3  0x0000555557ec9edf in JSC::Wasm::parseAndCompileBytecode (functionStart=0x7fffec00f480 &quot;&quot;, functionLength=&lt;optimized out&gt;, signature=..., info=..., 
    functionIndex=functionIndex@entry=0x0) at ../../Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:580
#4  0x0000555557fff3ba in JSC::Wasm::LLIntPlan::compileFunction (this=0x7fffec05d200, functionIndex=0x0) at ../../Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:89
#5  0x0000555557eaebd6 in JSC::Wasm::EntryPlan::compileFunctions (this=0x7fffec05d200, effort=&lt;optimized out&gt;) at ../../Source/JavaScriptCore/wasm/WasmEntryPlan.cpp:218
#6  0x000055555809a50f in JSC::Wasm::Worklist::Thread::work (this=0x7fffec02e1b0) at ../../Source/JavaScriptCore/wasm/WasmWorklist.cpp:111
#7  0x00005555582308b0 in WTF::AutomaticThread::start(WTF::AbstractLocker const&amp;)::$_0::operator()() const (this=&lt;optimized out&gt;) at ../../Source/WTF/wtf/AutomaticThread.cpp:229
#8  WTF::Detail::CallableWrapper&lt;WTF::AutomaticThread::start(WTF::AbstractLocker const&amp;)::$_0, void&gt;::call() (this=&lt;optimized out&gt;) at ../../Source/WTF/wtf/Function.h:53
#9  0x00005555582763a9 in WTF::Function&lt;void ()&gt;::operator()() const (this=&lt;optimized out&gt;) at ../../Source/WTF/wtf/Function.h:82
#10 WTF::Thread::entryPoint (newThreadContext=0x7fffec02ebb0) at ../../Source/WTF/wtf/Threading.cpp:250
#11 0x0000555558339543 in WTF::wtfThreadEntryPoint (context=0x5555587a53bc) at ../../Source/WTF/wtf/posix/ThreadingPOSIX.cpp:242
#12 0x00007ffff5fd8609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007ffff5ba5133 in clone () from /lib/x86_64-linux-gnu/libc.so.6
```

Segment fault when visitng the field of object inlineSignature while it is NULL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1974179</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-29 05:30:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/114622205&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1999033</commentid>
    <comment_count>2</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2023-12-12 10:48:18 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/21693</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1999625</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-12-14 10:10:14 -0800</bug_when>
    <thetext>Committed 272049@main (06ddd6593c2d): &lt;https://commits.webkit.org/272049@main&gt;

Reviewed commits have been landed. Closing PR #21693 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>467386</attachid>
            <date>2023-08-22 05:29:21 -0700</date>
            <delta_ts>2023-08-22 05:29:21 -0700</delta_ts>
            <desc>Reproducible poc</desc>
            <filename>poc1.js</filename>
            <type>text/javascript</type>
            <size>897</size>
            <attacher name="CAO ZONG">cz18811105578</attacher>
            
              <data encoding="base64">dmFyIHdhc21fY29kZSA9IG5ldyBVaW50OEFycmF5KFswLDk3LDExNSwxMDksMSwwLDAsMCwxLDE4
MiwxMjgsMTI4LDEyOCwwLDEwLDgwLDAsOTUsMCw4MCwwLDk1LDAs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