Skip to content

Fix a memory leak on returning incompatible values#2424

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-leak2
Nov 16, 2020
Merged

Fix a memory leak on returning incompatible values#2424
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-leak2

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This fixes an issue where if a store-incompatible value is returned from
a host-defined function then that value is leaked. Practically this
means that it's possible to accidentally leak Func values, but a
simple insertion of a drop does the trick!

This fixes an issue where if a store-incompatible value is returned from
a host-defined function then that value is leaked. Practically this
means that it's possible to accidentally leak `Func` values, but a
simple insertion of a `drop` does the trick!
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 16, 2020
@github-actions
Copy link
Copy Markdown

Subscribe to Label Action

cc @peterhuene

Details 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.

@alexcrichton alexcrichton merged commit 8675fa5 into bytecodealliance:main Nov 16, 2020
@alexcrichton alexcrichton deleted the fix-leak2 branch November 16, 2020 20:26
cfallin pushed a commit that referenced this pull request Nov 30, 2020
This fixes an issue where if a store-incompatible value is returned from
a host-defined function then that value is leaked. Practically this
means that it's possible to accidentally leak `Func` values, but a
simple insertion of a `drop` does the trick!
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

Successfully merging this pull request may close these issues.

2 participants