You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The kernel uses sizeof(void*) instead. That size depends on which data model is used.The correct size of Pointer in Go land is actually unsafe.Sizeof(uintptr(0)), but we can't use that directly. We may read BTF generated on a 32 bit pointer arch on a 64 bit pointer arch and vice versa.
It would be nice if we could reject parsing BTF with a different pointer size, or add "proper" support for differing pointer sizes. (What would that look like though?)
The text was updated successfully, but these errors were encountered:
We currently hardcode pointer size:
ebpf/btf/types.go
Line 149 in 9447ec8
The kernel uses
sizeof(void*)
instead. That size depends on which data model is used.The correct size ofPointer
in Go land is actuallyunsafe.Sizeof(uintptr(0))
, but we can't use that directly. We may read BTF generated on a 32 bit pointer arch on a 64 bit pointer arch and vice versa.It would be nice if we could reject parsing BTF with a different pointer size, or add "proper" support for differing pointer sizes. (What would that look like though?)
The text was updated successfully, but these errors were encountered: