Files
python-bpf/pythonbpf
Pragyansh Chaturvedi 1a2a7f144a Core: Dereference a pointer wherever a number is wanted, not only in operands
return p and p + 1 on a map lookup worked, because they go through
get_typed_operand, which loads through the pointer with a null check.
r.val = p, x = p into an integer local, and c_int64(p) (so also
return c_int64(p)) did not: those three sites call eval_expr directly
and handed the pointer to the integer path, failing with i64* vs i64.

deref_to_value is get_typed_operand's pointer fallback as a helper, used
by it and by the three sites, only when the destination is an integer:
a pointer slot still aliases (q = p), and an opaque pointer, which names
no pointee, is left alone. The descriptor takes the map's declared value
ctype, as the operand path does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 13:15:42 +05:30
..
2025-10-14 04:22:17 +05:30
2026-09-23 21:05:33 +05:30
2026-09-23 21:05:33 +05:30