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
Like `ExternRef::from_raw` does.
This is because while `to_raw` clones the GC ref, it also exposes it to Wasm,
inserting it into the DRC collector's table, which effectively gives ownership
of that clone to Wasm. Then, if we don't clone in `from_raw`, when a GC is
triggered, the DRC collector will see that Wasm isn't holding the ref alive
anymore and will decref (and perhaps even deallocate) it, which leaves the
`AnyRef` we constructed via `from_raw` dangling.
Fixesbytecodealliance#10182
0 commit comments