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

Support for the Memory64 proposal in the spec interpreter#14

Merged
aardappel merged 4 commits intoWebAssembly:masterfrom
aardappel:master
Feb 2, 2021
Merged

Support for the Memory64 proposal in the spec interpreter#14
aardappel merged 4 commits intoWebAssembly:masterfrom
aardappel:master

Conversation

@aardappel
Copy link
Contributor

This passes make test.

I disabled bulk64.wast for now, wasn't sure whether it be a good idea to support 64-bit bulk memory in this PR or whenever bulk memory gets merged upstream.

First time touching OCaml, so I'm sure lots can be improved.

@aardappel aardappel requested a review from rossberg January 25, 2021 16:33
Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I mostly have a bunch of minor stylistic suggestions.

let table_type s =
let t = elem_type s in
let lim = limits vu32 s in
let lim, _ = limits vu32 s in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of just ignoring the flag, I think you need to require (not is64) here, otherwise the table type is malformed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
let limits vu s =
let has_max = bool s in
let flags = u8 s in
require (flags land 0xf8 = 0) s (pos s - 1) "malformed limits flags";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you push? I'm not seeing any change for this.

let table_type s =
let t = elem_type s in
let lim = limits vu32 s in
let lim, _ = limits vu32 s in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@aardappel
Copy link
Contributor Author

@rossberg just pushed the new changes.

Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
@aardappel aardappel merged commit 2bbd2a1 into WebAssembly:master Feb 2, 2021
backes added a commit to backes/spec that referenced this pull request May 10, 2023
This merges part of WebAssembly/memory64#14 to make the tests fail both
before and after memory64. This allows engines to enable memory64
without failing spec tests.
backes added a commit to backes/spec that referenced this pull request May 10, 2023
This merges part of WebAssembly/memory64#14 to make the tests fail both
before and after memory64. This allows engines to enable memory64
without failing spec tests.
backes added a commit to WebAssembly/spec that referenced this pull request May 10, 2023
This merges part of WebAssembly/memory64#14 to make the tests fail both
before and after memory64. This allows engines to enable memory64
without failing spec tests.
conrad-watt pushed a commit to WebAssembly/threads that referenced this pull request Aug 29, 2023
* [test] Add test for init expr with missing end marker (#1645)

* Add test for the module size limit (#1642)

* Add test for the module size limit

The limits test did not test the maximum supported module size of 1GB yet. This PR adds tests which create modules consisting of a single custom section. The first test checks if a module of size 1GB is allowed, the second test checks that a module of size 1GB + 1 byte gets rejected.

* Some cleanup

* [test] Disable tests that become valid with memory64 (#1648)

* Remove duplicated binary tests (#1649)

* Remove duplicated binary tests

Those tests were moved to `binary-leb128.wast` in #1019, but #1287
brought them back.

* Remove more duplicated tests

* Make binary-leb128 test memory64-ready (#1650)

This merges part of WebAssembly/memory64#14 to make the tests fail both
before and after memory64. This allows engines to enable memory64
without failing spec tests.

* Move more LEB128 tests to binary-leb128 (#1651)

Tests for LEB128 should be in the separate `binary-leb128.wast` test
file.

* Allow test for module size limit to fail (#1653)

* Allow test for module size limit to fail

Allocating a 1GB Uint8Array can fail. In particular, it will always fail
on 32-bit systems in V8, where the maximum size of a TypedArray is
2^30-1, thus 1 byte too little.

* [spec] Fix table_alloc signature (#1658)

* [interpreter] Tweak parser

* [spec] Include reftype in inline element segment abbreviations (#1657)

* [spec] Fix copypaste error for V128.Load*_Zero instructions in index (#1662)

* [interpreter] Use explicit bounds checks instead Invalid_argument (#1659)

* [interpreter] Makefile tweak

* [spec] Tweak math layout

* [spec] Some tweaks to layout and SIMD ops (#1667)

* [spec] Add missing type to elem.drop and store soundness (#1668)

* [test] Add tests for out-of-range NaN payloads (#1670)

* [spec] Fix typo (#1671)

depended → dependent

* [spec] Remark about the convention of using a pattern for attribute variable

* [interpreter] Bump version to 2.0.1

* [interpreter] Makefile support for opam releases

* [interpreter] Makefile tweaks

* [interpreter] Makefile tweaks

* [interpreter] Tune opam file to fix opam repo CI

* [interpreter] Use dune instead of ocamlbuild (#1665)

---------

Co-authored-by: Keith Winstein <keithw@cs.stanford.edu>
Co-authored-by: gahaas <ahaas@google.com>
Co-authored-by: Clemens Backes <clemensb@google.com>
Co-authored-by: Phosra <phosra@tutanota.de>
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
Co-authored-by: Tom Stuart <hi@tomstu.art>
Co-authored-by: Reuben Dunnington <rdunnington@users.noreply.github.com>
Co-authored-by: zapashcanon <leo@ndrs.fr>
Co-authored-by: Andreas Rossberg <rossberg@chromium.org>
Co-authored-by: Ben Visness <bvisness@users.noreply.github.com>
Co-authored-by: Dan Gohman <dev@sunfishcode.online>
Co-authored-by: Patrick Dubroy <pdubroy@gmail.com>
fgmccabe pushed a commit to WebAssembly/js-promise-integration that referenced this pull request Mar 5, 2024
This merges part of WebAssembly/memory64#14 to make the tests fail both
before and after memory64. This allows engines to enable memory64
without failing spec tests.
sbc100 pushed a commit that referenced this pull request Jun 12, 2024
It seems like a wrong copy-and-paste from Firefox.
backes pushed a commit to backes/wasm-spec-memory64 that referenced this pull request Oct 8, 2024
Add template for suggesting new instructions.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants