Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 723b878

Browse files
committed
Comments
1 parent 6a6a2b1 commit 723b878

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

document/core/exec/instructions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ Memory Instructions
696696
\end{array}
697697
698698
.. note::
699-
699+
The use of the :math:`\vconst_t` meta function in the rules for this and the following instructions ensures that an overflowing index turns into a :ref:`trap <syntax-trap>`.
700+
700701

701702
.. _exec-memory.init:
702703

interpreter/exec/eval.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ let rec step (c : config) : config =
295295
{ty = I32Type; align = 0; offset = 0l; sz = Some Memory.Pack8});
296296
]
297297

298-
| MemoryCopy, I32 n :: I32 s :: I32 d :: vs' when s >= d ->
298+
| MemoryCopy, I32 n :: I32 s :: I32 d :: vs' when d <= s ->
299299
vs', List.map (at e.at) [
300300
Plain (Const (I32 d @@ e.at));
301301
Plain (Const (I32 s @@ e.at));

0 commit comments

Comments
 (0)