alexcrichton opened PR #12910 from alexcrichton:fix-mpk-purge-index to bytecodealliance:main:
This commit fixes an issue with the pooling allocator when MPK is enabled, which is off-by-default at compile time. When a module is dropped all remaining images are purged from the pooling allocator, but the purging logic mistakenly used the wrong kind of index during purging which led to corruption of the pooling allocator itself. This fixes the logic and adds regression tests showcasing the issue as well.
<!--
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 cfallin for a review on PR #12910.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12910.
github-actions[bot] added the label wasmtime:api on PR #12910.
cfallin submitted PR review.
cfallin added PR #12910 mpk: Fix index used when purging a module in the pooling allocator to the merge queue.
cfallin removed PR #12910 mpk: Fix index used when purging a module in the pooling allocator from the merge queue.
cfallin merged PR #12910.
Last updated: Apr 12 2026 at 23:10 UTC