Bug 266127 - [Wasm-GC] Local init tracking should track unreachable local.set too
Summary: [Wasm-GC] Local init tracking should track unreachable local.set too
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: 2023-12-08 18:38 PST by Asumu Takikawa
Modified: 2023-12-11 20:47 PST (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 Asumu Takikawa 2023-12-08 18:38:04 PST
Example test cases:

```
//@ runWebAssemblySuite("--useWebAssemblyTypedFunctionReferences=true", "--useWebAssemblyGC=true")

import * as assert from "../assert.js";
import { compile } from "./wast-wrapper.js";

function testUnreachable()
{
  // A local.set in unreachable code should still count for init.
  compile(`
    (module
      (type (struct))
      (func (local (ref 0))
        (unreachable)
        (local.set 0 (struct.new 0))
        (local.get 0)
        drop))
  `);

  compile(`
    (module
      (type (struct))
      (func (local (ref 0))
        (unreachable)
        (local.tee 0 (struct.new 0))
        drop
        (local.get 0)
        drop))
  `);
}

testUnreachable()
```

These currently fail but should validate.
Comment 1 Asumu Takikawa 2023-12-08 18:49:53 PST
Pull request: https://github.com/WebKit/WebKit/pull/21555
Comment 2 EWS 2023-12-11 20:45:55 PST
Committed 271910@main (025c31d1220e): <https://commits.webkit.org/271910@main>

Reviewed commits have been landed. Closing PR #21555 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-12-11 20:47:14 PST
<rdar://problem/119533296>