You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ wasm-opt x.wat -all --type-ssa -O2 --unsubtyping --roundtrip
[wasm-validator error in module] struct.new operand 0 must have proper type, on
(struct.new $84
(global.get $global$4)
)
Fatal: error after opts
After the unsubtyping pass the IR passes validation but is incorrect in some subtle way, which causes errors in roundtripping and other operations (e.g. --precompute instead of --roundtrip will also error, on some internal assertion).
I'd guess this is some subtle bug of Unsubtyping and/or the Type canonicalization logic. @tlively I think you know that code best, can you take a look?
When GlobalRefining refines the type of a global, it updates the type of
corresponding GlobalGet expressions, then runs ReFinalize to propagate the
refined types. However, it only performed these updates in function bodies,
leaving stale types on GlobalGet expressions in constant initializers. This bug
was not easily caught because the validator did not check that `GlobalGet` types
actually match the types of the corresponding globals.
Fix the validator to check the types of `GlobalGet` expressions and fix
GlobalRefining to properly update constant initializers.
Fixes#6565.
After the unsubtyping pass the IR passes validation but is incorrect in some subtle way, which causes errors in roundtripping and other operations (e.g.
--precompute
instead of--roundtrip
will also error, on some internal assertion).I'd guess this is some subtle bug of Unsubtyping and/or the Type canonicalization logic. @tlively I think you know that code best, can you take a look?
The text was updated successfully, but these errors were encountered: