mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 01:48:35 +00:00
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>