Skip to content

Comments

btf: Handle Tags when making copies#1582

Merged
ti-mo merged 1 commit intocilium:mainfrom
mejedi:copy-tags
Oct 10, 2024
Merged

btf: Handle Tags when making copies#1582
ti-mo merged 1 commit intocilium:mainfrom
mejedi:copy-tags

Conversation

@mejedi
Copy link
Contributor

@mejedi mejedi commented Oct 10, 2024

d4b2f8c introduced Tags on different types implementing btf.Type. Tags arrays are initialized at load time from declTag-s referring to the respective type.

Type-s are explicitly copied with btf.Copy, also implicitly when copying a btf.Spec. Semantically, it is a deep copy, hence Tags must be cloned as well.

d4b2f8c introduced Tags on different types implementing btf.Type. Tags
arrays are initialized at load time from declTag-s referring to the
respective type.

Type-s are explicitly copied with btf.Copy, also implicitly when copying
a btf.Spec. Semantically, it is a deep copy, hence Tags must be cloned
as well.

Signed-off-by: Nick Zavaritsky <[email protected]>
Copy link
Member

@dylandreimerink dylandreimerink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, seems like I forgot something 🤦. Nice catch, thank you.

@dylandreimerink dylandreimerink requested a review from ti-mo October 10, 2024 14:47
@ti-mo ti-mo merged commit c63a00b into cilium:main Oct 10, 2024
@mejedi mejedi deleted the copy-tags branch October 11, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants