Skip to content

Fix effective address wrapping in interpreter stores - #215

Merged
andreaTP merged 1 commit into
bytecodealliance:mainfrom
andreaTP:fix/interpreter-store-address-wrap
Sep 25, 2026
Merged

andreaTP merged 1 commit into
bytecodealliance:mainfrom
andreaTP:fix/interpreter-store-address-wrap

Conversation

@andreaTP

Copy link
Copy Markdown
Contributor

i32.store8, i64.store8, i64.store32, v128.store and v128.storeN_lane computed the effective address with wrapping int arithmetic, so an address + offset >= 2^32 wrapped to a low in-bounds address and the store succeeded instead of trapping. Route them through readMemPtr like every other load and store.

i32.store8, i64.store8, i64.store32, v128.store and v128.storeN_lane
computed the effective address with wrapping int arithmetic, so an
address + offset >= 2^32 wrapped to a low in-bounds address and the
store succeeded instead of trapping. Route them through readMemPtr like
every other load and store.
@andreaTP
andreaTP merged commit 90ad577 into bytecodealliance:main Sep 25, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant