<?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>247452</bug_id>
          
          <creation_ts>2022-11-03 12:35:04 -0700</creation_ts>
          <short_desc>unhelpful error message for TableGrow</short_desc>
          <delta_ts>2022-11-14 03:05:07 -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 Nightly 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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Degazio">d_degazio</reporter>
          <assigned_to name="David Degazio">d_degazio</assigned_to>
          <cc>angelos</cc>
    
    <cc>d_degazio</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1910153</commentid>
    <comment_count>0</comment_count>
    <who name="David Degazio">d_degazio</who>
    <bug_when>2022-11-03 12:35:04 -0700</bug_when>
    <thetext>rdar://101241285

When typed function references are enabled, the TypeKind of the Funcref and Externref types becomes RefNull. This causes examples such as

    (module
      (type (;0;) (func (result i32)))
      (func (;0;) (type 0) (result i32)
        (local externref funcref)
        local.get 0
        i32.const 1
        table.grow 0)
      (table (;0;) 500 2000 funcref)
      (table (;1;) 500 2000 externref))

to result in unhelpful error messages like `table.grow expects fill value of type RefNull got RefNull, in function at index 0`. 

Since typed function references are just one instance of the WebAssembly type system becoming more complex in newer proposals, this is probably a good opportunity to improve our error messages in general to log more of the available type information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910164</commentid>
    <comment_count>1</comment_count>
    <who name="David Degazio">d_degazio</who>
    <bug_when>2022-11-03 13:17:55 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/6098</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911162</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-08 18:32:52 -0800</bug_when>
    <thetext>Committed 256472@main (e04540b26853): &lt;https://commits.webkit.org/256472@main&gt;

Reviewed commits have been landed. Closing PR #6098 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912258</commentid>
    <comment_count>3</comment_count>
    <who name="Angelos Oikonomopoulos">angelos</who>
    <bug_when>2022-11-14 03:05:07 -0800</bug_when>
    <thetext>Caused a trivial regression on 32-bit ARM, see https://bugs.webkit.org/show_bug.cgi?id=247886.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>