Skip to content

Commit

Permalink
fix(profiler): ignore pc outside of function area (#6439)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus authored Oct 2, 2024
1 parent 323ea7e commit a74ebfd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/cairo-lang-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ impl SierraCasmRunner {
}
let real_pc: usize = step.pc.sub(real_pc_0);
// Skip the footer.
if real_pc == bytecode_len {
// Also if pc is greater or equal the bytecode length it means that it is the outside
// ret used for e.g. getting pointer to builtins costs table, const segments
// etc.
if real_pc >= bytecode_len {
continue;
}

Expand Down

0 comments on commit a74ebfd

Please sign in to comment.