Bug 233392 - WebAssembly: memory.fill returns wrong error on out-of-bounds
Summary: WebAssembly: memory.fill returns wrong error on out-of-bounds
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-11-19 18:29 PST by Asumu Takikawa
Modified: 2021-11-19 22:58 PST (History)
8 users (show)

See Also:

Patch (4.69 KB, patch)
2021-11-19 18:41 PST, Asumu Takikawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Asumu Takikawa 2021-11-19 18:29:28 PST
The following wasm program should produce a memory out of bounds exception when `fill_oob` is called:

    (import "env" "memory" (memory $mem0 1 1))
    (func (export "fill_oob")
      (memory.fill (i32.const 0) (i32.const 42) (i32.const 65537))

Right now, JSC will throw "Out of bounds table access" instead.
Comment 1 Asumu Takikawa 2021-11-19 18:41:57 PST
Created attachment 444879 [details]
Comment 2 Yusuke Suzuki 2021-11-19 22:31:53 PST
Comment on attachment 444879 [details]

Comment 3 EWS 2021-11-19 22:57:59 PST
Committed r286092 (244479@main): <https://commits.webkit.org/244479@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444879 [details].
Comment 4 Radar WebKit Bug Importer 2021-11-19 22:58:24 PST