Bug 267357 - [Wasm-GC] Fix recursive return type index for struct.new_default
Summary: [Wasm-GC] Fix recursive return type index for struct.new_default
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 247394
  Show dependency treegraph
 
Reported: 2024-01-10 12:33 PST by Asumu Takikawa
Modified: 2024-01-11 14:45 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Asumu Takikawa 2024-01-10 12:33:04 PST
Minimal test case (goes in `structs.js` test):

```
  compile(`
     (module
       (rec (type (struct (field (ref null 0)))))
       (func (param (ref null 0)))
       (func
         (struct.new_default 0 (ref.null 0))
         (call 0))
     )
  `);
```

errors with `wasm.yaml/wasm/gc/structs.js.wasm-no-cjit: ASSERTION FAILED: subRTT.has_value() && parentRTT.has_value()`

The cause is there's a type expansion done at the wrong time in validation for `struct.new_default`, and has a very simple fix.
Comment 1 Asumu Takikawa 2024-01-10 13:39:43 PST
Pull request: https://github.com/WebKit/WebKit/pull/22615
Comment 2 EWS 2024-01-11 14:44:47 PST
Committed 272941@main (1619546caa40): <https://commits.webkit.org/272941@main>

Reviewed commits have been landed. Closing PR #22615 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2024-01-11 14:45:16 PST
<rdar://problem/120867628>