For Wasmtime's original 46.0.0 release it originally contained a crop of changes where bulk operations (e.g. memory.copy) were updated to chunk the operation internally when fuel/epochs were enabled with preemption checks in the middle. The goal of this translation was to ensure that a very large memory.copy, such as moving 2GiB of data, wouldn't represent an uninterrputible chunk of work the guest could perform. This was later discovered to be the source of a number of possible security vulnerabilities with epoch callbacks, and this behavior was reverted in #14045 to only check for epochs/fuel at the start of an operation instead of during an operation. This results in a doc block on epochs/fuel, however, that large bulk operations represent uninterruptible chunks of work where the only way to limit them is to limit the total size of a linear memory itself.
This isn't a great situation and we should probably somehow figure out how to add preemption checks in the middle. This'll need to be done relatively carefully to avoid reintroducing the problems that were fixed in #14045.
For Wasmtime's original 46.0.0 release it originally contained a crop of changes where bulk operations (e.g.
memory.copy) were updated to chunk the operation internally when fuel/epochs were enabled with preemption checks in the middle. The goal of this translation was to ensure that a very largememory.copy, such as moving 2GiB of data, wouldn't represent an uninterrputible chunk of work the guest could perform. This was later discovered to be the source of a number of possible security vulnerabilities with epoch callbacks, and this behavior was reverted in #14045 to only check for epochs/fuel at the start of an operation instead of during an operation. This results in a doc block on epochs/fuel, however, that large bulk operations represent uninterruptible chunks of work where the only way to limit them is to limit the total size of a linear memory itself.This isn't a great situation and we should probably somehow figure out how to add preemption checks in the middle. This'll need to be done relatively carefully to avoid reintroducing the problems that were fixed in #14045.