summaryrefslogtreecommitdiff
path: root/tools/perf/python/stackcollapse.py
diff options
context:
space:
mode:
authorDanish Khateeb <danishkhateeb03@gmail.com>2026-09-24 07:09:57 -0500
committerThomas Weißschuh <linux@weissschuh.net>2026-09-24 21:27:36 +0200
commit6f114ae7b6006ca7cf72e3e3348d263bbfec4525 (patch)
treea4d285efee2518f38545440c87965a156bbe5367 /tools/perf/python/stackcollapse.py
parent61fb00d6efeeeb9fd65c81db3bd8b2ac140f573c (diff)
downloadlinux-next-6f114ae7b6006ca7cf72e3e3348d263bbfec4525.tar.gz
linux-next-6f114ae7b6006ca7cf72e3e3348d263bbfec4525.zip
tools/nolibc: fix verrx() and errx() message formatting
verrx() passes its va_list to warnx() instead of vwarnx(). warnx() is variadic, so it takes the va_list as its first and only argument, and the conversions in the format string print the va_list itself and then whatever is left in the following argument slots. On x86_64, for instance, errx(1, "int args: %d %d %d", 1, 2, 3); prints something like "int args: -1699009032 1 2", where the first number comes from the address of the va_list and changes from run to run, and errx(1, "%d %s", 1234, "foo"); crashes with SIGSEGV, as "%s" takes a leftover argument slot for the string. errx() goes through verrx(), so every message with arguments printed by either of them is wrong. Call vwarnx() from verrx(), as verr() calls vwarn(). Fixes: 9da0f529c089 ("tools/nolibc: add err.h") Assisted-by: LLM Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com> Link: https://patch.msgid.link/20260924120958.23698-2-danishkhateeb03@gmail.com Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions