Re: [PATCH] perf trace: avoid garbage when not printing an trace event's arguments

From: kernel test robot
Date: Sun Nov 03 2024 - 00:55:30 EST


Hi Benjamin,

kernel test robot noticed the following build errors:

[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on tip/perf/core perf-tools/perf-tools linus/master acme/perf/core v6.12-rc5 next-20241101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Benjamin-Peterson/perf-trace-avoid-garbage-when-not-printing-an-trace-event-s-arguments/20241101-085413
base: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
patch link: https://lore.kernel.org/r/20241101005338.5846-1-benjamin%40engflow.com
patch subject: [PATCH] perf trace: avoid garbage when not printing an trace event's arguments
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241103/202411031202.CkbT89xW-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411031202.CkbT89xW-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

Makefile.config:652: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
PERF_VERSION = 6.12.rc3.g6e02cf5e2f22
builtin-trace.c: In function 'trace__fprintf_tp_fields':
>> builtin-trace.c:3090:35: error: field precision specifier '.*' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
3090 | fprintf(trace->output, "%.*s", printed, bf);
| ~~^~ ~~~~~~~
| | |
| int size_t {aka long unsigned int}
cc1: all warnings being treated as errors
make[6]: *** [tools/build/Makefile.build:105: tools/perf/builtin-trace.o] Error 1
make[5]: *** [Makefile.perf:762: tools/perf/perf-in.o] Error 2
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile.perf:292: sub-make] Error 2
make[3]: *** [Makefile:76: all] Error 2

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki