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

Fix OOB cases for array.get/set #465

Merged
merged 4 commits into from
Nov 3, 2023
Merged

Conversation

ShinWonho
Copy link
Contributor

@ShinWonho ShinWonho commented Nov 3, 2023

Screenshot 2023-11-03 at 5 29 33 PM Screenshot 2023-11-03 at 5 29 05 PM

I fixed OOB cases for array.get/set.

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.

Thanks!

document/core/exec/instructions.rst Outdated Show resolved Hide resolved
document/core/exec/instructions.rst Outdated Show resolved Hide resolved
S; F; (\REFARRAYADDR~a)~(\I32.\CONST~i)~(\ARRAYGET\K{\_}\sx^?~x) &\stepto& \TRAP
& (\otherwise) \\
S; F; (\REFNULL~t)~(\I32.\CONST~i)~(\ARRAYGET\K{\_}\sx^?~x) &\stepto& \TRAP
(\otherwise, \iff & \expanddt(F.\AMODULE.\MITYPES[x]) = \TARRAY~\X{ft} \\
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the otherwise here, since the negation is implied by the next line being defined.

Copy link
Contributor Author

@ShinWonho ShinWonho Nov 3, 2023

Choose a reason for hiding this comment

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

Screenshot 2023-11-03 at 7 44 55 PM Screenshot 2023-11-03 at 7 45 27 PM

Now, I removed it. Thanks for the comment!

S; F; (\REFARRAYADDR~a)~(\I32.\CONST~i)~\val~(\ARRAYSET~x) &\stepto& \TRAP
& (\otherwise) \\
S; F; (\REFNULL~t)~(\I32.\CONST~i)~\val~(\ARRAYSET~x) &\stepto& \TRAP
(\otherwise, \iff & \expanddt(F.\AMODULE.\MITYPES[x]) = \TSTRUCT~\X{ft}^n \\
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.

ShinWonho and others added 3 commits November 3, 2023 19:31
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
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.

Thanks!

@rossberg rossberg merged commit 79d0a2a into WebAssembly:main Nov 3, 2023
4 checks passed
@ShinWonho ShinWonho deleted the array branch November 10, 2023 05:06
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