Skip to content

Commit

Permalink
test: recurse_or_return needs jump stack content
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed May 29, 2024
1 parent e43b0bb commit b68f023
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions triton-vm/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,13 @@ pub(crate) mod tests {
program.assemble().run()?;
}

#[test]
fn vm_crashes_when_executing_recurse_or_return_with_empty_jump_stack() {
let program = triton_program!(recurse_or_return halt);
let_assert!(Err(err) = program.run(PublicInput::default(), NonDeterminism::default()));
assert!(JumpStackIsEmpty == err.source);
}

pub(crate) fn test_program_for_write_mem_read_mem() -> ProgramAndInput {
ProgramAndInput::new(triton_program! {
push 3 push 1 push 2 // _ 3 1 2
Expand Down

0 comments on commit b68f023

Please sign in to comment.