Skip to content

Actually test table64 and memory64 in *64.wast files#2177

Open
bvisness wants to merge 2 commits into
WebAssembly:mainfrom
bvisness:actually-test-64
Open

Actually test table64 and memory64 in *64.wast files#2177
bvisness wants to merge 2 commits into
WebAssembly:mainfrom
bvisness:actually-test-64

Conversation

@bvisness
Copy link
Copy Markdown
Contributor

Incredibly, there were many cases in our memory64 tests where we simply did not test memory64 or table64. These were likely copy-paste errors, but magnified due to the errors being in test generators.

This is the follow-up patch mentioned in #2176. Please enjoy.

bvisness added 2 commits May 26, 2026 15:19
Many parts of our memory64 tests were in fact only testing 32-bit
memories and tables. This patch partially corrects this embarrassing
oversight by updating the memory/table copy/init generators as
necessary. (Some other cases that ought to be covered consistently will
be in the next commit.)
There did not seem to be any tests of memory.copy that exercised the
argument type validation that comes when performing a copy between
memory32 and memory64.
@sbc100 sbc100 requested a review from dschuff May 26, 2026 20:46
Copy link
Copy Markdown
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Oops, was this an oversight when we (I) first created the tests? or did this happen when we split the memory64 tests into their own subdirectory?


print_origin("generate_table_init.js");

const addrtype = INDEX_TYPE;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need the additional addrtype here? Can we just use INDEX_TYPE throughout?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's no good reason except that this is copying from analogous memory tests, which had memtype and decltype (which basically differ only by a leading space). For the new table ones I opted to just use the name addrtype for a small amount of extra spec consistency. But it's true that a new variable is not strictly necessary here.

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.

2 participants