Actually test table64 and memory64 in *64.wast files#2177
Open
bvisness wants to merge 2 commits into
Open
Conversation
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
reviewed
May 26, 2026
Member
sbc100
left a comment
There was a problem hiding this comment.
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; |
Member
There was a problem hiding this comment.
Why do we need the additional addrtype here? Can we just use INDEX_TYPE throughout?
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.