Skip to content

Commit

Permalink
Don't attempt to capture stack usage for inner most bpf2bpf call (#479)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan-Jowett and Alan Jowett authored May 20, 2024
1 parent d5059c4 commit a299839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/ubpf_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ ubpf_exec_ex(
goto cleanup;
}

if (pc == 0 || vm->int_funcs[pc]) {
if ((pc == 0 || vm->int_funcs[pc]) && stack_frame_index < UBPF_MAX_CALL_DEPTH) {
stack_frames[stack_frame_index].stack_usage = ubpf_stack_usage_for_local_func(vm, pc);
}

Expand Down

0 comments on commit a299839

Please sign in to comment.