You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling wasm_val_delete then free on a dynamically allocated wasm_val_t * pointer should not result in a double free.
wasm_val_delete should only de-allocate memory referenced within its argument (e.g. if .of.ref is set) and not the memory pointed to by its argument (i.e. the argument itself). Doing so makes allocating wasm_val_t on the stack unsafe.
Actual behavior
Running the above code results in
This results in error
$ ./test
double free or corruption (out)
Aborted (core dumped)
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
Calling
wasm_val_delete
on a dynamically allocatedwasm_val_t *
causes a double free error.Environment info:
Steps to reproduce
test.c
file :Compiled with flags
Expected behavior
Calling
wasm_val_delete
thenfree
on a dynamically allocatedwasm_val_t *
pointer should not result in a double free.wasm_val_delete
should only de-allocate memory referenced within its argument (e.g. if.of.ref
is set) and not the memory pointed to by its argument (i.e. the argument itself). Doing so makes allocatingwasm_val_t
on the stack unsafe.Actual behavior
Running the above code results in
This results in error
Additional context
The text was updated successfully, but these errors were encountered: