memory leak in wasm32-wasi reactor mode #108381
Labels
C-bug
Category: This is a bug.
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The bug phenomenon and reproduce steps can be seen in this issue: WebAssembly/wasi-libc#389.
Briefly speaking, after rustc compilation, the exported wasm functions will be wrapped with wasi-ctor and wasi-dtor; but wasi-ctor is designed for being called only once during the whole wasi lifetime, and multiple executions will lead to memory leak (due to env-vars init process).
I used to try to fix this bug in wasi-libc repo (pr: WebAssembly/wasi-libc#390). The wasi-libc maintainers commented that code change was inappropriate, then I'm moving here and hoping for a functional and elegant solution.
The text was updated successfully, but these errors were encountered: