Remove an improper assumption when creating wasm_trap (#1657)

Allow to have multiple stores in an engine and multiple instances
in a store. Letting a wasm_function_t pass its wasm_store_t to make
it more efficient.
This commit is contained in:
liang.he
2022-11-01 11:56:28 +08:00
committed by GitHub
parent 101ea0ea3c
commit a1f7832625
2 changed files with 37 additions and 68 deletions

View File

@ -143,6 +143,8 @@ int main(int argc, const char* argv[]) {
own wasm_name_t message;
wasm_trap_message(trap, &message);
printf("> %s\n", message.data);
assert(message.num_elems > 0);
assert(strncmp(message.data, "Exception: ", strlen("Exception: ")) == 0);
printf("Printing origin...\n");
own wasm_frame_t* frame = wasm_trap_origin(trap);