]> git.ipfire.org Git - thirdparty/glibc.git/commit
debug: Fix read error handling in pcprofiledump
authorFlorian Weimer <fweimer@redhat.com>
Tue, 10 Sep 2024 10:40:27 +0000 (12:40 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 10 Sep 2024 10:41:28 +0000 (12:41 +0200)
commit4e382ce01cce1ef2ab8548dc1dda2ad3046662d8
tree6f4ae53f34ea0727429d64429fc33d444a17e798
parent7f5027995f45337a3fc4bb6d0b2039ee1e685f2e
debug: Fix read error handling in pcprofiledump

The reading loops did not check for read failures.  Addresses
a static analysis report.

Manually tested by compiling a program with the GCC's
-finstrument-functions option, running it with
“LD_PRELOAD=debug/libpcprofile.so PCPROFILE_OUTPUT=output-file”,
and reviewing the output of “debug/pcprofiledump output-file”.

(cherry picked from commit 89b088bf70c651c231bf27e644270d093b8f144a)
debug/pcprofiledump.c