Skip to content

Commit

Permalink
fix(profiler): ignore pc outside of function area
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Oct 1, 2024
1 parent 227cea9 commit d170404
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 d170404

Please sign in to comment.