-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
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.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.