Skip to content

Commit

Permalink
Adds test_err_callx_oob_max.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Dec 7, 2024
1 parent 410a627 commit e64598f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,20 @@ fn test_err_callx_oob_high() {
);
}

#[test]
fn test_err_callx_oob_max() {
test_interpreter_and_jit_asm!(
"
mov64 r0, -0x8
hor64 r0, -0x1
callx r0
exit",
[],
TestContextObject::new(3),
ProgramResult::Err(EbpfError::CallOutsideTextSegment),
);
}

#[test]
fn test_callx_unaligned_text_section() {
test_interpreter_and_jit_elf!(
Expand Down

0 comments on commit e64598f

Please sign in to comment.