Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict offsets to index type's range in validation #79

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

bvisness
Copy link
Collaborator

@bvisness bvisness commented Aug 20, 2024

This PR adds validation of memarg.offset to ensure that loads and stores for a 32-bit memory cannot have a 64-bit offset. Execution semantics are unaffected.

Resolves #76.

@bvisness
Copy link
Collaborator Author

Yet again I have no idea what is wrong with the PDF build.

@rossberg
Copy link
Member

rossberg commented Aug 20, 2024

Well, the error says it all: \lt is not a defined Latex macro. You want to spell it <.

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 modulo <

@backes
Copy link
Member

backes commented Aug 30, 2024

Can you please add tests for this? Otherwise it's easy for engine to overlook this restriction and be like "we pass all tests, hence we fully implement memory64".

@bvisness
Copy link
Collaborator Author

Yes, I have a personal todo item to add spec tests for all the recent spec changes. I'll create a GitHub issue today to make that more visible for others though. Thanks for the reminder.

@sbc100
Copy link
Member

sbc100 commented Sep 5, 2024

Is this ready to land?

@bvisness
Copy link
Collaborator Author

bvisness commented Sep 5, 2024

Should be, assuming you're comfortable with tests coming later.

@sbc100 sbc100 merged commit 940398c into WebAssembly:main Sep 5, 2024
7 checks passed
@bvisness bvisness deleted the offset-limit branch September 5, 2024 16:13
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.

Restricting offsets to match the index type
4 participants