]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Changed error messages: now don't print anything below main() unless the new
authorNicholas Nethercote <n.nethercote@gmail.com>
Thu, 13 Nov 2003 17:35:04 +0000 (17:35 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Thu, 13 Nov 2003 17:35:04 +0000 (17:35 +0000)
option --show-below-main is on.  It's on by default.  It also affects
suppressions generated with --gen-suppressions=yes.  Updated reg tests
accordingly.

Also updated docs for this.  And added some missing command-line args to docs.
Also compartmentalised the options a little in the docs, and rearranged the
order of options in the usage message, in anticipation of a bigger
rearrangement that will be necessary soon -- to distinguish options used by all
skins from those used by error-checking skins, to skin-specific ones.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2020

37 files changed:
addrcheck/tests/badrw.stderr.exp
addrcheck/tests/fprw.stderr.exp
coregrind/docs/coregrind_core.html
coregrind/vg_errcontext.c
coregrind/vg_include.h
coregrind/vg_main.c
coregrind/vg_symtab2.c
memcheck/tests/badaddrvalue.stderr.exp
memcheck/tests/badfree.stderr.exp
memcheck/tests/badloop.stderr.exp
memcheck/tests/badrw.stderr.exp
memcheck/tests/clientperm.stderr.exp
memcheck/tests/custom_alloc.stderr.exp
memcheck/tests/doublefree.stderr.exp
memcheck/tests/exitprog.stderr.exp
memcheck/tests/fprw.stderr.exp
memcheck/tests/fwrite.stderr.exp
memcheck/tests/inits.stderr.exp
memcheck/tests/inline.stderr.exp
memcheck/tests/malloc1.stderr.exp
memcheck/tests/malloc2.stderr.exp
memcheck/tests/manuel1.stderr.exp
memcheck/tests/manuel2.stderr.exp
memcheck/tests/manuel3.stderr.exp
memcheck/tests/memalign_test.stderr.exp
memcheck/tests/memcmptest.stderr.exp
memcheck/tests/metadata.stderr.exp
memcheck/tests/mismatches.stderr.exp
memcheck/tests/nanoleak.stderr.exp
memcheck/tests/overlap.stderr.exp
memcheck/tests/pushfpopf.stderr.exp
memcheck/tests/realloc3.stderr.exp
memcheck/tests/signal2.stderr.exp
memcheck/tests/supp2.stderr.exp
memcheck/tests/trivialleak.stderr.exp
memcheck/tests/tronical.stderr.exp
memcheck/tests/writev.stderr.exp

index c231c5d6898935d4591f49f95aff4994ee702a99..4ac32de3cb3887c91cc2f097987af4bd38050d6c 100644 (file)
@@ -1,59 +1,35 @@
 Invalid read of size 4
    at 0x........: main (badrw.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 4
    at 0x........: main (badrw.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 2
    at 0x........: main (badrw.c:13)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 2
    at 0x........: main (badrw.c:13)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 1
    at 0x........: main (badrw.c:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 1
    at 0x........: main (badrw.c:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 41f8ada241693b7debbfbeec34da5da21fb04d8b..43d29c70403f986ce17353d7aade70ae1d5d675a 100644 (file)
@@ -1,56 +1,34 @@
 Invalid read of size 8
    at 0x........: main (fprw.c:20)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 8 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:18)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 8
    at 0x........: main (fprw.c:20)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 8 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:18)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 4
    at 0x........: main (fprw.c:21)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:19)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 4
    at 0x........: main (fprw.c:21)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:19)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:22)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 
 Invalid write of size 8
    at 0x........: main (fprw.c:24)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:23)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index f801ebc739b3efa07f2232b546f73cfaf336a214..cbf624568d6a6a63ad7a389713d3f42dd9972448 100644 (file)
@@ -493,12 +493,24 @@ options.  Options for the valgrind core may be freely mixed with those
 for the selected skin.
 
 <p>Valgrind's default settings succeed in giving reasonable behaviour
-in most cases.  Available options, in no particular order, are as
-follows:
+in most cases.  We group the available options by rough categories.
+
+<h4>Skin-selection option</h4>
+The single most important option.
+<ul>
+  <li><code>--skin=<i>name</i></code><br>
+      <p>Run the Valgrind tool called <i>name</i>, e.g. Memcheck, Addrcheck,
+      Cachegrind, etc.
+      </li><br><p>
+</ul>
+
+<h4>Basic Options</h4>
+These options work with all skins.
+
 <ul>
   <li><code>--help</code><br>
       <p>Show help for all options, both for the core and for the
-      selected skin.
+      selected skin. </li><br><p>
 
   <li><code>--version</code><br> <p>Show the version number of the
       valgrind core.  Skins can have their own version numbers.  There
@@ -520,8 +532,46 @@ follows:
       machinery.
       </li><br><p>
 
+  <li><code>--trace-children=no</code> [default]<br>
+      <code>--trace-children=yes</code>
+      <p>When enabled, Valgrind will trace into child processes.  This
+      is confusing and usually not what you want, so is disabled by
+      default.
+      </li><br><p>
+
+  <li><code>--logfile-fd=&lt;number&gt;</code> [default: 2, stderr]
+      <p>Specifies that Valgrind should send all of its
+      messages to the specified file descriptor.  The default, 2, is
+      the standard error channel (stderr).  Note that this may
+      interfere with the client's own use of stderr.  
+      </li><br><p>
+
+  <li><code>--logfile=&lt;filename&gt;</code>
+      <p>Specifies that Valgrind should send all of its
+      messages to the specified file.  In fact, the file name used
+      is created by concatenating the text <code>filename</code>,
+      ".pid" and the process ID, so as to create a file per process.
+      The specified file name may not be the empty string.
+      </li><br><p>
+
+  <li><code>--logsocket=&lt;ip-address:port-number&gt;</code>
+      <p>Specifies that Valgrind should send all of its messages to
+      the specified port at the specified IP address.  The port may be
+      omitted, in which case port 1500 is used.  If a connection
+      cannot be made to the specified socket, valgrind falls back to
+      writing output to the standard error (stderr).  This option is
+      intended to be used in conjunction with the
+      <code>valgrind-listener</code> program.  For further details,
+      see section <a href="#core-comment">2.3</a>.
+      </li><br><p>
+</ul>
+
+<h4>Error-related options</h4>
+These options are used by all skins that can report errors, e.g. Memcheck, but
+not Cachegrind.
+<ul>
   <li><code>--demangle=no</code><br>
-      <code>--demangle=yes</code> [the default]
+      <code>--demangle=yes</code> [default]
       <p>Disable/enable automatic demangling (decoding) of C++ names.
       Enabled by default.  When enabled, Valgrind will attempt to
       translate encoded C++ procedure names back to something
@@ -552,7 +602,59 @@ follows:
       deeply-nested call chains.  
       </li><br><p>
 
-  <li><code>--gdb-attach=no</code> [the default]<br>
+  <li><code>--error-limit=yes</code> [default]<br>
+      <code>--error-limit=no</code> <p>When enabled, valgrind stops
+      reporting errors after 30000 in total, or 300 different ones,
+      have been seen.  This is to stop the error tracking machinery
+      from becoming a huge performance overhead in programs with many
+      errors.  
+      </li><br><p>
+
+  <li><code>--show-below-main=yes</code><br>
+      <code>--show-below-main=no</code>  [default]
+      <p>By default, stack traces for errors do not show any functions that
+      appear beneath <code>main()</code>;  most of the time it's uninteresting
+      C library stuff.  If this option is enabled, these entries below
+      <code>main()</code> will be shown.
+      </li><br><p>
+
+  <li><code>--suppressions=&lt;filename&gt;</code> 
+      [default: $PREFIX/lib/valgrind/default.supp]
+      <p>Specifies an extra
+      file from which to read descriptions of errors to suppress.  You
+      may use as many extra suppressions files as you
+      like.
+      </li><br><p>
+
+  <li><code>--gen-suppressions=no</code> [default]<br>
+      <code>--gen-suppressions=yes</code>
+      <p>When enabled, Valgrind will pause after every error shown,
+      and print the line
+      <br>
+      <code>---- Print suppression ? --- [Return/N/n/Y/y/C/c] ----</code>
+      <p>
+      The prompt's behaviour is the same as for the <code>--gdb-attach</code>
+      option.
+      <p>
+      If you choose to, Valgrind will print out a suppression for this error.
+      You can then cut and paste it into a suppression file if you don't want
+      to hear about the error in the future.
+      <p>
+      This option is particularly useful with C++ programs, as it prints out
+      the suppressions with mangled names, as required.
+      <p>
+      Note that the suppressions printed are as specific as possible.  You
+      may want to common up similar ones, eg. by adding wildcards to function
+      names.  Also, sometimes two different errors are suppressed by the same
+      suppression, in which case Valgrind will output the suppression more than
+      once, but you only need to have one copy in your suppression file (but
+      having more than one won't cause problems).  Also, the suppression
+      name is given as <code>&lt;insert a suppression name here&gt;</code>;
+      the name doesn't really matter, it's only used with the
+      <code>-v</code> option which prints out all used suppression records.
+      </li><br><p>
+
+  <li><code>--gdb-attach=no</code> [default]<br>
       <code>--gdb-attach=yes</code>
       <p>When enabled, Valgrind will pause after every error shown,
       and print the line
@@ -601,36 +703,13 @@ follows:
       allows you to specify an alternative file descriptor from
       which to read input.  
       </li><br><p>
+</ul>
 
-  <li><code>--gen-suppressions=no</code> [the default]<br>
-      <code>--gen-suppressions=yes</code>
-      <p>When enabled, Valgrind will pause after every error shown,
-      and print the line
-      <br>
-      <code>---- Print suppression ? --- [Return/N/n/Y/y/C/c] ----</code>
-      <p>
-      The prompt's behaviour is the same as for the <code>--gdb-attach</code>
-      option.
-      <p>
-      If you choose to, Valgrind will print out a suppression for this error.
-      You can then cut and paste it into a suppression file if you don't want
-      to hear about the error in the future.
-      <p>
-      This option is particularly useful with C++ programs, as it prints out
-      the suppressions with mangled names, as required.
-      <p>
-      Note that the suppressions printed are as specific as possible.  You
-      may want to common up similar ones, eg. by adding wildcards to function
-      names.  Also, sometimes two different errors are suppressed by the same
-      suppression, in which case Valgrind will output the suppression more than
-      once, but you only need to have one copy in your suppression file (but
-      having more than one won't cause problems).  Also, the suppression
-      name is given as <code>&lt;insert a suppression name here&gt;</code>;
-      the name doesn't really matter, it's only used with the
-      <code>-v</code> option which prints out all used suppression records.
-      </li><br><p>
-
-  <li><code>--alignment=&lt;number></code> [default: 4]<br> <p>By
+<h4><code>malloc()</code>-related options</h4>
+For skins that use their own version of <code>malloc()</code> (e.g. Memcheck
+and Addrcheck), the following options apply.
+<ul>
+  <li><code>--alignment=&lt;number&gt;</code> [default: 4]<br> <p>By
       default valgrind's <code>malloc</code>, <code>realloc</code>,
       etc, return 4-byte aligned addresses.  These are suitable for
       any accesses on x86 processors. 
@@ -641,7 +720,7 @@ follows:
       increased using this parameter.  The supplied value must be
       between 4 and 4096 inclusive, and must be a power of two.</li><br><p>
 
-  <li><code>--sloppy-malloc=no</code> [the default]<br>
+  <li><code>--sloppy-malloc=no</code> [default]<br>
       <code>--sloppy-malloc=yes</code>
       <p>When enabled, all requests for malloc/calloc are rounded up
       to a whole number of machine words -- in other words, made
@@ -661,57 +740,13 @@ follows:
       work correctly, and you should fix it, at least if you hope for
       maximum portability.
       </li><br><p>
+</ul>
 
-  <li><code>--trace-children=no</code> [the default]<br>
-      <code>--trace-children=yes</code>
-      <p>When enabled, Valgrind will trace into child processes.  This
-      is confusing and usually not what you want, so is disabled by
-      default.
-      </li><br><p>
-
-  <li><code>--logfile-fd=&lt;number></code> [default: 2, stderr]
-      <p>Specifies that Valgrind should send all of its
-      messages to the specified file descriptor.  The default, 2, is
-      the standard error channel (stderr).  Note that this may
-      interfere with the client's own use of stderr.  
-      </li><br><p>
-
-  <li><code>--logfile=&lt;filename></code>
-      <p>Specifies that Valgrind should send all of its
-      messages to the specified file.  In fact, the file name used
-      is created by concatenating the text <code>filename</code>,
-      ".pid" and the process ID, so as to create a file per process.
-      The specified file name may not be the empty string.
-      </li><br><p>
-
-  <li><code>--logsocket=&lt;ip-address:port-number></code>
-      <p>Specifies that Valgrind should send all of its messages to
-      the specified port at the specified IP address.  The port may be
-      omitted, in which case port 1500 is used.  If a connection
-      cannot be made to the specified socket, valgrind falls back to
-      writing output to the standard error (stderr).  This option is
-      intended to be used in conjunction with the
-      <code>valgrind-listener</code> program.  For further details,
-      see section <a href="#core-comment">2.3</a>.
-      </li><br><p>
-
-  <li><code>--suppressions=&lt;filename></code> 
-      [default: $PREFIX/lib/valgrind/default.supp]
-      <p>Specifies an extra
-      file from which to read descriptions of errors to suppress.  You
-      may use as many extra suppressions files as you
-      like.
-      </li><br><p>
-
-  <li><code>--error-limit=yes</code> [default]<br>
-      <code>--error-limit=no</code> <p>When enabled, valgrind stops
-      reporting errors after 30000 in total, or 300 different ones,
-      have been seen.  This is to stop the error tracking machinery
-      from becoming a huge performance overhead in programs with many
-      errors.  
-      </li><br><p>
-
-  <li><code>--run-libc-freeres=yes</code> [the default]<br>
+<h4>Rare options</h4>
+These options apply to all skins, as they affect certain obscure workings of
+the Valgrind core.  Most people won't need to use these.
+<ul>
+  <li><code>--run-libc-freeres=yes</code> [default]<br>
       <code>--run-libc-freeres=no</code>
       <p>The GNU C library (<code>libc.so</code>), which is used by
       all programs, may allocate memory for its own uses.  Usually it
@@ -805,6 +840,27 @@ follows:
           very tiresome.
       </ul>
       </li><br><p>
+
+  <li><code>--signal-polltime=&lt;time&gt;</code> [default=50]<br>
+      <p>How often to poll for signals (in milliseconds).  Only applies for
+      older kernels that need signal routing.
+      </li><br><p>
+
+  <li><code>--lowlat-signals=no</code> [default]<br>
+      <code>--lowlat-signals=yes</code><br>
+      <p>Improve wake-up latency when a thread receives a signal.
+      </li><br><p>
+
+  <li><code>--lowlat-syscalls=no</code> [default]<br>
+      <code>--lowlat-syscalls=yes</code><br>
+      <p>Improve wake-up latency when a thread's syscall completes. 
+      </li><br><p>
+
+  <li><code>--assume-2.4=no</code> [default]<br>
+      <code>--assume-2.4=yes</code><br>
+      <p>Assume we're running on a 2.4 kernel.  Only needed for some
+      distributions that are broken in obscure ways.
+      </li><br><p>
 </ul>
 
 There are also some options for debugging Valgrind itself.  You
index 3c76f05cbc81d83e58ebf75cab87f0ad2c3c449b..7f4f72947e066c965f14aebaa27ae94a4bd7cf96 100644 (file)
@@ -195,6 +195,7 @@ void VG_(gen_suppression)(Error* err)
 {
    Int         i;
    UChar       buf[M_VG_ERRTXT];
+   Bool        main_done = False;
    ExeContext* ec      = VG_(get_error_where)(err);
    Int         stop_at = VG_(clo_backtrace_size);
 
@@ -222,10 +223,16 @@ void VG_(gen_suppression)(Error* err)
    i = 0;
    do {
       Addr eip = ec->eips[i];
-      if (i > 0)
-         eip--;                 /* point to calling line */
-
+      if (i > 0) eip--;                 /* point to calling line */
       if ( VG_(get_fnname_nodemangle) (eip, buf,  M_VG_ERRTXT) ) {
+         // Stop after "main";  if main() is recursive, stop after last main().
+
+         if ( ! VG_(clo_show_below_main)) {
+            if (VG_STREQ(buf, "main"))
+               main_done = True;
+            else if (main_done)
+               break;
+         }
          VG_(printf)("   fun:%s\n", buf);
       } else if ( VG_(get_objname)(eip, buf, M_VG_ERRTXT) ) {
          VG_(printf)("   obj:%s\n", buf);
index 9eea7b508151e7b9a006e2be5be38c6c694ea8f1..ecc0506d3b94c5b51beaca00d08f4d404e8bf2bb 100644 (file)
@@ -265,6 +265,8 @@ extern Bool  VG_(clo_lowlat_signals);
 extern Bool  VG_(clo_run_libc_freeres);
 /* Use the basic-block chaining optimisation?  Default: YES */
 extern Bool VG_(clo_chain_bb);
+/* Continue stack traces below main()?  Default: NO */
+extern Bool VG_(clo_show_below_main);
 
 
 /* ---------------------------------------------------------------------
index 91baec20ae4d0b3457196767f9c6dbf88e8c8adc..de67610f33f8d38c8d50b4d6344840cbfe76d3fd 100644 (file)
@@ -558,6 +558,7 @@ Int    VG_(clo_backtrace_size) = 4;
 Char*  VG_(clo_weird_hacks)    = NULL;
 Bool   VG_(clo_run_libc_freeres) = True;
 Bool   VG_(clo_chain_bb)       = True;
+Bool   VG_(clo_show_below_main) = False;
 
 static Bool   VG_(clo_wait_for_gdb)   = False;
 
@@ -636,26 +637,33 @@ static void usage ( void )
 "usage: valgrind [options] prog-and-args\n"
 "\n"
 "  core user options, with defaults in [ ], are:\n"
+"    --skin=<name>             main task (skin to use) [Valgrind]\n"
+
 "    --help                    show this message\n"
 "    --version                 show version\n"
-"    --skin=<name>             main task (skin to use) [Valgrind]\n"
+
 "    -q --quiet                run silently; only print error msgs\n"
 "    -v --verbose              be more verbose, incl counts of errors\n"
-"    --gdb-attach=no|yes       start GDB when errors detected? [no]\n"
-"    --gdb-path=/path/to/gdb   path to the GDB to use [/usr/bin/gdb]\n"
-"    --gen-suppressions=no|yes print suppressions for errors detected [no]\n"
-"    --demangle=no|yes         automatically demangle C++ names? [yes]\n"
-"    --num-callers=<number>    show <num> callers in stack traces [4]\n"
-"    --error-limit=no|yes      stop showing new errors if too many? [yes]\n"
+
 "    --trace-children=no|yes   Valgrind-ise child processes? [no]\n"
-"    --run-libc-freeres=no|yes Free up glibc memory at exit? [yes]\n"
+
 "    --logfile-fd=<number>     file descriptor for messages [2=stderr]\n"
 "    --logfile=<file>          log messages to <file>.pid<pid>\n"
-"    --input-fd=<number>       file descriptor for (gdb) input [0=stdin]\n"
 "    --logsocket=ipaddr:port   log messages to socket ipaddr:port\n"
-"    --suppressions=<filename> suppress errors described in\n"
-"                              suppressions file <filename>\n"
-"    --weird-hacks=hack1,hack2,...  [no hacks selected]\n"
+
+"    --demangle=no|yes         automatically demangle C++ names? [yes]\n"
+"    --num-callers=<number>    show <num> callers in stack traces [4]\n"
+"    --error-limit=no|yes      stop showing new errors if too many? [yes]\n"
+"    --show-below-main=no|yes  continue stack traces below main() [no]\n"
+"    --suppressions=<filename> suppress errors described in <filename>\n"
+"    --gen-suppressions=no|yes print suppressions for errors detected [no]\n"
+
+"    --gdb-attach=no|yes       start GDB when errors detected? [no]\n"
+"    --gdb-path=/path/to/gdb   path to the GDB to use [/usr/bin/gdb]\n"
+"    --input-fd=<number>       file descriptor for (gdb) input [0=stdin]\n"
+
+"    --run-libc-freeres=no|yes Free up glibc memory at exit? [yes]\n"
+"    --weird-hacks=hack1,hack2,...  [none]\n"
 "         recognised hacks are: ioctl-VTIME truncate-writes lax-ioctls\n"
 "    --signal-polltime=<time>  time, in mS, we should poll for signals.\n"
 "                              Only applies for older kernels which need\n"
@@ -971,6 +979,11 @@ static void process_cmd_line_options ( void )
       else if (VG_CLO_STREQ(argv[i], "--gen-suppressions=no"))
          VG_(clo_gen_suppressions) = False;
 
+      else if (VG_CLO_STREQ(argv[i], "--show-below-main=yes"))
+         VG_(clo_show_below_main) = True;
+      else if (VG_CLO_STREQ(argv[i], "--show-below-main=no"))
+         VG_(clo_show_below_main) = False;
+
       else if (VG_CLO_STREQ(argv[i], "--demangle=yes"))
          VG_(clo_demangle) = True;
       else if (VG_CLO_STREQ(argv[i], "--demangle=no"))
index 3a227e21b235b2b9af90a4f5918a6fced5beda28..df533c244a97f36d4848012d9a27a2f21a053f06 100644 (file)
@@ -1899,19 +1899,28 @@ void VG_(mini_stack_dump) ( Addr eips[], UInt n_eips )
 {
    UInt  i;
    UChar buf[M_VG_ERRTXT];
-   Char* how;
+   Bool  main_done = False;
 
    Int stop_at = n_eips;
 
    vg_assert(stop_at > 0);
 
+   /* This loop is the basis for the one in VG_(gen_suppressions)();  if you
+      change this, change it too! */
    i = 0;
    do {
       Addr eip = eips[i];
       if (i  > 0) eip--;            /* point to calling line */
-      if (i == 0) how = "at"; else how = "by";
       VG_(describe_eip)(eip, buf, M_VG_ERRTXT);
-      VG_(message)(Vg_UserMsg, "   %s %s", how, buf);
+
+      if ( ! VG_(clo_show_below_main)) {
+         // Stop after "main";  if main() is recursive, stop after last main().
+         if (VG_(strstr)(buf, " main ("))
+            main_done = True;
+         else if (main_done)
+            break;
+      }
+      VG_(message)(Vg_UserMsg, "   %s %s", ( i == 0 ? "at" : "by" ), buf);
       i++;
 
    } while (i < (UInt)stop_at && eips[i] != 0);
index 702daa5b4edd5e818f23ccad712efac3ffeed319..81729546adbd72b9a70018ac85cccfdd46d1d41e 100644 (file)
@@ -1,19 +1,11 @@
 Invalid write of size 1
    at 0x........: main (badaddrvalue.c:8)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 8 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badaddrvalue.c:7)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 1
    at 0x........: main (badaddrvalue.c:9)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 8 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badaddrvalue.c:7)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index ac23565c7d110e94a0ccebdffb723fdd29d35b5f..6308cc47f5d1104b084a8ea6d42bebf9bea4073d 100644 (file)
@@ -1,13 +1,9 @@
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (badfree.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (badfree.c:15)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is on thread 1's stack
index 3707f3a51c43f1d65b1e50f4a812624ce36be696..4c53707ae30444002277d136054b6af1f1f8df1b 100644 (file)
@@ -1,4 +1,2 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (badloop.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index c231c5d6898935d4591f49f95aff4994ee702a99..4ac32de3cb3887c91cc2f097987af4bd38050d6c 100644 (file)
@@ -1,59 +1,35 @@
 Invalid read of size 4
    at 0x........: main (badrw.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 4
    at 0x........: main (badrw.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 2
    at 0x........: main (badrw.c:13)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 2
    at 0x........: main (badrw.c:13)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 4 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 1
    at 0x........: main (badrw.c:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 1
    at 0x........: main (badrw.c:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (badrw.c:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 77f96a6ff78557e91b2d249be80e90084274f2c4..5f93d81a259dd8e45def689447b2c18d573ca391 100644 (file)
@@ -1,9 +1,5 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (clientperm.c:29)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (clientperm.c:36)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 8485d7a8dc5681953789969ef7d5f0ef31dd65e9..6dd60a4d35a1854b47f76f99a7b0926a74dedf63 100644 (file)
@@ -1,37 +1,25 @@
 Invalid write of size 4
    at 0x........: main (custom_alloc.c:79)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 48 bytes inside a block of size 100000 client-defined
    at 0x........: get_superblock (custom_alloc.c:25)
    by 0x........: custom_alloc (custom_alloc.c:40)
    by 0x........: main (custom_alloc.c:76)
-   by 0x........: __libc_start_main (...libc...)
 
 Invalid free() / delete / delete[]
    at 0x........: custom_free (custom_alloc.c:54)
    by 0x........: main (custom_alloc.c:83)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 
 Mismatched free() / delete / delete []
    at 0x........: custom_free (custom_alloc.c:54)
    by 0x........: main (custom_alloc.c:86)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 40 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (custom_alloc.c:85)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 4
    at 0x........: main (custom_alloc.c:89)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 8 bytes inside a block of size 100000 client-defined
    at 0x........: get_superblock (custom_alloc.c:25)
    by 0x........: custom_alloc (custom_alloc.c:40)
    by 0x........: main (custom_alloc.c:76)
-   by 0x........: __libc_start_main (...libc...)
index 6ef7f8fc4ee9b775d700fc439cdcd19f3f886163..8a952521187d97ce058dfb9d4d169750bdd8431a 100644 (file)
@@ -1,10 +1,6 @@
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (doublefree.c:10)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 177 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (doublefree.c:10)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index ae02311c942f85d9928f96250a4c9b9c2f17bf04..b19f777931242ed96d0b4efd9e2ff38d3a738182 100644 (file)
@@ -1,9 +1,5 @@
 Invalid write of size 1
    at 0x........: main (exitprog.c:18)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes after a block of size 1000000 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (exitprog.c:15)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 5371a3b4cd8249e2cece338884c243497641c3b5..c6cd31f89c71d0c990901129dbeaf9fa6fb0c83f 100644 (file)
@@ -1,76 +1,46 @@
 Use of uninitialised value of size 8
    at 0x........: main (fprw.c:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Use of uninitialised value of size 4
    at 0x........: main (fprw.c:15)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Use of uninitialised value of size 8
    at 0x........: main (fprw.c:16)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Use of uninitialised value of size 4
    at 0x........: main (fprw.c:17)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 8
    at 0x........: main (fprw.c:20)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 8 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:18)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 8
    at 0x........: main (fprw.c:20)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 8 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:18)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 4
    at 0x........: main (fprw.c:21)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:19)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid write of size 4
    at 0x........: main (fprw.c:21)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:19)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:22)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 
 Invalid write of size 8
    at 0x........: main (fprw.c:24)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (fprw.c:23)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 21b0dc5c1f3e408a7ecd4630e40716cc4026d03b..0466b8fac0d0fb96ba94281e1ff97204c41c4052 100644 (file)
@@ -5,5 +5,3 @@ Syscall param write(buf) contains uninitialised or unaddressable byte(s)
    Address 0x........ is 0 bytes inside a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (fwrite.c:6)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 5d28028c62be66c00229169c0689d7ef954675fe..a190cfa918635a8862862ab329894c37167aede9 100644 (file)
@@ -1,4 +1,2 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (inits.c:17)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 338b397e9cd5a9e92a7380e949a38758acda242c..6b46a9dccf415a426c5161bd2e463d5734ecbe93 100644 (file)
@@ -1,10 +1,6 @@
 Invalid read of size 4
    at 0x........: addemup (inline.c:10)
    by 0x........: main (inline.c:18)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes after a block of size 40 alloc'd
    at 0x........: calloc (vg_replace_malloc.c:...)
    by 0x........: main (inline.c:17)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index d8b2c141122b0569d57949a742d8077adffdf0b1..0533f9bbb2fb4baa03986bed758132abd36610ab 100644 (file)
@@ -1,21 +1,15 @@
 Invalid write of size 1
    at 0x........: really (malloc1.c:20)
    by 0x........: main (malloc1.c:9)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes inside a block of size 10 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: really (malloc1.c:19)
    by 0x........: main (malloc1.c:9)
-   by 0x........: __libc_start_main (...libc...)
 
 Invalid write of size 1
    at 0x........: really (malloc1.c:23)
    by 0x........: main (malloc1.c:9)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 1 bytes before a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: really (malloc1.c:21)
    by 0x........: main (malloc1.c:9)
-   by 0x........: __libc_start_main (...libc...)
index 13aaff161a4a4d37ce70eebcfce06117a5cebb31..1a7e2ea56ae742ed5a6ea853ed2f9c201648bfa5 100644 (file)
@@ -1,20 +1,12 @@
 Invalid write of size 1
    at 0x........: main (malloc2.c:39)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 429 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (malloc2.c:38)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (malloc2.c:43)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 429 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (malloc2.c:38)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 241b7b15bcd3354a1c54113f86a496da1be43294..34f0a93787888651f6a11a2465eace1f34dcc861 100644 (file)
@@ -1,4 +1,2 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (manuel1.c:7)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index d97c3e092445d2e79cb8de14a49696621d98d1cf..2d66c1dc77b9b88c9e227a3e1591d8dad9a1afed 100644 (file)
@@ -1,4 +1,2 @@
 Use of uninitialised value of size 4
    at 0x........: main (manuel2.c:8)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index b6ea7c079f1fe8a3fac38ba8e7d91e7731a9e9ec..2f56776ea33e535f9a9735c5a3a05d5811710aa3 100644 (file)
@@ -1,5 +1,3 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: gcc_cant_inline_me (manuel3.c:22)
    by 0x........: main (manuel3.c:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index dc6fafb7a7332f735ea94941cb64bca8798c35a6..74e7bf9d4a3eca6eb74e000ff41854d99adfcdef 100644 (file)
@@ -1,10 +1,6 @@
 Invalid free() / delete / delete[]
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (memalign_test.c:17)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 111110 free'd
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (memalign_test.c:15)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 26c841a312324442622cb7dfb68f412ea636b42c..71367f932b183493397e473bbbbc7e24928b609c 100644 (file)
@@ -1,5 +1,3 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: memcmp (mac_replace_strmem.c:...)
    by 0x........: main (memcmptest.c:13)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 5e9a2b82749800a51868fb4d710dd70e8aff4455..cae2d5f45e2b4b9f031f12be12ac5969c8900547 100644 (file)
@@ -1,4 +1,2 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (metadata.c:40)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index db6a53188439344908fe8d5bf4ada3809f2d3c88..9da033f6b4f5da85f838adaf9c1d3b183dade9b8 100644 (file)
@@ -1,65 +1,41 @@
 Mismatched free() / delete / delete []
    at 0x........: operator delete(void*) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:6)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:5)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Mismatched free() / delete / delete []
    at 0x........: operator delete[](void*) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:8)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 10 alloc'd
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:7)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Mismatched free() / delete / delete []
    at 0x........: operator delete(void*) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:13)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 40 alloc'd
    at 0x........: operator new[](unsigned) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Mismatched free() / delete / delete []
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:15)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 40 alloc'd
    at 0x........: operator new[](unsigned) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:14)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Mismatched free() / delete / delete []
    at 0x........: operator delete[](void*) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:20)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 alloc'd
    at 0x........: operator new(unsigned) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:19)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Mismatched free() / delete / delete []
    at 0x........: free (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:22)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 0 bytes inside a block of size 4 alloc'd
    at 0x........: operator new(unsigned) (vg_replace_malloc.c:...)
    by 0x........: main (mismatches.cpp:21)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index d0d7c11697a6734899c04eb4a2e459e104aa16d2..9ed81965ab64ce3485f40e68eee174a98cbe3a6a 100644 (file)
@@ -4,8 +4,6 @@ checked ... bytes.
 1000 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: main (nanoleak.c:6)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 LEAK SUMMARY:
    definitely lost: 1000 bytes in 1 blocks.
index 6468d486db5f6f64c817b694cb26e59145b74230..6fcbcd1ca53bdcfca6c3e7ff05d9f09882350ca6 100644 (file)
@@ -1,41 +1,27 @@
 Source and destination overlap in memcpy(0x........, 0x........, 21)
    at 0x........: memcpy (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:40)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Source and destination overlap in memcpy(0x........, 0x........, 21)
    at 0x........: memcpy (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:42)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Source and destination overlap in strncpy(0x........, 0x........, 21)
    at 0x........: strncpy (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:45)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Source and destination overlap in strncpy(0x........, 0x........, 21)
    at 0x........: strncpy (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:47)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Source and destination overlap in strcpy(0x........, 0x........)
    at 0x........: strcpy (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:54)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Source and destination overlap in strncat(0x........, 0x........, 21)
    at 0x........: strncat (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:112)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Source and destination overlap in strncat(0x........, 0x........, 21)
    at 0x........: strncat (mac_replace_strmem.c:...)
    by 0x........: main (overlap.c:113)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index bb73b19ec0461b1552497c17005c040883e70e7b..2d2d623e44c101ceaf164ef692bf2cde2112b8c7 100644 (file)
@@ -1,5 +1,3 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: fooble (...)
    by 0x........: main (pushfpopf_c.c:12)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 67041889c32a07b93d93b4755c6fa067f8db1878..70ca015fa4930988fc52a9cd65371b48ad094e8a 100644 (file)
@@ -1,29 +1,17 @@
 Invalid read of size 4
    at 0x........: main (realloc3.c:23)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 15 bytes after a block of size 5 alloc'd
    at 0x........: realloc (vg_replace_malloc.c:...)
    by 0x........: main (realloc3.c:19)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 4
    at 0x........: main (realloc3.c:24)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 15 bytes after a block of size 5 alloc'd
    at 0x........: realloc (vg_replace_malloc.c:...)
    by 0x........: main (realloc3.c:20)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
 
 Invalid read of size 4
    at 0x........: main (realloc3.c:25)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is 15 bytes after a block of size 5 alloc'd
    at 0x........: realloc (vg_replace_malloc.c:...)
    by 0x........: main (realloc3.c:21)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 870970266d71d348f4a3757a34a631152d79ec12..3437d9f76eb4139aec96c7bebb364114b36dcbc0 100644 (file)
@@ -1,5 +1,3 @@
 Invalid write of size 4
    at 0x........: main (signal2.c:17)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
index 50a591aec76f2b8d564914354b50696974a44bbe..27e684209414e49e8d830a70cc565cf5cc55b73d 100644 (file)
@@ -1,4 +1,2 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: main (supp.c:8)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index e806de187bcd018f6a0223ecdc36e194d9492914..ad41678d5c8c229bd97a7914892b15359f7a6179 100644 (file)
@@ -5,7 +5,6 @@ checked ... bytes.
    at 0x........: malloc (vg_replace_malloc.c:...)
    by 0x........: test (trivialleak.c:8)
    by 0x........: main (trivialleak.c:12)
-   by 0x........: __libc_start_main (...libc...)
 
 LEAK SUMMARY:
    definitely lost: 1000 bytes in 1000 blocks.
index de3899ae50ce2ea17d3c7d31fcdbd45468b23efc..c70a82ce26fdb00ff760d9203c7b01d9a9a203dc 100644 (file)
@@ -1,5 +1,3 @@
 Conditional jump or move depends on uninitialised value(s)
    at 0x........: get (...)
    by 0x........: main (...)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
index 910e4493059813d4da030b9b14f8ef1dc63d16e9..ee7b26967d88855f9ce27c62ee00fcb5c15043b5 100644 (file)
@@ -3,24 +3,18 @@ Test file created.
 Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s)
    at 0x........: __libc_writev (...libc...)
    by 0x........: main (writev.c:56)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 Received EFAULT as expected
 
 Syscall param writev(vector) contains uninitialised or unaddressable byte(s)
    at 0x........: __libc_writev (...libc...)
    by 0x........: main (writev.c:68)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 Received EINVAL as expected
 
 Syscall param readv(vector) contains uninitialised or unaddressable byte(s)
    at 0x........: __libc_readv (...libc...)
    by 0x........: main (writev.c:76)
-   by 0x........: __libc_start_main (...libc...)
-   by 0x........: ...
    Address 0x........ is not stack'd, malloc'd or free'd
 Received EINVAL as expected