Stream: git-wasmtime

Topic: wasmtime / PR #13577 Fix large, backwards, `memory.copy` ...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 22:37):

alexcrichton opened PR #13577 from alexcrichton:fix-chunked-big-copy to bytecodealliance:main:

This commit fixes a bug in the previous refactorings of memory.copy or other bulk copy instructions. Notably when fuel/epochs were enabled the operation was chunked up to check fuel between each operation, but the advancement of what to do unconditionally went forwards. When a backwards copy is required this means that data could get corrupted if the src/dst regions are overlapping. The fix here is to setup a separate backwards-copy loop which handles this case so the fuel/epoch-metered copy goes either backwards or forwards depending on what's being copied.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 22:37):

alexcrichton requested cfallin for a review on PR #13577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 22:37):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #13577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 22:37):

alexcrichton requested wasmtime-core-reviewers for a review on PR #13577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 22:57):

:thumbs_up: cfallin submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 22:57):

cfallin added PR #13577 Fix large, backwards, memory.copy with fuel/epochs to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 23:21):

:check: cfallin merged PR #13577.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2026 at 23:21):

cfallin removed PR #13577 Fix large, backwards, memory.copy with fuel/epochs from the merge queue.


Last updated: Jul 29 2026 at 05:03 UTC