Stream: git-wasmtime

Topic: wasmtime / issue #7578 handle_instantiate doesn't set tra...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2023 at 02:25):

slaymaker1907 added the bug label to Issue #7578.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2023 at 02:25):

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_new without 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

view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2023 at 02:28):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2023 at 03:31):

alexcrichton commented on issue #7578:

Ah yes the intention was that the caller would have pre-set everything to NULL before calling this API, but I think it's also reasonable to set everything to NULL internally as well.


Last updated: Nov 22 2024 at 16:03 UTC