slaymaker1907 added the bug label to Issue #7578.
slaymaker1907 opened issue #7578:
Test Case
wasm_trap_t* trap; auto err = wasmtime_instance_new(context, module, &import, 1, &instance, &trap);Steps to Reproduce
Call
wasmtime_instance_newwithout setting the trap pointer to nullptr. It then becomes impossible to tell if the code actually trapped or not.Expected Results
The input trap pointer should always be set to nullptr.
Actual Results
The input trap pointer isn't changed at all.
Versions and Environment
All environments using the C API.
Extra Info
slaymaker1907 commented on issue #7578:
While this seems like a very minor issue when actually using C/C++, it makes trying to use it extremely tedious with the Racket FFI.
alexcrichton commented on issue #7578:
Ah yes the intention was that the caller would have pre-set everything to
NULLbefore calling this API, but I think it's also reasonable to set everything toNULLinternally as well.
alexcrichton added the wasmtime:c-api label to Issue #7578.
Last updated: Dec 13 2025 at 19:03 UTC