466884 Missing writev uninit padding suppression for _XSend
471036 disInstr_AMD64: disInstr miscalculated next %rip on RORX imm8, m32/64, r32/6
471222 support tracking of file descriptors being double closed
+474160 If errors-for-leak-kinds is specified, exit-on-first-error should only exit
+ on one of the listed errors.
475498 Add reallocarray wrapper
476320 Build failure with GCC
476331 clean up generated/distributed filter scripts
* possibly, generate a suppression.
*/
static
-void do_actions_on_error(const Error* err, Bool allow_db_attach)
+void do_actions_on_error(const Error* err, Bool allow_db_attach, Bool count_error)
{
Bool still_noisy = True;
if (VG_(clo_gen_suppressions) == 1 && !still_noisy)
VG_(clo_gen_suppressions) = 0;
- if (VG_(clo_exit_on_first_error)) {
+ if (count_error && VG_(clo_exit_on_first_error)) {
if (VG_(clo_xml))
VG_(printf_xml)("</valgrindoutput>\n");
VG_(umsg)("\n");
* calls do_actions_on_error. This optionally does a gdbserver call
and optionally prints a suppression; both of these may require user input.
*/
-static void pp_Error ( const Error* err, Bool allow_db_attach, Bool xml )
+static void pp_Error ( const Error* err, Bool allow_db_attach, Bool xml, Bool count_error )
{
/* If this fails, you probably specified your tool's method
dictionary incorrectly. */
}
- do_actions_on_error(err, allow_db_attach);
+ do_actions_on_error(err, allow_db_attach, count_error);
}
n_errs_found++;
n_errs_shown++;
/* Actually show the error; more complex than you might think. */
- pp_Error( p, /*allow_db_attach*/True, VG_(clo_xml) );
+ pp_Error( p, /*allow_db_attach*/True, VG_(clo_xml), /* count_error */ True );
} else {
n_supp_contexts++;
n_errs_suppressed++;
/* update stats */
n_errs_shown++;
/* Actually show the error; more complex than you might think. */
- pp_Error(&err, allow_db_attach, VG_(clo_xml));
+ pp_Error(&err, allow_db_attach, VG_(clo_xml), count_error);
}
return False;
VG_(umsg)("\n");
VG_(umsg)("%d errors in context %d of %u:\n",
p_min->count, i+1, n_err_contexts);
- pp_Error( p_min, False/*allow_db_attach*/, False /* xml */ );
+ pp_Error( p_min, False/*allow_db_attach*/, False /* xml */, True /* count_error */ );
// We're not printing XML -- we'd have exited above if so.
vg_assert(! xml);
return;
}
- pp_Error( errors, False/*allow_db_attach*/, False/*xml*/ );
+ pp_Error( errors, False/*allow_db_attach*/, False/*xml*/, True/*count_error*/ );
}
inltemplate.stderr.exp inltemplate.stdout.exp inltemplate.vgtest \
inltemplate.stderr.exp-old-gcc \
leak-0.vgtest leak-0.stderr.exp \
+ leak-cases-exit-on-definite.vgtest leak-cases-exit-on-definite.stderr.exp \
leak-cases-full.vgtest leak-cases-full.stderr.exp \
leak-cases-possible.vgtest leak-cases-possible.stderr.exp \
leak-cases-summary.vgtest leak-cases-summary.stderr.exp \
--- /dev/null
+
+All heap blocks were freed -- no leaks are possible
+
+LEAK SUMMARY:
+ definitely lost: 48 bytes in 3 blocks
+ indirectly lost: 32 bytes in 2 blocks
+ possibly lost: 96 bytes in 6 blocks
+ still reachable: 64 bytes in 4 blocks
+ suppressed: 0 bytes in 0 blocks
+Rerun with --leak-check=full to see details of leaked memory
+
+leaked: 80 bytes in 5 blocks
+dubious: 96 bytes in 6 blocks
+reachable: 64 bytes in 4 blocks
+suppressed: 0 bytes in 0 blocks
+
+HEAP SUMMARY:
+ in use at exit: 240 bytes in 15 blocks
+ total heap usage: 15 allocs, 0 frees, 240 bytes allocated
+
+16 bytes in 1 blocks are possibly lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:78)
+ by 0x........: main (leak-cases.c:107)
+
+16 bytes in 1 blocks are possibly lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:81)
+ by 0x........: main (leak-cases.c:107)
+
+16 bytes in 1 blocks are possibly lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:84)
+ by 0x........: main (leak-cases.c:107)
+
+16 bytes in 1 blocks are possibly lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:84)
+ by 0x........: main (leak-cases.c:107)
+
+16 bytes in 1 blocks are possibly lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:87)
+ by 0x........: main (leak-cases.c:107)
+
+16 bytes in 1 blocks are possibly lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:87)
+ by 0x........: main (leak-cases.c:107)
+
+16 bytes in 1 blocks are definitely lost in loss record ... of ...
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: mk (leak-cases.c:52)
+ by 0x........: f (leak-cases.c:74)
+ by 0x........: main (leak-cases.c:107)
+
+
+Exit program on first error (--exit-on-first-error=yes)
--- /dev/null
+prog: leak-cases
+vgopts: --error-exitcode=127 --errors-for-leak-kinds=definite --leak-check=full -s --exit-on-first-error=yes
+stderr_filter_args: leak-cases.c