BPF List
 help / color / mirror / Atom feed
* [PATCH dwarves] btf_encoder: ensure elf function representation is fully initialized
@ 2023-02-08 22:54 Alan Maguire
  2023-02-09  9:36 ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Maguire @ 2023-02-08 22:54 UTC (permalink / raw)
  To: acme
  Cc: ast, andrii, daniel, eddyz87, haoluo, jolsa, john.fastabend,
	kpsingh, sinquersw, martin.lau, songliubraving, sdf, timo, yhs,
	bpf, Alan Maguire

new fields in BTF encoder state (used to support save and later
addition of function) of ELF function representation need to
be initialized.  No need to set parameter names to NULL as
got_parameter_names guards their use.

A follow-on patch intended to be applied after the series [1].

[1] https://lore.kernel.org/bpf/1675790102-23037-1-git-send-email-alan.maguire@oracle.com/

Suggested-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
 btf_encoder.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/btf_encoder.c b/btf_encoder.c
index 35fb60a..ea5b47b 100644
--- a/btf_encoder.c
+++ b/btf_encoder.c
@@ -1020,6 +1020,8 @@ static int btf_encoder__collect_function(struct btf_encoder *encoder, GElf_Sym *
 	}
 	encoder->functions.entries[encoder->functions.cnt].generated = false;
 	encoder->functions.entries[encoder->functions.cnt].function = NULL;
+	encoder->functions.entries[encoder->functions.cnt].state.got_parameter_names = false;
+	encoder->functions.entries[encoder->functions.cnt].state.type_id_off = 0;
 	encoder->functions.cnt++;
 	return 0;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-09 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 22:54 [PATCH dwarves] btf_encoder: ensure elf function representation is fully initialized Alan Maguire
2023-02-09  9:36 ` Jiri Olsa
2023-02-09 11:59   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox