Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit d976981

Browse files
authored
Update overview for the zero-byte OOB case (#100)
It's only a trap if a byte is accessed out-of-bounds, not if the destination or source index is out-of-bounds. This only makes a difference when the length is zero, in which case the previous behavior would trap, and the new behavior will be a no-op.
1 parent 983df68 commit d976981

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

proposals/bulk-memory-operations/Overview.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ A trap occurs if:
277277
active segments that were dropped after being copied into memory during module
278278
instantiation.
279279
* any of the accessed bytes lies outside the source data segment or the target memory
280-
* the source offset is greater than the length of the source data segment
281-
* the destination offset is greater than the length of the target memory
282280

283281
Note that it is allowed to use `memory.init` on the same data segment more than
284282
once.
@@ -342,8 +340,6 @@ The instruction has the signature `[i32 i32 i32] -> []`. The parameters are, in
342340

343341
A trap occurs if:
344342
* any of the accessed bytes lies outside the source or target memory
345-
* the source offset is greater than the length of the source memory
346-
* the destination offset is greater than the length of the target memory
347343

348344
A trap resulting from an access outside the source or target region
349345
only occurs once the first byte that is outside the source or target
@@ -367,7 +363,6 @@ The instruction has the signature `[i32 i32 i32] -> []`. The parameters are, in
367363

368364
A trap occurs if:
369365
* any of the accessed bytes lies outside the target memory
370-
* the destination offset is greater than the length of the target memory
371366

372367
Filling takes place bytewise from lower addresses toward higher
373368
addresses. A trap resulting from an access outside the target memory

0 commit comments

Comments
 (0)