Rooting for GC values live across try_call may be missing, causing GC heap corruption
Description
Impact
When compiling a Wasm module that uses GC references, a GC reference that is live across a try_call may, in certain conditions, not be properly rooted. If the callee causes a garbage collection, that reference may become stale or dangling, causing further issues including GC heap corruption or other incorrect execution.
Every Wasmtime version with GC and exceptions is affected by this issue. Both GC and exceptions are on-by-default in Wasmtime v47 and above.
Patches
The fix is present in main and patch releases are made for 48.0.4 and 49.0.2.
Workarounds
Disable exception support in the CLI via -W exceptions=n or the API via Config::wasm_exceptions(false).