summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorMichael Petlan <mpetlan@redhat.com>2026-05-20 00:38:55 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-05-20 15:50:32 -0300
commit017bca78e4d72b1ff027d368c20a1b2c654edaf7 (patch)
treec17ade6a4b358e116f05d2fca9ee556d3119ba84 /tools/perf/scripts/python/bin/stackcollapse-record
parentb5050b133e7ab3f49ac391f9e812a227ae09e01e (diff)
perf build-id: Fix off-by-one bug when printing kernel/module build-id
When changing sprintf functions to snprintf, one byte got lost. Since snprintf ones do not handle the '\0' terminating character, the number of printed characters is 40, while sizeof(sbuild_id) is 41, including the terminating '\0' character. This makes the later check fail so that nothing is printed. Fix that. Before: [Michael@Carbon ~]$ perf buildid-list -k [Michael@Carbon ~]$ After: [Michael@Carbon ~]$ perf buildid-list -k a527806324d543c4bc3ff2f9c9519d494fed5f68 [Michael@Carbon ~]$ Fixes: fccaaf6fbbc59910 ("perf build-id: Change sprintf functions to snprintf") Signed-off-by: Michael Petlan <mpetlan@redhat.com> Tested-by: Ian Rogers <irogers@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions