From d341cb24c025c59f7f55103d8babe754fa6d68e8 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 5 Oct 2025 04:27:37 +0530 Subject: [PATCH] Update explanation for named_arg --- tests/failing_tests/named_arg.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/failing_tests/named_arg.py b/tests/failing_tests/named_arg.py index edfe324..79ac830 100644 --- a/tests/failing_tests/named_arg.py +++ b/tests/failing_tests/named_arg.py @@ -5,13 +5,11 @@ from pythonbpf.maps import HashMap from ctypes import c_void_p, c_int64 # NOTE: This example exposes the problems with our typing system. -# We assign every variable the type i64* by default. -# lookup() return type is ptr, which can't be loaded. -# So we can't do steps on line 25 and 27. -# To counter this, we should allocate vars by speculating their type. -# And in the assign pass, we should have something like a -# recursive_dereferencer() that dereferences a ptr until it hits a non-ptr type. -# And a recursive_wrapper() that does the opposite. +# We can't do steps on line 25 and 27. +# prev is of type i64**. For prev + 1, we deref it down to i64 +# To assign it back to prev, we need to go back to i64**. +# We cannot allocate space for the intermediate type now. +# We probably need to track the ref/deref chain for each variable. @bpf @map