Bug 254178 - [Wasm-GC] Air assertion failure when casting to nullref
Summary: [Wasm-GC] Air assertion failure when casting to nullref
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 247394
  Show dependency treegraph
 
Reported: 2023-03-20 13:23 PDT by Tim Chevalier
Modified: 2023-03-21 14:33 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Chevalier 2023-03-20 13:23:01 PDT
An existing test, https://searchfox.org/wubkat/source/JSTests/wasm/gc/casts.js , fails in the wasm-simd, wasm-bbq, and wasm-air configurations when running the run-jsc-stress-tests script. I'm not sure why the test isn't being run with these configurations in CI.

The output is:
```
wasm.yaml/wasm/gc/casts.js.wasm-simd: ASSERTION FAILED: isSubtype(src.type(), dst.type())
wasm.yaml/wasm/gc/casts.js.wasm-simd: /home/tjc/WebKit/Source/JavaScriptCore/wasm/WasmAirIRGenerator64.cpp(701) : void JSC::Wasm::AirIRGenerator64::emitMove(const JSC::Wasm::TypedTmp&, const JSC::Wasm::TypedTmp&)
```

and the specific test case causing the error is the first one in `testNullCasts()`:

```
        (func (param arrayref) (result nullref)
          (ref.cast none (local.get 0)))
```

I'll submit a PR.
Comment 1 EWS 2023-03-21 14:32:06 PDT
Committed 261935@main (bd06994b39e7): <https://commits.webkit.org/261935@main>

Reviewed commits have been landed. Closing PR #11730 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-03-21 14:33:15 PDT
<rdar://problem/107021321>