mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] perf script: Completing error handling?
@ 2024-07-17 13:55 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-07-17 13:55 UTC (permalink / raw)
  To: linux-perf-users, kernel-janitors, Adrian Hunter,
	Alexander Shishkin, Arnaldo Carvalho de Melo, Ian Rogers,
	Ingo Molnar, Jiri Olsa, Kan Liang, Mark Rutland, Namhyung Kim,
	Peter Zijlstra
  Cc: LKML

Hello,

I noticed that source code like “printed += fprintf(fp, …)” is used
in some function implementations.
https://elixir.bootlin.com/linux/v6.10/source/tools/perf/builtin-script.c#L697

I find that return values should be checked somehow at 63 places.

See also:
* https://cwe.mitre.org/data/definitions/252.html

* https://wiki.sei.cmu.edu/confluence/display/c/POS54-C.+Detect+and+handle+POSIX+library+errors


Regards,
Markus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-17 13:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-17 13:55 [RFC] perf script: Completing error handling? Markus Elfring

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

all inboxes | Powered by JetHome®