You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(1) |
2
(3) |
3
(1) |
4
(2) |
|
5
|
6
|
7
(4) |
8
|
9
(2) |
10
|
11
(2) |
|
12
|
13
(3) |
14
(7) |
15
(4) |
16
(2) |
17
|
18
|
|
19
|
20
(1) |
21
(2) |
22
|
23
|
24
|
25
|
|
26
|
27
(1) |
28
|
29
|
30
|
|
|
|
From: Ivo R. <ir...@so...> - 2017-11-04 13:32:03
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c46053cc386be5757420abbd4b8a8cc6219ed33f commit c46053cc386be5757420abbd4b8a8cc6219ed33f Author: Ivo Raisr <iv...@iv...> Date: Sat Nov 4 14:29:48 2017 +0100 Optionally exit on the first error with --exit-on-first-error=<yes|no>. Fixes BZ#385939. Slightly modified patch by: Fauchet Gauthier <gau...@fr...> Diff: --- NEWS | 1 + coregrind/m_errormgr.c | 15 ++++- coregrind/m_main.c | 9 ++- coregrind/m_options.c | 1 + coregrind/pub_core_options.h | 2 + docs/xml/manual-core.xml | 13 +++++ memcheck/tests/Makefile.am | 4 ++ memcheck/tests/exit_on_first_error.stderr.exp | 9 +++ memcheck/tests/exit_on_first_error.vgtest | 2 + .../tests/exit_on_first_error_with_xml.stderr.exp | 67 ++++++++++++++++++++++ memcheck/tests/exit_on_first_error_with_xml.vgtest | 4 ++ none/tests/cmdline1.stdout.exp | 1 + none/tests/cmdline2.stdout.exp | 3 +- 13 files changed, 126 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index d6acccd..436e287 100644 --- a/NEWS +++ b/NEWS @@ -74,6 +74,7 @@ where XXXXXX is the bug number as listed below. 385334 PPC64, fix vpermr, xxperm, xxpermr mask value. 385868 glibc ld.so _dl_runtime_resolve_avx_slow conditional jump warning. 385912 none/tests/rlimit_nofile fails on newer glibc/kernel. +385939 Optionally exit on the first error 386397 PPC64, valgrind truncates powerpc timebase to 32-bits. n-i-bz Fix missing workq_ops operations (macOS) diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c index fd900ee..c1f8006 100644 --- a/coregrind/m_errormgr.c +++ b/coregrind/m_errormgr.c @@ -511,11 +511,10 @@ Bool VG_(is_action_requested) ( const HChar* action, Bool* clo ) } -/* Do text-mode actions on error, that is, immediately after an error - is printed. These are: +/* Do actions on error, that is, immediately after an error is printed. + These are: * possibly, call the GDB server * possibly, generate a suppression. - Note this should not be called in XML mode! */ static void do_actions_on_error(const Error* err, Bool allow_db_attach) @@ -540,6 +539,14 @@ void do_actions_on_error(const Error* err, Bool allow_db_attach) } if (VG_(clo_gen_suppressions) == 1 && !still_noisy) VG_(clo_gen_suppressions) = 0; + + if (VG_(clo_exit_on_first_error)) { + if (VG_(clo_xml)) + VG_(printf_xml)("</valgrindoutput>\n"); + VG_(umsg)("\n"); + VG_(umsg)("Exit program on first error (--exit-on-first-error=yes)\n"); + VG_(client_exit)( VG_(clo_error_exitcode) ); + } } @@ -566,6 +573,8 @@ void do_actions_on_error(const Error* err, Bool allow_db_attach) * prints the tool-specific parts of the message + In both modes: + * calls do_actions_on_error. This optionally does a gdbserver call and optionally prints a suppression; both of these may require user input. */ diff --git a/coregrind/m_main.c b/coregrind/m_main.c index a37bbb6..4526b12 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -125,6 +125,7 @@ static void usage_NORETURN ( Bool debug_help ) " --demangle=no|yes automatically demangle C++ names? [yes]\n" " --num-callers=<number> show <number> callers in stack traces [12]\n" " --error-limit=no|yes stop showing new errors if too many? [yes]\n" +" --exit-on-first-error=no|yes exit code on the first error found? [no]\n" " --error-exitcode=<number> exit code to return if errors found [0=disable]\n" " --error-markers=<begin>,<end> add lines with begin/end markers before/after\n" " each error output in plain text mode [none]\n" @@ -252,7 +253,7 @@ static void usage_NORETURN ( Bool debug_help ) " --core-redzone-size=<number> set minimum size of redzones added before/after\n" " heap blocks allocated for Valgrind internal use (in bytes) [4]\n" " --wait-for-gdb=yes|no pause on startup to wait for gdb attach\n" -" --sym-offsets=yes|no show syms in form 'name+offset' ? [no]\n" +" --sym-offsets=yes|no show syms in form 'name+offset'? [no]\n" " --command-line-only=no|yes only use command line options [no]\n" "\n" " Vex options for all Valgrind tools:\n" @@ -601,6 +602,7 @@ void main_process_cmd_line_options( void ) else if VG_BOOL_CLO(arg, "--demangle", VG_(clo_demangle)) {} else if VG_STR_CLO (arg, "--soname-synonyms",VG_(clo_soname_synonyms)) {} else if VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit)) {} + else if VG_BOOL_CLO(arg, "--exit-on-first-error", VG_(clo_exit_on_first_error)) {} else if VG_INT_CLO (arg, "--error-exitcode", VG_(clo_error_exitcode)) {} else if VG_STR_CLO (arg, "--error-markers", tmp_str) { Int m; @@ -934,6 +936,11 @@ void main_process_cmd_line_options( void ) "Can't use --gen-suppressions= with %s\n" "because it doesn't generate errors.\n", VG_(details).name); } + if ((VG_(clo_exit_on_first_error)) && + (VG_(clo_error_exitcode)==0)) { + VG_(fmsg_bad_option)("--exit-on-first-error=yes", + "You must define a non nul exit error code, with --error-exitcode=...\n"); + } # if !defined(VGO_darwin) if (VG_(clo_resync_filter) != 0) { diff --git a/coregrind/m_options.c b/coregrind/m_options.c index 1bf2cc0..bae161b 100644 --- a/coregrind/m_options.c +++ b/coregrind/m_options.c @@ -52,6 +52,7 @@ VexRegisterUpdates VG_(clo_px_file_backed) = VexRegUpd_INVALID; Bool VG_(clo_error_limit) = True; Int VG_(clo_error_exitcode) = 0; HChar *VG_(clo_error_markers)[2] = {NULL, NULL}; +Bool VG_(clo_exit_on_first_error) = False; #if defined(VGPV_arm_linux_android) \ || defined(VGPV_x86_linux_android) \ diff --git a/coregrind/pub_core_options.h b/coregrind/pub_core_options.h index 88eeaf4..cc6bb83 100644 --- a/coregrind/pub_core_options.h +++ b/coregrind/pub_core_options.h @@ -44,6 +44,8 @@ extern const HChar *VG_(clo_toolname); /* Should we stop collecting errors if too many appear? default: YES */ extern Bool VG_(clo_error_limit); +/* Should we exit if an error appears? default: NO */ +extern Bool VG_(clo_exit_on_first_error); /* Alternative exit code to hand to parent if errors were found. default: 0 (no, return the application's exit code in the normal way. */ diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index 4cd26a5..ff596b5 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -1180,6 +1180,19 @@ that can report errors, e.g. Memcheck, but not Cachegrind.</para> </listitem> </varlistentry> + <varlistentry id="opt.exit-on-first-error" xreflabel="--exit-on-first-error"> + <term> + <option><![CDATA[--exit-on-first-error=<yes|no> [default: no] ]]></option> + </term> + <listitem> + <para>If this option is enabled, Valgrind exits on the first error. + A nonzero exit value must be defined using + <computeroutput>--error-exitcode</computeroutput> option. + Useful if you are running regression tests or have some other + automated test machinery.</para> + </listitem> + </varlistentry> + <varlistentry id="opt.error-markers" xreflabel="--error-markers"> <term> <option><![CDATA[--error-markers=<begin>,<end> [default: none]]]></option> diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index b9ba67b..dbbeabf 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -80,6 +80,10 @@ EXTRA_DIST = \ atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \ badaddrvalue.stderr.exp \ badaddrvalue.stdout.exp badaddrvalue.vgtest \ + exit_on_first_error.stderr.exp \ + exit_on_first_error.vgtest \ + exit_on_first_error_with_xml.stderr.exp \ + exit_on_first_error_with_xml.vgtest \ badfree-2trace.stderr.exp badfree-2trace.vgtest \ badfree.stderr.exp badfree.vgtest \ badfree3.stderr.exp badfree3.vgtest \ diff --git a/memcheck/tests/exit_on_first_error.stderr.exp b/memcheck/tests/exit_on_first_error.stderr.exp new file mode 100644 index 0000000..f086181 --- /dev/null +++ b/memcheck/tests/exit_on_first_error.stderr.exp @@ -0,0 +1,9 @@ + +Invalid write of size 1 + ... + Address 0x........ is 1 bytes before a block of size 8 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + ... + + +Exit program on first error (--exit-on-first-error=yes) diff --git a/memcheck/tests/exit_on_first_error.vgtest b/memcheck/tests/exit_on_first_error.vgtest new file mode 100644 index 0000000..8ce05b1 --- /dev/null +++ b/memcheck/tests/exit_on_first_error.vgtest @@ -0,0 +1,2 @@ +prog: badaddrvalue +vgopts: --exit-on-first-error=yes --error-exitcode=3 diff --git a/memcheck/tests/exit_on_first_error_with_xml.stderr.exp b/memcheck/tests/exit_on_first_error_with_xml.stderr.exp new file mode 100644 index 0000000..3a02ca5 --- /dev/null +++ b/memcheck/tests/exit_on_first_error_with_xml.stderr.exp @@ -0,0 +1,67 @@ +<?xml version="1.0"?> + +<valgrindoutput> + +<protocolversion>4</protocolversion> +<protocoltool>memcheck</protocoltool> + +<preamble> + <line>...</line> + <line>...</line> + <line>...</line> + <line>...</line> +</preamble> + +<pid>...</pid> +<ppid>...</ppid> +<tool>memcheck</tool> + +<args> + <vargv>...</vargv> + <argv> + <exe>./badaddrvalue</exe> + </argv> +</args> + +<status> + <state>RUNNING</state> + <time>...</time> +</status> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>InvalidWrite</kind> + <what>Invalid write of size 1</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>badaddrvalue.c</file> + <line>...</line> + </frame> + </stack> + <auxwhat>Address 0x........ is 1 bytes before a block of size 8 alloc'd</auxwhat> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>malloc</fn> + <dir>...</dir> + <file>vg_replace_malloc.c</file> + <line>...</line> + </frame> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>badaddrvalue.c</file> + <line>...</line> + </frame> + </stack> +</error> + +</valgrindoutput> diff --git a/memcheck/tests/exit_on_first_error_with_xml.vgtest b/memcheck/tests/exit_on_first_error_with_xml.vgtest new file mode 100644 index 0000000..9247bf8 --- /dev/null +++ b/memcheck/tests/exit_on_first_error_with_xml.vgtest @@ -0,0 +1,4 @@ +prog: badaddrvalue +vgopts: --exit-on-first-error=yes --error-exitcode=3 --xml=yes --xml-fd=2 --log-file=/dev/null +stderr_filter: filter_xml + diff --git a/none/tests/cmdline1.stdout.exp b/none/tests/cmdline1.stdout.exp index e35b382..2485119 100644 --- a/none/tests/cmdline1.stdout.exp +++ b/none/tests/cmdline1.stdout.exp @@ -39,6 +39,7 @@ usage: valgrind [options] prog-and-args --demangle=no|yes automatically demangle C++ names? [yes] --num-callers=<number> show <number> callers in stack traces [12] --error-limit=no|yes stop showing new errors if too many? [yes] + --exit-on-first-error=no|yes exit code on the first error found? [no] --error-exitcode=<number> exit code to return if errors found [0=disable] --error-markers=<begin>,<end> add lines with begin/end markers before/after each error output in plain text mode [none] diff --git a/none/tests/cmdline2.stdout.exp b/none/tests/cmdline2.stdout.exp index 21bec9f..df8f85a 100644 --- a/none/tests/cmdline2.stdout.exp +++ b/none/tests/cmdline2.stdout.exp @@ -39,6 +39,7 @@ usage: valgrind [options] prog-and-args --demangle=no|yes automatically demangle C++ names? [yes] --num-callers=<number> show <number> callers in stack traces [12] --error-limit=no|yes stop showing new errors if too many? [yes] + --exit-on-first-error=no|yes exit code on the first error found? [no] --error-exitcode=<number> exit code to return if errors found [0=disable] --error-markers=<begin>,<end> add lines with begin/end markers before/after each error output in plain text mode [none] @@ -164,7 +165,7 @@ usage: valgrind [options] prog-and-args --core-redzone-size=<number> set minimum size of redzones added before/after heap blocks allocated for Valgrind internal use (in bytes) [4] --wait-for-gdb=yes|no pause on startup to wait for gdb attach - --sym-offsets=yes|no show syms in form 'name+offset' ? [no] + --sym-offsets=yes|no show syms in form 'name+offset'? [no] --command-line-only=no|yes only use command line options [no] Vex options for all Valgrind tools: |
|
From: Philippe W. <phi...@so...> - 2017-11-04 07:37:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1eb5ea2afed92e38a15159cdef559785166a02a9 commit 1eb5ea2afed92e38a15159cdef559785166a02a9 Author: Philippe Waroquiers <phi...@sk...> Date: Sat Nov 4 08:32:03 2017 +0100 Small optimisation in helgrind address description Searching if an addr is in a malloc-ed client block is expensive (linear search) So, before scanning the list of malloc block, check that the address is in a client heap segment : this is a fast operation (it has a small cache, and for cache miss, does a dichotomic search) and avoids scanning a often big list (for big applications). Diff: --- helgrind/hg_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 0f8c946..95945f3 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -4385,6 +4385,12 @@ Bool HG_(mm_find_containing_block)( /*OUT*/ExeContext** where, Int i; const Int n_fast_check_words = 16; + /* Before searching the list of allocated blocks in hg_mallocmeta_table, + first verify that data_addr is in a heap client segment. */ + const NSegment *s = VG_(am_find_nsegment) (data_addr); + if (s == NULL || !s->isCH) + return False; + /* First, do a few fast searches on the basis that data_addr might be exactly the start of a block or up to 15 words inside. This can happen commonly via the creq |