Bug 264649

Summary: [WASM-Function-References] call_ref should subtype-check its arguments
Product: WebKit Reporter: Asumu Takikawa <asumu>
Component: WebAssemblyAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bashorov, justin_michaud, keith_miller, mark.lam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 247393    

Description Asumu Takikawa 2023-11-10 18:23:43 PST
Right now call_ref uses type equality rather than subtyping to check its argument types

Example program that fails:

    (module
       (func (param eqref))
       (global (ref 0) (ref.func 0))
       (func (call_ref 0 (ref.i31 (i32.const 42)) (global.get 0)))
    )
Comment 1 Radar WebKit Bug Importer 2023-11-17 18:24:13 PST
<rdar://problem/118588656>
Comment 2 Asumu Takikawa 2023-12-05 13:31:18 PST
Pull request: https://github.com/WebKit/WebKit/pull/21353
Comment 3 EWS 2023-12-08 18:29:57 PST
Committed 271780@main (c64fed2494ab): <https://commits.webkit.org/271780@main>

Reviewed commits have been landed. Closing PR #21353 and removing active labels.