From c6b10ef4386fc1ba4b813867ddfae75aec8ecb5f Mon Sep 17 00:00:00 2001 From: raoxiaojia Date: Mon, 6 Jul 2026 10:30:37 +0100 Subject: [PATCH 1/2] minor typo on v128 store oob condition --- specification/wasm-3.0/4.3-execution.instructions.spectec | 2 +- specification/wasm-latest/4.3-execution.instructions.spectec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/wasm-3.0/4.3-execution.instructions.spectec b/specification/wasm-3.0/4.3-execution.instructions.spectec index 9ec17593d3..04a132b661 100644 --- a/specification/wasm-3.0/4.3-execution.instructions.spectec +++ b/specification/wasm-3.0/4.3-execution.instructions.spectec @@ -530,7 +530,7 @@ rule Step/vstore-val: rule Step/vstore_lane-oob: z; (CONST at i) (VCONST V128 c) (VSTORE_LANE V128 N x ao j) ~> z; TRAP ---- - -- if $(i + ao.OFFSET + N) > |$mem(z, x).BYTES| + -- if $(i + ao.OFFSET + N/8) > |$mem(z, x).BYTES| rule Step/vstore_lane-val: z; (CONST at i) (VCONST V128 c) (VSTORE_LANE V128 N x ao j) ~> $with_mem(z, x, $(i + ao.OFFSET), $(N/8), b*); eps diff --git a/specification/wasm-latest/4.3-execution.instructions.spectec b/specification/wasm-latest/4.3-execution.instructions.spectec index 9ec17593d3..04a132b661 100644 --- a/specification/wasm-latest/4.3-execution.instructions.spectec +++ b/specification/wasm-latest/4.3-execution.instructions.spectec @@ -530,7 +530,7 @@ rule Step/vstore-val: rule Step/vstore_lane-oob: z; (CONST at i) (VCONST V128 c) (VSTORE_LANE V128 N x ao j) ~> z; TRAP ---- - -- if $(i + ao.OFFSET + N) > |$mem(z, x).BYTES| + -- if $(i + ao.OFFSET + N/8) > |$mem(z, x).BYTES| rule Step/vstore_lane-val: z; (CONST at i) (VCONST V128 c) (VSTORE_LANE V128 N x ao j) ~> $with_mem(z, x, $(i + ao.OFFSET), $(N/8), b*); eps From a082bf6cbb6b0523c40e9327f976be2fbaca69ed Mon Sep 17 00:00:00 2001 From: raoxiaojia Date: Mon, 6 Jul 2026 11:00:18 +0100 Subject: [PATCH 2/2] backport to 2.0 --- specification/wasm-2.0/8-reduction.spectec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/wasm-2.0/8-reduction.spectec b/specification/wasm-2.0/8-reduction.spectec index 1a4893d339..557db1f5fb 100644 --- a/specification/wasm-2.0/8-reduction.spectec +++ b/specification/wasm-2.0/8-reduction.spectec @@ -583,7 +583,7 @@ rule Step/vstore-val: rule Step/vstore_lane-oob: z; (CONST I32 i) (VCONST V128 c) (VSTORE_LANE V128 N ao j) ~> z; TRAP - -- if $(i + ao.OFFSET + N) > |$mem(z, 0).BYTES| + -- if $(i + ao.OFFSET + N/8) > |$mem(z, 0).BYTES| rule Step/vstore_lane-val: z; (CONST I32 i) (VCONST V128 c) (VSTORE_LANE V128 N ao j) ~> $with_mem(z, 0, $(i + ao.OFFSET), $(N/8), b*); eps