alexcrichton opened issue #15256:
If a global initializer traps during instantiation, serializing the resulting core dump panics in debug builds when a later global has a non-nullable reference type:
(module (type $a (array i64)) (global $g0 (ref $a) (array.new_default $a (i32.const 0x7fffffff))) (global $g1 (ref $a) (array.new_default $a (i32.const 1))))$ wasmtime run -W gc=y -D coredump=out.core repro.wat thread 'main' panicked at crates/wasmtime/src/runtime/externals/global.rs:237:21: if the type is non-nullable, we better have a non-null referenceThis is sort of a more general problem where instances are left in a half-baked state on trapping during instantiation which means that we don't have a great way to reflect over them in a core dump. At the same time, however, reflecting over a core dump is exactly what you'd want in such a situation.
My guess is that this is probably also a problem for the guest-debug feature where inspecting globals on a trap might get wonky if everything's not fully initialized.
alexcrichton added the wasm-proposal:gc label to Issue #15256.
Last updated: Nov 19 2026 at 20:05 UTC