dicej requested alexcrichton for a review on PR #15350.
dicej opened PR #15350 from dicej:fix-new-transmit-scope-bug to bytecodealliance:main:
This fixes incorrect code in
StoreContextMut::new_transmit. Specifically, thedroppedvariable that was moved into a closure and then again into anasyncblock was moved by _value_, whereas I meant for it to be moved by reference the same way anAsyncFnMutwould do it; i.e. I didn't think through the semantics of the nested closures. Consequently, each returned future got its own copy, so the value didn't persist across closure calls as intended.The solution is to make variable a field in the
producerstate (which I've converted from a tuple to a struct for better readability) so that it persists as intended.The issue was found, and the new tests (mostly) written, by Claude. I wrote the fix independently and take responsibility for both.
<!--
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
-->
dicej requested wasmtime-core-reviewers for a review on PR #15350.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #15350 deliver dropped events as appropriate for host-written streams to the merge queue.
alexcrichton removed PR #15350 deliver dropped events as appropriate for host-written streams from the merge queue.
:check: alexcrichton merged PR #15350.
Last updated: Nov 19 2026 at 20:05 UTC