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
Instantiatordue to OOM or if theasyncfuture was dropped the concurrent instance count in the pooling allocator would get corrupted (off-by-one). The fix here is to switch amap_errwith 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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #13048.
alexcrichton requested wasmtime-core-reviewers for a review on PR #13048.
alexcrichton requested fitzgen for a review on PR #13048.
fitzgen submitted PR review.
fitzgen created PR review comment:
Instead of an
enabledflag, maybemem::forget(decrement)here? LLVM can probably keepenabledfrom being materialized at runtime, but the forget pattern seems no worse for ergonomics and guarantees that we won't need aboolflag at runtime.
github-actions[bot] added the label fuzzing on PR #13048.
github-actions[bot] added the label wasmtime:api on PR #13048.
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:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
Last updated: Apr 13 2026 at 00:25 UTC