mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add explanation for direct_assign.py failing test
This commit is contained in:
@ -4,6 +4,18 @@ from pythonbpf.maps import HashMap
|
||||
|
||||
from ctypes import c_void_p, c_int64
|
||||
|
||||
# NOTE: I have decided to not fix this example for now.
|
||||
# The issue is in line 31, where we are passing an expression.
|
||||
# The update helper expects a pointer type. But the problem is
|
||||
# that we must allocate the space for said pointer in the first
|
||||
# basic block. As that usage is in a different basic block, we
|
||||
# are unable to cast the expression to a pointer type. (as we never
|
||||
# allocated space for it).
|
||||
# Shall we change our space allocation logic? That allows users to
|
||||
# spam the same helper with the same args, and still run out of
|
||||
# stack space. So we consider this usage invalid for now.
|
||||
# Might fix it later.
|
||||
|
||||
|
||||
@bpf
|
||||
@map
|
||||
|
||||
Reference in New Issue
Block a user