diff --git a/src/vm.rs b/src/vm.rs index 40c222a75..ffe478f7b 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -87,7 +87,7 @@ impl Config { impl Default for Config { fn default() -> Self { Self { - max_call_depth: 20, + max_call_depth: 64, stack_frame_size: 4_096, enable_address_translation: true, enable_stack_frame_gaps: true, diff --git a/tests/execution.rs b/tests/execution.rs index e763bc104..268ece6c0 100644 --- a/tests/execution.rs +++ b/tests/execution.rs @@ -1999,7 +1999,7 @@ fn test_err_dynamic_stack_ptr_overflow() { add r11, -0x7FFFFFFF add r11, -0x7FFFFFFF add r11, -0x7FFFFFFF - add r11, -0x14005 + add r11, -0x40005 call function_foo exit function_foo: @@ -2338,7 +2338,7 @@ fn test_bpf_to_bpf_depth() { exit", [Config::default().max_call_depth as u8], (), - TestContextObject::new(78), + TestContextObject::new(254), ProgramResult::Ok(0), ); // The instruction count is lower here because all the `exit`s never run @@ -2355,7 +2355,7 @@ fn test_bpf_to_bpf_depth() { exit", [Config::default().max_call_depth as u8 + 1], (), - TestContextObject::new(60), + TestContextObject::new(192), ProgramResult::Err(EbpfError::CallDepthExceeded), ); } @@ -2370,7 +2370,7 @@ fn test_err_reg_stack_depth() { exit", [], (), - TestContextObject::new(60), + TestContextObject::new(192), ProgramResult::Err(EbpfError::CallDepthExceeded), ); }