Bug 269024 - [Wasm-GC] Fix subtype hashing
Summary: [Wasm-GC] Fix subtype hashing
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-02-08 15:47 PST by Asumu Takikawa
Modified: 2024-02-13 10:13 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-02-08 15:47:38 PST
The following test case, that passes the reference interpreter, currently fails:

```
  instantiate(`
    (module
      (rec
        (type (sub (struct)))
        (type (sub final 0 (struct (field i32 (ref 0)))))
        (type (sub 0 (struct (field i32 (ref 0)))))
        (type (sub 2 (struct (field i32 (ref 0))))) ;; valid subtype
      )
    )
  `);
```

(goes in wasm/gc/sub.js)

The bug appears to be that hashing of sub types is slightly wrong and doesn't account for the final flag.
Comment 1 Asumu Takikawa 2024-02-08 16:12:10 PST
Pull request: https://github.com/WebKit/WebKit/pull/24106
Comment 2 EWS 2024-02-13 10:12:33 PST
Committed 274555@main (e588a9dece40): <https://commits.webkit.org/274555@main>

Reviewed commits have been landed. Closing PR #24106 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2024-02-13 10:13:15 PST
<rdar://problem/122890814>