Skip to content

Commit

Permalink
test: too many returns crash VM, not VMProfiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Oct 16, 2023
1 parent 1550f8d commit a109b89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions triton-vm/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,16 @@ mod tests {
assert!(maybe_open_call.is_some());
}

#[test]
#[should_panic(expected = "Jump stack is empty")]
fn profile_with_too_many_returns() {
let program = triton_program! {
call foo return halt
foo: return
};
let _ = program.profile([].into(), [].into()).unwrap();
}

#[test]
fn breakpoints_propagate_to_debug_information_as_expected() {
let program = triton_program! {
Expand Down

0 comments on commit a109b89

Please sign in to comment.