alexcrichton requested dicej for a review on PR #12872.
alexcrichton opened PR #12872 from alexcrichton:fix-future-stream-copy-stacked-borrows to bytecodealliance:main:
This commit fixes an issue in the copy implementation for futures/streams related to component-model-async. Specifically the added tests here tripped an error in Miri which is related to intra-component copies and stacked borrows. This refactoring ends up using
copy_withinfor the intra-component case andcopy_to_nonoverlappingfor the inter-component case to resolve this issue. This commit additionally refactors the validation/checks to happen in one location instead of in a few to ensure that all validation is done up-front in a shared manner.<!--
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-core-reviewers for a review on PR #12872.
alexcrichton updated PR #12872.
github-actions[bot] added the label wasmtime:api on PR #12872.
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #12872.
alexcrichton updated PR #12872.
dicej submitted PR review.
dicej created PR review comment:
Could we retain the comment about why it's safe to use
copy_to_nonoverlappinghere?
alexcrichton updated PR #12872.
alexcrichton has enabled auto merge for PR #12872.
alexcrichton added PR #12872 Fix a stacked borrows violation in futures/streams copy to the merge queue.
alexcrichton merged PR #12872.
alexcrichton removed PR #12872 Fix a stacked borrows violation in futures/streams copy from the merge queue.
Last updated: Apr 12 2026 at 23:10 UTC