RESOLVED DUPLICATE of bug 254695258219
[Wasm-GC] Add support for bottom heap types
https://bugs.webkit.org/show_bug.cgi?id=258219
Summary [Wasm-GC] Add support for bottom heap types
bashorov
Reported 2023-06-16 12:48:24 PDT
Created attachment 466719 [details] test Steps to reproduce: 1. Unpack the attached file. 2. Run `jsc --useWebAssemblyTypedFunctionReferences=true --useWebAssemblyGC=true --module-file=test.mjs` Actual results: Exception: CompileError: WebAssembly.Module doesn't parse at byte 3: ref.null heaptype must be funcref, externref or type_idx, in function at index 0 (evaluating 'new WebAssembly.Module(wasmBuffer)') Module@[native code] Expected results: No errors -- Related tests in the GC proposal repo: https://github.com/WebAssembly/gc/blob/main/test/core/gc/ref_cast.wast https://github.com/WebAssembly/gc/blob/main/test/core/gc/ref_test.wast
Attachments
test (2.34 KB, application/zip)
2023-06-16 12:48 PDT, bashorov
no flags
Asumu Takikawa
Comment 1 2023-06-17 11:00:42 PDT
Thanks for this bug report, I think it might be a duplicate of this existing one though: https://bugs.webkit.org/show_bug.cgi?id=254695
Radar WebKit Bug Importer
Comment 2 2023-06-23 12:49:18 PDT
David Degazio
Comment 3 2024-07-30 16:26:16 PDT
As far as I can tell, the encoding here has actually changed since this bug was opened, and the attached WASM binary is no longer valid. Specifically, it has the following sequence: d065 ;; ref.null none 1a d069 ;; ref.null nofunc 1a d068 ;; ref.null noextern 1a Specifically using 0x65, 0x69, and 0x68 to represent heap types none, nofunc, and noextern respectively. Per the current GC proposal spec though (https://webassembly.github.io/gc/core/binary/types.html#binary-heaptype), these should actually be encoded as 0x71, 0x73, and 0x72. Recompiling the attached test.wat with wasm-as version 118 produces a different binary with these new heaptypes, which JSC seems to handle without issue. So, support for none, nofunc, and noextern is working as expected, and I'll resolve this as a dupe of Asumu's other bug. *** This bug has been marked as a duplicate of bug 254695 ***
Note You need to log in before you can comment on or make changes to this bug.