Stream: git-wasmtime

Topic: wasmtime / PR #13048 Fix current instance count on failur...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 21:27):

alexcrichton opened PR #13048 from alexcrichton:fix-decrement to bytecodealliance:main:

This commit fixes an issue during component instantiation where if instantiation failed during creation of the Instantiator due to OOM or if the async future was dropped the concurrent instance count in the pooling allocator would get corrupted (off-by-one). The fix here is to switch a map_err with a manual decrement to using a value that has a
destructor to ensure that it handles both of these cases.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 21:27):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 21:27):

alexcrichton requested wasmtime-core-reviewers for a review on PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 21:27):

alexcrichton requested fitzgen for a review on PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 22:54):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 22:54):

fitzgen created PR review comment:

Instead of an enabled flag, maybe mem::forget(decrement) here? LLVM can probably keep enabled from being materialized at runtime, but the forget pattern seems no worse for ergonomics and guarantees that we won't need a bool flag at runtime.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 23:53):

github-actions[bot] added the label fuzzing on PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 23:53):

github-actions[bot] added the label wasmtime:api on PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2026 at 23:53):

github-actions[bot] commented on PR #13048:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing", "wasmtime:api"

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

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 14:27):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 14:27):

alexcrichton created PR review comment:

Personally I prefer to the bool flag since it's otherwise in theory possible to leak memory with mem::forget. Effectively I trust LLVM's removal of the bool more than my own ability to double-check that nothing in the dtor accidentally leaks memory.

Is that ok with you as well though?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 15:00):

alexcrichton updated PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 17:55):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 17:55):

fitzgen created PR review comment:

Yeah, sounds fine.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 17:55):

fitzgen added PR #13048 Fix current instance count on failure during component instantiation to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 18:39):

github-merge-queue[bot] removed PR #13048 Fix current instance count on failure during component instantiation from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 19:03):

alexcrichton updated PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 19:03):

alexcrichton has enabled auto merge for PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 19:24):

alexcrichton added PR #13048 Fix current instance count on failure during component instantiation to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:47):

alexcrichton merged PR #13048.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:47):

alexcrichton removed PR #13048 Fix current instance count on failure during component instantiation from the merge queue.


Last updated: May 03 2026 at 23:15 UTC