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: saturate jumpi index taken on stack #1002

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Conversation

enitrat
Copy link
Contributor

@enitrat enitrat commented Oct 1, 2024

Saturates the jumpi index taken on the stack to avoid returning directly if it doesn't fit in a usize.

If b is zero, it will just increment PC.
Otherwise, it will be OOB of the bytecode which is capped to 24kb, thus at an invalid jumpdest index.

Closes #971


This change is Reviewable

@enitrat enitrat requested a review from ClementWalter as a code owner October 1, 2024 13:12
@enitrat enitrat force-pushed the feat/saturate-jumpi-index branch from 2e08bae to a2f1fd4 Compare October 1, 2024 13:12
@enitrat enitrat merged commit 79a5e8d into main Oct 1, 2024
1 check passed
@enitrat enitrat deleted the feat/saturate-jumpi-index branch October 1, 2024 13:20
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.

bug: test_jumpi_d19g0v0_Cancun
1 participant