Skip to content

Conversation

@XeniaLu
Copy link
Contributor

@XeniaLu XeniaLu commented Sep 23, 2025

Fixes #4644

@yamt
Copy link
Collaborator

yamt commented Sep 26, 2025

doesn't the official spec test cover this very basic case? i guess it should be added...

@XeniaLu XeniaLu changed the title fix: false OOB with array.fill in classic-interp fix: false OOB with array.fill in classic-interp and fast-interp Sep 29, 2025
@XeniaLu
Copy link
Contributor Author

XeniaLu commented Sep 29, 2025

doesn't the official spec test cover this very basic case? i guess it should be added...

Good point! Indeed it doesn't:

https://github.com/WebAssembly/spec/blob/e1ce46897460b74548c5e96b1530f59ef5b366cf/test/core/gc/array_fill.wast#L61-L68

For an array of size 12, the official spec test only covered:

  • offset=13, len=0 ❌
  • offset=0, len=13 ❌
  • offset=12, len=0 ✅
  • offset=2, len=2 ✅

I'll add a 3 ones there:

  • offset=0, len=12 ✅
  • offset=0, len=1 ✅
  • offset=8, len=4 ✅

@XeniaLu
Copy link
Contributor Author

XeniaLu commented Oct 3, 2025

Spec test added in WebAssembly/spec#1998 and cherry-picked as a patch.

@XeniaLu XeniaLu changed the title fix: false OOB with array.fill in classic-interp and fast-interp fix: false OOB in array.fill for interp Oct 4, 2025
@lum1n0us lum1n0us merged commit 4c371e6 into bytecodealliance:main Oct 23, 2025
463 checks passed
@lum1n0us lum1n0us added the bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs. label Oct 23, 2025
@XeniaLu XeniaLu deleted the issue-4644 branch October 23, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

classic-interp: array.fill false OOB with full length

3 participants