]> git.feebdaed.xyz Git - 0xmirror/ebpf.git/commit
btf: fix copying behaviour for split BTF
authorLorenz Bauer <lmb@isovalent.com>
Tue, 6 May 2025 16:33:06 +0000 (17:33 +0100)
committerLorenz Bauer <lmb@users.noreply.github.com>
Wed, 7 May 2025 10:20:06 +0000 (12:20 +0200)
commitee99c66b27815ff8bc080739e735ee771f106b16
treeafa8bf037fb22f622d076e569fc0d32cb6499598
parent5c1db4f533947f8a9ab18f85bf0b959de5fac3df
btf: fix copying behaviour for split BTF

Make decoder.Copy do a deep copy of the base, so that types which are
inflated from the base in the future also point at the correct copy.

Do not copy base when constructing a new decoder, so that multiple
decoders can share a single base.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
btf/btf.go
btf/btf_test.go
btf/unmarshal.go