]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 515183 - Error occurred while executing the command `valgrind --num-callers=1...
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 5 Feb 2026 19:41:07 +0000 (20:41 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 5 Feb 2026 19:41:07 +0000 (20:41 +0100)
NEWS
coregrind/m_main.c
docs/xml/manual-core.xml
memcheck/tests/Makefile.am
memcheck/tests/num_callers_1.stderr.exp [new file with mode: 0644]
memcheck/tests/num_callers_1.vgtest [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 81f154526f12154fa553c1e3cfc396b5c0bae093..bc42d644339655f5f126c73528b4c609fa52f315 100644 (file)
--- 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
index 0bd929d0cc1430281bdfeefc001dc950fa4aaf19..0046df38496f163752b90a46172c8ee4f2bb2a5b 100644 (file)
@@ -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),
index 9ab09b51bf00cdba4b4342cc26f3c548c406af9a..f132de9a6f22087ee75530394a6407312f0176af 100644 (file)
@@ -1188,6 +1188,14 @@ that can report errors, e.g. Memcheck, but not Cachegrind.</para>
       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.</para>
+
+      <para>The minimum value for this is 2. A value of 1 is not allowed
+      for two reasons. Firstly, some of the default suppressions use
+      "<computeroutput>...</computeroutput>" which is forbidden with
+      <computeroutput>--num-callers=1</computeroutput>. Secondly, it would
+      make leak suppressions match all allocations using the allocation
+      function (e.g., <computeroutput>malloc</computeroutput>).</para>
+
     </listitem>
   </varlistentry>
 
index 88e995cde9fc61510524d3d4073da228e14f4f8a..30a245776eb132e182a01349db69b61520ea1be6 100644 (file)
@@ -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 (file)
index 0000000..a130507
--- /dev/null
@@ -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 (file)
index 0000000..5ff78ca
--- /dev/null
@@ -0,0 +1,2 @@
+prog: ../../tests/true
+vgopts: -q --num-callers=1