Changed error messages: now don't print anything below main() unless the new

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
This commit is contained in:
Nicholas Nethercote 2003-11-13 17:35:04 +00:00
parent 5de6ace29c
commit d7bfd760a8
37 changed files with 190 additions and 344 deletions

View 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........: ...

View 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........: ...

View 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

View 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);

View 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);
/* ---------------------------------------------------------------------

View 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"
" --trace-children=no|yes Valgrind-ise child processes? [no]\n"
" --logfile-fd=<number> file descriptor for messages [2=stderr]\n"
" --logfile=<file> log messages to <file>.pid<pid>\n"
" --logsocket=ipaddr:port log messages to socket ipaddr:port\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"
" --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"
" --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"
" --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"))

View 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);

View 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........: ...

View 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

View 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........: ...

View 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........: ...

View 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........: ...

View 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...)

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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...)

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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........: ...

View 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.

View 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........: ...

View 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........: ...

View 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........: ...

View 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

View 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........: ...

View 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.

View 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........: ...

View 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