From 338d4994d8bc9d077ae5cf73f79dae423ef94a10 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 5 Nov 2025 17:36:37 +0530 Subject: [PATCH] Fix count_temps_in_call to only look for Pointer args of a helper_sig --- pythonbpf/functions/functions_pass.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pythonbpf/functions/functions_pass.py b/pythonbpf/functions/functions_pass.py index 33342b7..c994368 100644 --- a/pythonbpf/functions/functions_pass.py +++ b/pythonbpf/functions/functions_pass.py @@ -62,7 +62,9 @@ def count_temps_in_call(call_node, local_sym_tab): ): continue param_type = HelperHandlerRegistry.get_param_type(func_name, arg_idx) - count[param_type] = count.get(param_type, 0) + 1 + if isinstance(param_type, ir.PointerType): + pointee_type = param_type.pointee + count[pointee_type] = count.get(pointee_type, 0) + 1 return count