alexcrichton opened PR #14552 from alexcrichton:protect to bytecodealliance:main:
Prior to this commit embedder handles to futures/streams were effectively raw indices into tables. This means that incorrect usage on the embedder side is effectively entirely undetected and can have a wide array of varying consequences for usage. This is quite different from usage of guest resources, for example, which have more protections in place.
This commit switches the internal representation of future/stream handles to using the equivalent of what guest resources use. This provides a significant degree of insulation against mis-use via generational indices for example. Embedders with invalid usage should get errors much more quickly and the table IDs internally are generally able to be much more trusted now too.
<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested dicej for a review on PR #14552.
alexcrichton requested wasmtime-core-reviewers for a review on PR #14552.
github-actions[bot] added the label wasmtime:api on PR #14552.
:thumbs_up: dicej submitted PR review.
alexcrichton updated PR #14552.
alexcrichton has enabled auto merge for PR #14552.
alexcrichton added PR #14552 Insulate embedders against incorrect future/stream ownership to the merge queue.
:check: alexcrichton merged PR #14552.
alexcrichton removed PR #14552 Insulate embedders against incorrect future/stream ownership from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC