Skip to content

memory leak in wasm32-wasi reactor mode #108381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wujunzhuo opened this issue Feb 23, 2023 · 0 comments
Closed

memory leak in wasm32-wasi reactor mode #108381

wujunzhuo opened this issue Feb 23, 2023 · 0 comments
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.

Comments

@wujunzhuo
Copy link

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.

@Noratrieb Noratrieb added O-wasm Target: WASM (WebAssembly), http://webassembly.org/ C-bug Category: This is a bug. labels Feb 23, 2023
@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants