From: Paul Floyd Date: Thu, 5 Feb 2026 19:41:07 +0000 (+0100) Subject: Bug 515183 - Error occurred while executing the command `valgrind --num-callers=1... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f2d24358a2706afd93c64d95d4a4069180b3cf;p=thirdparty%2Fvalgrind.git Bug 515183 - Error occurred while executing the command `valgrind --num-callers=1 ./hello_world` --- diff --git a/NEWS b/NEWS index 81f154526..bc42d6443 100644 --- a/NEWS +++ b/NEWS @@ -77,7 +77,10 @@ are not entered into bugzilla tend to get forgotten about or ignored. 514659 ltp 20250930 vs linux 6.18.3 doesn't build 514762 Many "Bad file descriptor" messages when using --track-fds=yes and -d on systems without /proc -515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit +515183 Error occurred while executing the command + `valgrind --num-callers=1 ./hello_world` +515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit + To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 0bd929d0c..0046df384 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -721,7 +721,7 @@ static void process_option (Clo_Mode mode, else if VG_INT_CLO (arg, "--dump-error", VG_(clo_dump_error)) {} else if VG_INT_CLO (arg, "--input-fd", VG_(clo_input_fd)) {} else if VG_INT_CLO (arg, "--sanity-level", VG_(clo_sanity_level)) {} - else if VG_BINT_CLO(arg, "--num-callers", VG_(clo_backtrace_size), 1, + else if VG_BINT_CLO(arg, "--num-callers", VG_(clo_backtrace_size), 2, VG_DEEPEST_BACKTRACE) {} else if VG_BINT_CLO(arg, "--num-transtab-sectors", VG_(clo_num_transtab_sectors), diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index 9ab09b51b..f132de9a6 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -1188,6 +1188,14 @@ that can report errors, e.g. Memcheck, but not Cachegrind. will make Valgrind run a bit more slowly and take a bit more memory, but can be useful when working with programs with deeply-nested call chains. + + The minimum value for this is 2. A value of 1 is not allowed + for two reasons. Firstly, some of the default suppressions use + "..." which is forbidden with + --num-callers=1. Secondly, it would + make leak suppressions match all allocations using the allocation + function (e.g., malloc). + diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 88e995cde..30a245776 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -206,6 +206,7 @@ EXTRA_DIST = \ new_delete_mismatch_size_supp.stderr.exp-32 \ new_delete_mismatch_size_supp.vgtest \ new_delete_mismatch_size_supp.supp \ + num_callers_1.stderr.exp num_callers_1.vgtest \ deep-backtrace.vgtest deep-backtrace.stderr.exp \ demangle.stderr.exp demangle.vgtest \ big_debuginfo_symbol.vgtest \ diff --git a/memcheck/tests/num_callers_1.stderr.exp b/memcheck/tests/num_callers_1.stderr.exp new file mode 100644 index 000000000..a130507c0 --- /dev/null +++ b/memcheck/tests/num_callers_1.stderr.exp @@ -0,0 +1,3 @@ +valgrind: Bad option: --num-callers=1 +valgrind: '--num-callers' argument must be between 2 and 500 +valgrind: Use --help for more information or consult the user manual. diff --git a/memcheck/tests/num_callers_1.vgtest b/memcheck/tests/num_callers_1.vgtest new file mode 100644 index 000000000..5ff78cadb --- /dev/null +++ b/memcheck/tests/num_callers_1.vgtest @@ -0,0 +1,2 @@ +prog: ../../tests/true +vgopts: -q --num-callers=1