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

Avoid PUSH data when computing jumpdests #2460

Merged
merged 7 commits into from
Jun 4, 2024
Merged

Avoid PUSH data when computing jumpdests #2460

merged 7 commits into from
Jun 4, 2024

Conversation

anvacaru
Copy link
Contributor

@anvacaru anvacaru commented Jun 3, 2024

Fixing a mistake I made in my previous PR #2441. When computing the valid JUMPTESTS, I omitted the case in which the 0x5B byte could have been part of a PUSH(N) opcode.

I've modified the _compute_jumpdests function to first check if the current byte is a PUSH(N) and skip byte - PUSH1 +2 bytes.

i.e. if byte is PUSH1, it skips 0x60 - 0x60 + 2 bytes where one byte is the data to be pushed and one byte is the opcode itself.

@anvacaru anvacaru added the bug Something isn't working label Jun 3, 2024
@anvacaru anvacaru requested a review from PetarMax June 3, 2024 14:45
@anvacaru anvacaru self-assigned this Jun 3, 2024
@rv-jenkins rv-jenkins merged commit dc7fb85 into master Jun 4, 2024
11 checks passed
@rv-jenkins rv-jenkins deleted the pyjumpdests-2 branch June 4, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants