Skip to content
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

Command modules are easy to leak memory with #1913

Open
alexcrichton opened this issue Jun 23, 2020 · 1 comment
Open

Command modules are easy to leak memory with #1913

alexcrichton opened this issue Jun 23, 2020 · 1 comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself

Comments

@alexcrichton
Copy link
Member

The implementation of "command" modules in Linker will create a new Instance each time an export is invoked. This works well implementation-wise but it's also easy to leak memory and resources unintentionally. No Instance is actually deallocated until the Store is dropped, which means that commands are a vector for repeatedly creating instances by accident without ever actually deleting them.

I'm not really sure what the best way to handle this would be, but we should probably either document this or look into a fix!

cc @sunfishcode

@alexcrichton alexcrichton added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jun 23, 2020
@github-actions
Copy link

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

No branches or pull requests

1 participant