extern.internalize/externalize needs to preserve non-null input types
Categories
(Core :: JavaScript: WebAssembly, defect, P2)
Tracking
()
People
(Reporter: rhunt, Assigned: jpages)
References
Details
See [1] for spec text.
The following example should validate:
(func (param (ref extern)) (result (ref any)))
(extern.internalize (local.get 0))
)
However, looking at our validation rules [2], we don't have anything to preserve non-nullable information. So I am fairly sure this test case will fail to validate.
[1] https://webassembly.github.io/gc/core/valid/instructions.html#external-reference-instructions
[2] https://searchfox.org/mozilla-central/rev/02841791400cf7cf5760c0cfaf31f5d772624253/js/src/wasm/WasmValidate.cpp#738-739
| Assignee | ||
Updated•2 years ago
|
I think the non-nullable information is preserved in function readRefConversion [1]. And this test case validates.
[1] https://searchfox.org/mozilla-central/source/js/src/wasm/WasmOpIter.h#3885-3887
| Reporter | ||
Comment 2•2 years ago
|
||
Ah, I misread it and saw readConversion (which does not do that). That's what I get for not actually building and testing this. Thanks!
Description
•