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 cannot prove that, in all the code paths that lead to reading local.get $1 after the big block $1, the variable was initialized. That's fair, since it wouldn't be initialized if we caught an exception; we know that we cannot reach there in that case (because of the re-throw) but Wasm validation cannot prove it. Since $1 has a non-nullable reference type (ref $c.Some), that is not valid code.
We have to always use a defaultable type for the partial results involved in try..finallys (which means we have to cast away nullability when we read them).
The text was updated successfully, but these errors were encountered:
…y`s.
As well as for the locals of `Labeled` blocks whose `Return`s cross
a `try..finally` boundary.
If their original type was not defaultable, we cast away
nullability when reading them back.
Reproduction:
produces invalid Wasm code. Trying to run the program yields
The pretty-printed code for the function is
Wasm cannot prove that, in all the code paths that lead to reading
local.get $1
after the bigblock $1
, the variable was initialized. That's fair, since it wouldn't be initialized if we caught an exception; we know that we cannot reach there in that case (because of the re-throw) but Wasm validation cannot prove it. Since$1
has a non-nullable reference type(ref $c.Some)
, that is not valid code.We have to always use a defaultable type for the partial results involved in
try..finally
s (which means we have to cast away nullability when we read them).The text was updated successfully, but these errors were encountered: