Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Fix simulation for jumpdest analysis (0xPolygonZero#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
4l0n50 authored Jan 15, 2024
1 parent 5c1ec52 commit 30b4799
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evm/src/generation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ fn simulate_cpu_between_labels_and_get_user_jumps<F: Field>(

loop {
// skip jumpdest table validations in simulations
if state.registers.program_counter == KERNEL.global_labels["jumpdest_analysis"] {
if state.registers.is_kernel
&& state.registers.program_counter == KERNEL.global_labels["jumpdest_analysis"]
{
state.registers.program_counter = KERNEL.global_labels["jumpdest_analysis_end"]
}
let pc = state.registers.program_counter;
Expand Down

0 comments on commit 30b4799

Please sign in to comment.