Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: test_jumpi_d19g0v0_Cancun
1 participant