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
(13) |
2
(15) |
|
3
(16) |
4
(42) |
5
(9) |
6
(20) |
7
(22) |
8
(24) |
9
(12) |
|
10
(24) |
11
(11) |
12
(2) |
13
(13) |
14
(8) |
15
|
16
(16) |
|
17
(24) |
18
(36) |
19
(100) |
20
(94) |
21
(50) |
22
(39) |
23
(10) |
|
24
(14) |
25
(19) |
26
(2) |
27
(6) |
28
(17) |
29
(9) |
30
(8) |
|
31
(21) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2009-05-07 23:52:15
|
Author: njn
Date: 2009-05-08 00:52:11 +0100 (Fri, 08 May 2009)
New Revision: 9795
Log:
Merge r9793 (stack trace cleanups) from the trunk.
Modified:
branches/DARWIN/coregrind/m_errormgr.c
branches/DARWIN/coregrind/m_execontext.c
branches/DARWIN/coregrind/m_stacktrace.c
branches/DARWIN/helgrind/libhb_core.c
Modified: branches/DARWIN/coregrind/m_errormgr.c
===================================================================
--- branches/DARWIN/coregrind/m_errormgr.c 2009-05-07 23:23:58 UTC (rev 9794)
+++ branches/DARWIN/coregrind/m_errormgr.c 2009-05-07 23:52:11 UTC (rev 9795)
@@ -415,12 +415,7 @@
static void gen_suppression(Error* err)
{
ExeContext* ec = VG_(get_error_where)(err);
- Int stop_at = VG_(clo_backtrace_size);
- /* At most VG_MAX_SUPP_CALLERS names */
- if (stop_at > VG_MAX_SUPP_CALLERS) stop_at = VG_MAX_SUPP_CALLERS;
- vg_assert(stop_at > 0);
-
//(example code, see comment on CoreSuppKind above)
if (0) {
//if (0) ThreadErr == err->ekind) {
@@ -443,7 +438,8 @@
// Print stack trace elements
VG_(apply_StackTrace)(printSuppForIp,
- VG_(get_ExeContext_StackTrace)(ec), stop_at);
+ VG_(get_ExeContext_StackTrace)(ec),
+ VG_(get_ExeContext_n_ips)(ec));
VG_(printf)("}\n");
}
Modified: branches/DARWIN/coregrind/m_execontext.c
===================================================================
--- branches/DARWIN/coregrind/m_execontext.c 2009-05-07 23:23:58 UTC (rev 9794)
+++ branches/DARWIN/coregrind/m_execontext.c 2009-05-07 23:52:11 UTC (rev 9795)
@@ -319,7 +319,7 @@
first_ip_delta );
}
- return record_ExeContext_wrk2 ( &ips[0], n_ips );
+ return record_ExeContext_wrk2 ( ips, n_ips );
}
/* Do the second part of getting a stack trace: ips[0 .. n_ips-1]
Modified: branches/DARWIN/coregrind/m_stacktrace.c
===================================================================
--- branches/DARWIN/coregrind/m_stacktrace.c 2009-05-07 23:23:58 UTC (rev 9794)
+++ branches/DARWIN/coregrind/m_stacktrace.c 2009-05-07 23:52:11 UTC (rev 9795)
@@ -48,7 +48,7 @@
/*--- Exported functions. ---*/
/*------------------------------------------------------------*/
-/* Take a snapshot of the client's stack, putting the up to 'n_ips'
+/* Take a snapshot of the client's stack, putting up to 'max_n_ips'
IPs into 'ips'. In order to be thread-safe, we pass in the
thread's IP SP, FP if that's meaningful, and LR if that's
meaningful. Returns number of IPs put in 'ips'.
@@ -58,7 +58,7 @@
traces on ppc64-linux and has no effect on other platforms.
*/
UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known,
- /*OUT*/Addr* ips, UInt n_ips,
+ /*OUT*/Addr* ips, UInt max_n_ips,
/*OUT*/Addr* sps, /*OUT*/Addr* fps,
Addr ip, Addr sp, Addr fp, Addr lr,
Addr fp_min, Addr fp_max_orig )
@@ -82,7 +82,7 @@
vg_assert(sizeof(Addr) == sizeof(UWord));
vg_assert(sizeof(Addr) == sizeof(void*));
- /* Snaffle IPs from the client's stack into ips[0 .. n_ips-1],
+ /* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
stopping when the trail goes cold, which we guess to be
when FP is not a reasonable stack location. */
@@ -94,9 +94,9 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("tid=%d? n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx ip=0x%lx fp=0x%lx\n",
- tid_if_known, n_ips, fp_min, fp_max_orig, fp_max, ip, fp);
+ max_n_ips, fp_min, fp_max_orig, fp_max, ip, fp);
/* Assertion broken before main() is reached in pthreaded programs; the
* offending stack traces only have one item. --njn, 2002-aug-16 */
@@ -147,7 +147,7 @@
*/
while (True) {
- if (i >= n_ips)
+ if (i >= max_n_ips)
break;
/* Try to derive a new (ip,sp,fp) triple from the current
@@ -160,10 +160,18 @@
fails, and is expensive. */
/* Deal with frames resulting from functions which begin "pushl%
ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */
- if (fp_min <= fp && fp <= fp_max
- - 1 * sizeof(UWord)/*see comment below*/) {
+ if (fp_min <= fp &&
+ fp <= fp_max - 1 * sizeof(UWord)/*see comment below*/)
+ {
/* fp looks sane, so use it. */
ip = (((UWord*)fp)[1]);
+ // We stop if we hit a zero (the traditional end-of-stack
+ // marker) or a one -- these correspond to recorded IPs of 0 or -1.
+ // The latter because r8818 (in this file) changes the meaning of
+ // entries [1] and above in a stack trace, by subtracting 1 from
+ // them. Hence stacks that used to end with a zero value now end in
+ // -1 and so we must detect that too.
+ if (0 == ip || 1 == ip) break;
sp = fp + sizeof(Addr) /*saved %ebp*/
+ sizeof(Addr) /*ra*/;
fp = (((UWord*)fp)[0]);
@@ -179,6 +187,7 @@
/* That didn't work out, so see if there is any CF info to hand
which can be used. */
if ( VG_(use_CF_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip - 1; /* -1: refer to calling insn, not the RA */
@@ -190,6 +199,7 @@
/* And, similarly, try for MSVC FPO unwind info. */
if ( VG_(use_FPO_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip;
@@ -231,15 +241,15 @@
*/
while (True) {
- if (i >= n_ips)
+ if (i >= max_n_ips)
break;
- /* Try to derive a new (ip,sp,fp) triple from the current
- set. */
+ /* Try to derive a new (ip,sp,fp) triple from the current set. */
/* First off, see if there is any CFI info to hand which can
be used. */
if ( VG_(use_CF_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip - 1; /* -1: refer to calling insn, not the RA */
@@ -264,6 +274,7 @@
if (fp_min <= fp && fp <= fp_max - 1 * sizeof(UWord)) {
/* fp looks sane, so use it. */
ip = (((UWord*)fp)[1]);
+ if (0 == ip || 1 == ip) break;
sp = fp + sizeof(Addr) /*saved %rbp*/
+ sizeof(Addr) /*ra*/;
fp = (((UWord*)fp)[0]);
@@ -290,6 +301,7 @@
*/
if (fp_min <= sp && sp < fp_max) {
ip = ((UWord*)sp)[0];
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip == 0
@@ -381,7 +393,7 @@
const Int lr_offset = 1;
# endif
- if (i >= n_ips)
+ if (i >= max_n_ips)
break;
/* Try to derive a new (ip,fp) pair from the current set. */
@@ -417,6 +429,7 @@
}
# endif
+ if (0 == ip || 1 == ip) break;
fp = (((UWord*)fp)[0]);
if (sps) sps[i] = fp; /* NB. not sp */
if (fps) fps[i] = fp;
@@ -443,7 +456,7 @@
}
UInt VG_(get_StackTrace) ( ThreadId tid,
- /*OUT*/StackTrace ips, UInt n_ips,
+ /*OUT*/StackTrace ips, UInt max_n_ips,
/*OUT*/StackTrace sps,
/*OUT*/StackTrace fps,
Word first_ip_delta )
@@ -495,7 +508,7 @@
"sp=0x%08lx fp=0x%08lx\n",
tid, stack_highest_word, ip, sp, fp);
- return VG_(get_StackTrace_wrk)(tid, ips, n_ips,
+ return VG_(get_StackTrace_wrk)(tid, ips, max_n_ips,
sps, fps,
ip, sp, fp, lr, sp,
stack_highest_word);
@@ -531,15 +544,15 @@
}
/* Get and immediately print a StackTrace. */
-void VG_(get_and_pp_StackTrace) ( ThreadId tid, UInt n_ips )
+void VG_(get_and_pp_StackTrace) ( ThreadId tid, UInt max_n_ips )
{
- Addr ips[n_ips];
- UInt n_ips_obtained
- = VG_(get_StackTrace)(tid, ips, n_ips,
+ Addr ips[max_n_ips];
+ UInt n_ips
+ = VG_(get_StackTrace)(tid, ips, max_n_ips,
NULL/*array to dump SP values in*/,
NULL/*array to dump FP values in*/,
0/*first_ip_delta*/);
- VG_(pp_StackTrace)(ips, n_ips_obtained);
+ VG_(pp_StackTrace)(ips, n_ips);
}
void VG_(bt)(ThreadId tid)
@@ -585,7 +598,7 @@
action(i, ip);
i++;
- } while (i < n_ips && ips[i] != 0 && !main_done);
+ } while (i < n_ips && !main_done);
#undef MYBUF_LEN
}
Modified: branches/DARWIN/helgrind/libhb_core.c
===================================================================
--- branches/DARWIN/helgrind/libhb_core.c 2009-05-07 23:23:58 UTC (rev 9794)
+++ branches/DARWIN/helgrind/libhb_core.c 2009-05-07 23:52:11 UTC (rev 9795)
@@ -3184,15 +3184,18 @@
tl_assert(i >= 0 && i <= N_OLDREF_ACCS);
if (i < N_OLDREF_ACCS) {
+ Int n, maxNFrames;
/* return with success */
tl_assert(cand_thr);
tl_assert(cand_rcec);
tl_assert(cand_rcec->magic == RCEC_MAGIC);
tl_assert(cand_szB >= 1);
- *resEC = VG_(make_ExeContext_from_StackTrace)(
- &cand_rcec->frames[0],
- min_UInt(N_FRAMES, VG_(clo_backtrace_size))
- );
+ /* Count how many non-zero frames we have. */
+ maxNFrames = min_UInt(N_FRAMES, VG_(clo_backtrace_size));
+ for (n = 0; n < maxNFrames; n++) {
+ if (0 == cand_rcec->frames[n]) break;
+ }
+ *resEC = VG_(make_ExeContext_from_StackTrace)(cand_rcec->frames, n);
*resThr = cand_thr;
*resSzB = cand_szB;
*resIsW = cand_isW;
|
|
From: <sv...@va...> - 2009-05-07 23:24:02
|
Author: njn
Date: 2009-05-08 00:23:58 +0100 (Fri, 08 May 2009)
New Revision: 9794
Log:
Fix some minor test breakage on Linux.
Modified:
branches/DARWIN/helgrind/tests/filter_stderr
branches/DARWIN/memcheck/tests/x86-linux/scalar.stderr.exp
Modified: branches/DARWIN/helgrind/tests/filter_stderr
===================================================================
--- branches/DARWIN/helgrind/tests/filter_stderr 2009-05-07 23:08:10 UTC (rev 9793)
+++ branches/DARWIN/helgrind/tests/filter_stderr 2009-05-07 23:23:58 UTC (rev 9794)
@@ -47,7 +47,7 @@
# "pthread_create@GLIBC_", "do_clone", "clone", etc. So we cut all the
# "at"/"by" lines above "pthread_create@*". We also convert
# "pthread_create" into "pthread_create@*".
-perl -p -0 -e 's/(Thread #. was created\n)( (at|by)[^\n]*\n)*( by 0x........: pthread_create)(@\*)?( \(hg_intercepts.c:...\)\n)/$1 ...\n$4$5@*$6/gs' |
+perl -p -0 -e 's/(Thread #. was created\n)( (at|by)[^\n]*\n)*( by 0x........: pthread_create)(@\*)?( \(hg_intercepts.c:...\)\n)/$1 ...\n$4@*$6/gs' |
# Anything below "mythread_wrapper" in stack traces is unreliable,
# containing libc and libpthread stuff like start_thread, clone, etc. So we
Modified: branches/DARWIN/memcheck/tests/x86-linux/scalar.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/x86-linux/scalar.stderr.exp 2009-05-07 23:08:10 UTC (rev 9793)
+++ branches/DARWIN/memcheck/tests/x86-linux/scalar.stderr.exp 2009-05-07 23:23:58 UTC (rev 9794)
@@ -582,25 +582,25 @@
...
Address 0x........ is 0 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
Syscall param sigaction(act->sa_mask) points to unaddressable byte(s)
...
Address 0x........ is 4 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
Syscall param sigaction(act->sa_flags) points to unaddressable byte(s)
...
Address 0x........ is 8 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
Syscall param sigaction(oldact) points to unaddressable byte(s)
...
Address 0x........ is 0 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
-----------------------------------------------------
68: __NR_sgetmask n/a
-----------------------------------------------------
@@ -1224,13 +1224,13 @@
...
Address 0x........ is 0 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
Syscall param sigprocmask(oldset) points to unaddressable byte(s)
...
Address 0x........ is 0 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
-----------------------------------------------------
127: __NR_create_module ni
-----------------------------------------------------
@@ -1743,7 +1743,7 @@
...
Address 0x........ is 4 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
Syscall param rt_sigaction(act->sa_mask) points to unaddressable byte(s)
...
@@ -1753,13 +1753,13 @@
...
Address 0x........ is 8 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
Syscall param rt_sigaction(oldact) points to unaddressable byte(s)
...
Address 0x........ is 4 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:28)
-----------------------------------------------------
175: __NR_rt_sigprocmask 4s 2m
-----------------------------------------------------
|
|
From: Julian S. <js...@ac...> - 2009-05-07 23:12:50
|
On Thursday 07 May 2009, Philippe Waroquiers wrote:
> > > It looks to me that leak-resolution=high will be a better default as it
> > > will not confuse users.
> >
> > I agree with this. The rationale in the docs is:
>
> Note that the command line summary help text (3.4.1) is also somewhat
> confusing: --leak-resolution=low|med|high how much bt merging in leak
> check [low]
>
> Intuitively (at least for a french speaking person :), a "low how much bt
> merging" will merge less stack traces than a "high" bt merging.
Hmm, it is indeed confusing. I never noticed that before.
What about
--leak-resolution=low|med|high
precision of stack traces in leak check [high]
I prefer not to mention "quantity" just in case confused users think
it is somehow related to the quantity of leaked memory.
J
|
|
From: Greg P. <gp...@ap...> - 2009-05-07 23:12:23
|
On May 7, 2009, at 4:02 PM, Nicholas Nethercote wrote: > Maybe we need a --workaround-gcc43-bugs option just like we have > --workaround-gcc296-bugs. Sigh. > > (The latter option doesn't seem necessary any more since Valgrind > refuses to build with anything less than gcc 3.0.0.) That option works around bugs compiled into the client code. So the question isn't "does Valgrind build with 2.9.6" but rather "can Valgrind run client code built with 2.9.6". (I don't care about supporting anything that old, but it's still important to ask the right question here.) -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: <sv...@va...> - 2009-05-07 23:08:21
|
Author: njn
Date: 2009-05-08 00:08:10 +0100 (Fri, 08 May 2009)
New Revision: 9793
Log:
Fix up some stack trace inconsistencies:
- When printing suppressions, never print more entries than there are in the
stack. This avoids bogus suppressions in some cases! (I haven't seen
them on Linux, but I have seen them on Darwin.)
- When getting a stack trace, stop if we get an IP of zero or one; that
means we've hit the end of the stack. And don't include that entry in the
stack trace, because it's a guaranteed "???" if it's ever printed which is
useless.
- In VG_(apply_StackTrace), we can now rely entirely on the n_ip parameter
rather than looking for 0 or -1, because that check is done when the stack
trace is first obtained. In other words, stack traces all use an n_ip
parameter to record their size, whereas previously they used an odd
mixture of n_ip and null-termination.
- Rename 'n_ips' variables as 'max_n_ips' where appropriate; those left as
'n_ips' truly describe how many IPs there are in the stack trace.
Modified:
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_execontext.c
trunk/coregrind/m_stacktrace.c
trunk/helgrind/libhb_core.c
Modified: trunk/coregrind/m_errormgr.c
===================================================================
--- trunk/coregrind/m_errormgr.c 2009-05-07 05:44:34 UTC (rev 9792)
+++ trunk/coregrind/m_errormgr.c 2009-05-07 23:08:10 UTC (rev 9793)
@@ -415,12 +415,7 @@
static void gen_suppression(Error* err)
{
ExeContext* ec = VG_(get_error_where)(err);
- Int stop_at = VG_(clo_backtrace_size);
- /* At most VG_MAX_SUPP_CALLERS names */
- if (stop_at > VG_MAX_SUPP_CALLERS) stop_at = VG_MAX_SUPP_CALLERS;
- vg_assert(stop_at > 0);
-
//(example code, see comment on CoreSuppKind above)
if (0) {
//if (0) ThreadErr == err->ekind) {
@@ -443,7 +438,8 @@
// Print stack trace elements
VG_(apply_StackTrace)(printSuppForIp,
- VG_(get_ExeContext_StackTrace)(ec), stop_at);
+ VG_(get_ExeContext_StackTrace)(ec),
+ VG_(get_ExeContext_n_ips)(ec));
VG_(printf)("}\n");
}
Modified: trunk/coregrind/m_execontext.c
===================================================================
--- trunk/coregrind/m_execontext.c 2009-05-07 05:44:34 UTC (rev 9792)
+++ trunk/coregrind/m_execontext.c 2009-05-07 23:08:10 UTC (rev 9793)
@@ -319,7 +319,7 @@
first_ip_delta );
}
- return record_ExeContext_wrk2 ( &ips[0], n_ips );
+ return record_ExeContext_wrk2 ( ips, n_ips );
}
/* Do the second part of getting a stack trace: ips[0 .. n_ips-1]
Modified: trunk/coregrind/m_stacktrace.c
===================================================================
--- trunk/coregrind/m_stacktrace.c 2009-05-07 05:44:34 UTC (rev 9792)
+++ trunk/coregrind/m_stacktrace.c 2009-05-07 23:08:10 UTC (rev 9793)
@@ -48,7 +48,7 @@
/*--- Exported functions. ---*/
/*------------------------------------------------------------*/
-/* Take a snapshot of the client's stack, putting the up to 'n_ips'
+/* Take a snapshot of the client's stack, putting up to 'max_n_ips'
IPs into 'ips'. In order to be thread-safe, we pass in the
thread's IP SP, FP if that's meaningful, and LR if that's
meaningful. Returns number of IPs put in 'ips'.
@@ -58,7 +58,7 @@
traces on ppc64-linux and has no effect on other platforms.
*/
UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known,
- /*OUT*/Addr* ips, UInt n_ips,
+ /*OUT*/Addr* ips, UInt max_n_ips,
/*OUT*/Addr* sps, /*OUT*/Addr* fps,
Addr ip, Addr sp, Addr fp, Addr lr,
Addr fp_min, Addr fp_max_orig )
@@ -82,7 +82,7 @@
vg_assert(sizeof(Addr) == sizeof(UWord));
vg_assert(sizeof(Addr) == sizeof(void*));
- /* Snaffle IPs from the client's stack into ips[0 .. n_ips-1],
+ /* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
stopping when the trail goes cold, which we guess to be
when FP is not a reasonable stack location. */
@@ -94,9 +94,9 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx ip=0x%lx fp=0x%lx\n",
- n_ips, fp_min, fp_max_orig, fp_max, ip, fp);
+ max_n_ips, fp_min, fp_max_orig, fp_max, ip, fp);
/* Assertion broken before main() is reached in pthreaded programs; the
* offending stack traces only have one item. --njn, 2002-aug-16 */
@@ -143,7 +143,7 @@
*/
while (True) {
- if (i >= n_ips)
+ if (i >= max_n_ips)
break;
/* Try to derive a new (ip,sp,fp) triple from the current
@@ -156,10 +156,18 @@
fails, and is expensive. */
/* Deal with frames resulting from functions which begin "pushl%
ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */
- if (fp_min <= fp && fp <= fp_max
- - 1 * sizeof(UWord)/*see comment below*/) {
+ if (fp_min <= fp &&
+ fp <= fp_max - 1 * sizeof(UWord)/*see comment below*/)
+ {
/* fp looks sane, so use it. */
ip = (((UWord*)fp)[1]);
+ // We stop if we hit a zero (the traditional end-of-stack
+ // marker) or a one -- these correspond to recorded IPs of 0 or -1.
+ // The latter because r8818 (in this file) changes the meaning of
+ // entries [1] and above in a stack trace, by subtracting 1 from
+ // them. Hence stacks that used to end with a zero value now end in
+ // -1 and so we must detect that too.
+ if (0 == ip || 1 == ip) break;
sp = fp + sizeof(Addr) /*saved %ebp*/
+ sizeof(Addr) /*ra*/;
fp = (((UWord*)fp)[0]);
@@ -175,6 +183,7 @@
/* That didn't work out, so see if there is any CF info to hand
which can be used. */
if ( VG_(use_CF_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip - 1; /* -1: refer to calling insn, not the RA */
@@ -186,6 +195,7 @@
/* And, similarly, try for MSVC FPO unwind info. */
if ( VG_(use_FPO_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip;
@@ -227,15 +237,15 @@
*/
while (True) {
- if (i >= n_ips)
+ if (i >= max_n_ips)
break;
- /* Try to derive a new (ip,sp,fp) triple from the current
- set. */
+ /* Try to derive a new (ip,sp,fp) triple from the current set. */
/* First off, see if there is any CFI info to hand which can
be used. */
if ( VG_(use_CF_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip - 1; /* -1: refer to calling insn, not the RA */
@@ -260,6 +270,7 @@
if (fp_min <= fp && fp <= fp_max - 1 * sizeof(UWord)) {
/* fp looks sane, so use it. */
ip = (((UWord*)fp)[1]);
+ if (0 == ip || 1 == ip) break;
sp = fp + sizeof(Addr) /*saved %rbp*/
+ sizeof(Addr) /*ra*/;
fp = (((UWord*)fp)[0]);
@@ -286,6 +297,7 @@
*/
if (fp_min <= sp && sp < fp_max) {
ip = ((UWord*)sp)[0];
+ if (0 == ip || 1 == ip) break;
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip == 0
@@ -377,7 +389,7 @@
const Int lr_offset = 1;
# endif
- if (i >= n_ips)
+ if (i >= max_n_ips)
break;
/* Try to derive a new (ip,fp) pair from the current set. */
@@ -413,6 +425,7 @@
}
# endif
+ if (0 == ip || 1 == ip) break;
fp = (((UWord*)fp)[0]);
if (sps) sps[i] = fp; /* NB. not sp */
if (fps) fps[i] = fp;
@@ -439,7 +452,7 @@
}
UInt VG_(get_StackTrace) ( ThreadId tid,
- /*OUT*/StackTrace ips, UInt n_ips,
+ /*OUT*/StackTrace ips, UInt max_n_ips,
/*OUT*/StackTrace sps,
/*OUT*/StackTrace fps,
Word first_ip_delta )
@@ -491,7 +504,7 @@
"sp=0x%08lx fp=0x%08lx\n",
tid, stack_highest_word, ip, sp, fp);
- return VG_(get_StackTrace_wrk)(tid, ips, n_ips,
+ return VG_(get_StackTrace_wrk)(tid, ips, max_n_ips,
sps, fps,
ip, sp, fp, lr, sp,
stack_highest_word);
@@ -527,15 +540,15 @@
}
/* Get and immediately print a StackTrace. */
-void VG_(get_and_pp_StackTrace) ( ThreadId tid, UInt n_ips )
+void VG_(get_and_pp_StackTrace) ( ThreadId tid, UInt max_n_ips )
{
- Addr ips[n_ips];
- UInt n_ips_obtained
- = VG_(get_StackTrace)(tid, ips, n_ips,
+ Addr ips[max_n_ips];
+ UInt n_ips
+ = VG_(get_StackTrace)(tid, ips, max_n_ips,
NULL/*array to dump SP values in*/,
NULL/*array to dump FP values in*/,
0/*first_ip_delta*/);
- VG_(pp_StackTrace)(ips, n_ips_obtained);
+ VG_(pp_StackTrace)(ips, n_ips);
}
@@ -563,13 +576,7 @@
action(i, ip);
i++;
- // re 'while' condition: stop if we hit a zero value (the traditional
- // end-of-stack marker) or a ~0 value. The latter because r8818
- // (in this file) changes the meaning of entries [1] and above in a
- // stack trace, by subtracting 1 from them. Hence stacks that used
- // to end with a zero value now end in -1 and so we must detect
- // that too.
- } while (i < n_ips && ips[i] != 0 && ips[i] != ~(Addr)0 && !main_done);
+ } while (i < n_ips && !main_done);
#undef MYBUF_LEN
}
Modified: trunk/helgrind/libhb_core.c
===================================================================
--- trunk/helgrind/libhb_core.c 2009-05-07 05:44:34 UTC (rev 9792)
+++ trunk/helgrind/libhb_core.c 2009-05-07 23:08:10 UTC (rev 9793)
@@ -3184,15 +3184,18 @@
tl_assert(i >= 0 && i <= N_OLDREF_ACCS);
if (i < N_OLDREF_ACCS) {
+ Int n, maxNFrames;
/* return with success */
tl_assert(cand_thr);
tl_assert(cand_rcec);
tl_assert(cand_rcec->magic == RCEC_MAGIC);
tl_assert(cand_szB >= 1);
- *resEC = VG_(make_ExeContext_from_StackTrace)(
- &cand_rcec->frames[0],
- min_UInt(N_FRAMES, VG_(clo_backtrace_size))
- );
+ /* Count how many non-zero frames we have. */
+ maxNFrames = min_UInt(N_FRAMES, VG_(clo_backtrace_size));
+ for (n = 0; n < maxNFrames; n++) {
+ if (0 == cand_rcec->frames[n]) break;
+ }
+ *resEC = VG_(make_ExeContext_from_StackTrace)(cand_rcec->frames, n);
*resThr = cand_thr;
*resSzB = cand_szB;
*resIsW = cand_isW;
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 23:02:14
|
On Wed, May 6, 2009 at 6:31 PM, Konstantin Serebryany <kon...@gm...> wrote: >> The existing versions of gcc will be there for years... > > Actually, it seems to be fixed in gcc 4.4 > But gcc 4.3.1 and earlier will be everywhere for quite some time... Maybe we need a --workaround-gcc43-bugs option just like we have --workaround-gcc296-bugs. Sigh. (The latter option doesn't seem necessary any more since Valgrind refuses to build with anything less than gcc 3.0.0.) N |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 22:56:13
|
On Fri, May 8, 2009 at 6:34 AM, Karlan Mitchell <kar...@gm...> wrote: > > So, that being said I would like to write a patch, for my own use at first, > which writes > random bits to all memory being initialized (optionally of course). The > problem is > I don't know where would be the best place to do this? I have absolutely no > clue how > valgrind implements memory management however I'm assuming I'd only need to > add this > in two places, the malloc code, and the allocation code for ".text". For Memcheck, the functionality is already there for heap (malloc) blocks: use the --malloc-fill and --free-fill options. As for "the allocation code for .text", static and mmap'd memory is intialised to zero, so you can't fill that with your own values. The only other sources of uninitialised memory are brk() and stack allocations. Filling in your own values would be possible but would require modifying Valgrind. Search for VG_(track_new_mem_brk) and VG_(track_new_mem_stack*) if you want to do this. Nick |
|
From: Tom H. <to...@co...> - 2009-05-07 21:30:35
|
Karlan Mitchell wrote: > I haven't really taken the time to dig through the source code to verify > this however, > I have noticed that some programs which segfault run by the kernel fail > to do so > when run by valgrind, and occasionally gdb. The only thing I can guess > off the top > of my head is the code running makes bad assumptions, or memory errors, > which only > fails when that code is non-zero. / The memory map will be completely different under valgrind, plus valgrind deliberately spaces out heap allocations so that a minor under/overrun will probably not crash the program (but will of course produce a valgrind warning). Programs which segv will not always do so reliably even without bringing valgrind into the equation, so it really isn't something you should worry about. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Karlan M. <kar...@gm...> - 2009-05-07 20:34:30
|
I haven't really taken the time to dig through the source code to verify this however, I have noticed that some programs which segfault run by the kernel fail to do so when run by valgrind, and occasionally gdb. The only thing I can guess off the top of my head is the code running makes bad assumptions, or memory errors, which only fails when that code is non-zero. * So, *that being said I would like to write a patch, for my own use at first, which writes random bits to all memory being initialized (optionally of course). The problem is I don't know where would be the best place to do this? I have absolutely no clue how valgrind implements memory management however I'm assuming I'd only need to add this in two places, the malloc code, and the allocation code for ".text". Let me know your input on the idea, whether postive or negative; I will be targeting gdb after I have added this functionality to valgrind. I feel this will exhibit more "real world entropy", allowing bugs to present themselves more quickly. If someone could kindly point me in the right direction of where to look in the source code it would be greatly appreciated. Thanks, Karlan Mitchell - http://3dstoneage.com - Free open source SMS service |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 17:27:25
|
Nightly build on ocean32 ( Ubuntu 9.04, Intel x86-64 (32-bit only) ) started at 2009-05-08 03:00:01 EST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 448 tests, 7 stderr failures, 2 stdout failures, 0 post failures ==
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/origin1-yes (stderr)
memcheck/tests/origin5-bz2 (stderr)
none/tests/linux/mremap2 (stdout)
none/tests/shell (stdout)
none/tests/shell (stderr)
none/tests/shell_valid1 (stderr)
none/tests/shell_valid2 (stderr)
none/tests/shell_valid3 (stderr)
=================================================
./valgrind/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2009-05-08 03:15:38.000000000 +1000
+++ stack_switch.stderr.out 2009-05-08 03:25:02.000000000 +1000
@@ -0,0 +1,2 @@
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ ...
=================================================
./valgrind/memcheck/tests/origin1-yes.stderr.diff
=================================================
--- origin1-yes.stderr.exp 2009-05-08 03:15:43.000000000 +1000
+++ origin1-yes.stderr.out 2009-05-08 03:25:20.000000000 +1000
@@ -47,7 +47,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin1-yes.c:93)
Uninitialised value was created
- at 0x........: brk (in /...libc...)
+ at 0x........: ??? (in /lib32/ld-2.9.so)
by 0x........: sbrk (in /...libc...)
by 0x........: main (origin1-yes.c:90)
=================================================
./valgrind/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2009-05-08 03:15:43.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-08 03:25:25.000000000 +1000
@@ -11,7 +11,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -19,7 +19,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -27,7 +27,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -38,7 +38,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -49,7 +49,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -60,7 +60,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -71,7 +71,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -82,7 +82,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -93,7 +93,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -104,7 +104,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
=================================================
./valgrind/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2009-05-08 03:15:43.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-08 03:25:25.000000000 +1000
@@ -28,7 +28,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -38,7 +39,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -48,7 +50,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2855)
+ at 0x........: mainSort (origin5-bz2.c:2854)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -58,7 +61,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2859)
+ at 0x........: mainSort (origin5-bz2.c:2858)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -68,7 +72,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -78,7 +83,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2964)
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
=================================================
./valgrind/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2009-05-08 03:15:43.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-08 03:25:25.000000000 +1000
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -9,85 +9,91 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2854)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2854)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2858)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2858)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
<truncated beyond 100 lines>
=================================================
./valgrind/none/tests/linux/mremap2.stdout.diff
=================================================
--- mremap2.stdout.exp 2009-05-08 03:16:49.000000000 +1000
+++ mremap2.stdout.out 2009-05-08 03:26:32.000000000 +1000
@@ -27,38 +27,38 @@
..................................................
..................................................
-maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
@@ -173,40 +173,40 @@
..................................................
..................................................
-maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
..................................................
-maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
..................................................
-maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
..................................................
<truncated beyond 100 lines>
=================================================
./valgrind/none/tests/linux/mremap2.stdout.diff-glibc28-amd64
=================================================
--- mremap2.stdout.exp-glibc28-amd64 2009-05-08 03:16:49.000000000 +1000
+++ mremap2.stdout.out 2009-05-08 03:26:32.000000000 +1000
@@ -188,37 +188,37 @@
maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== other)
XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
..................................................
maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== other)
XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
..................................................
maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== other)
XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
..................................................
maymv 1 fixed 0 newsz 30 dstpo 1 dst 0x........ -> 0x........ (== other)
XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
..................................................
maymv 1 fixed 0 newsz 31 dstpo 0 dst 0x........ -> 0x........ (== other)
XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
..................................................
maymv 1 fixed 0 newsz 31 dstpo 1 dst 0x........ -> 0x........ (== other)
XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
..................................................
=================================================
./valgrind/none/tests/linux/mremap2.stdout.diff2
=================================================
--- mremap2.stdout.exp2 2009-05-08 03:16:49.000000000 +1000
+++ mremap2.stdout.out 2009-05-08 03:26:32.000000000 +1000
@@ -27,38 +27,38 @@
..................................................
..................................................
-maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> error 12
+XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
@@ -173,52 +173,52 @@
..................................................
..................................................
-maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX
+maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
..................................................
..................................................
-maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
..................................................
-maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX
+maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
..................................................
-maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src)
-XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== other)
+XXXXXXXXX...............................XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-..................................................
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
..................................................
<truncated beyond 100 lines>
=================================================
./valgrind/none/tests/shell.stderr.diff
=================================================
--- shell.stderr.exp 2009-05-08 03:17:00.000000000 +1000
+++ shell.stderr.out 2009-05-08 03:26:48.000000000 +1000
@@ -1,8 +1 @@
-./shell: ./x86/: is a directory
-./shell: ./shell.vgtest: Permission denied
-execve(0x........(./shell_badinterp), 0x........, 0x........) failed, errno 2
-EXEC FAILED: I can't recover from execve() failing, so I'm dying.
-Add more stringent tests in PRE(sys_execve), or work out how to recover.
-./shell: ./shell_binaryfile: cannot execute binary file
-./shell: ./shell_nosuchfile: No such file or directory
-./shell: shell_nosuchfile: command not found
+valgrind: failed to start tool 'none' for platform 'amd64-linux': No such file or directory
=================================================
./valgrind/none/tests/shell.stderr.diff-dash
=================================================
--- shell.stderr.exp-dash 2009-05-08 03:17:00.000000000 +1000
+++ shell.stderr.out 2009-05-08 03:26:48.000000000 +1000
@@ -1,8 +1 @@
-./shell: 10: ./x86/: Permission denied
-./shell: 13: ./shell.vgtest: Permission denied
-execve(0x........(./shell_badinterp), 0x........, 0x........) failed, errno 2
-EXEC FAILED: I can't recover from execve() failing, so I'm dying.
-Add more stringent tests in PRE(sys_execve), or work out how to recover.
-./shell_binaryfile: 4: Syntax error: ")" unexpected
-./shell: 22: ./shell_nosuchfile: not found
-./shell: 25: shell_nosuchfile: not found
+valgrind: failed to start tool 'none' for platform 'amd64-linux': No such file or directory
=================================================
./valgrind/none/tests/shell.stdout.diff
=================================================
--- shell.stdout.exp 2009-05-08 03:17:00.000000000 +1000
+++ shell.stdout.out 2009-05-08 03:26:48.000000000 +1000
@@ -1,10 +0,0 @@
-Execute a directory
-Execute a non-executable file
-Execute a script with a bad interpreter name
-Execute a binary file
-Execute a non-existent file
-Execute a non-existent file (2)
-Execute a valid script with a #! line
-Execute a valid script without a #! line
-Execute a valid script with #! but no interpname
-Execute a zero-length file
=================================================
./valgrind/none/tests/shell_valid1.stderr.diff
=================================================
--- shell_valid1.stderr.exp 2009-05-08 03:17:00.000000000 +1000
+++ shell_valid1.stderr.out 2009-05-08 03:26:48.000000000 +1000
@@ -0,0 +1 @@
+valgrind: failed to start tool 'none' for platform 'amd64-linux': No such file or directory
=================================================
./valgrind/none/tests/shell_valid2.stderr.diff
=================================================
--- shell_valid2.stderr.exp 2009-05-08 03:17:00.000000000 +1000
+++ shell_valid2.stderr.out 2009-05-08 03:26:48.000000000 +1000
@@ -0,0 +1,2 @@
+valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit)
+valgrind: ./shell_valid2: bad interpreter (/bin/sh): VG_(strerror): unknown error
=================================================
./valgrind/none/tests/shell_valid3.stderr.diff
=================================================
--- shell_valid3.stderr.exp 2009-05-08 03:17:00.000000000 +1000
+++ shell_valid3.stderr.out 2009-05-08 03:26:48.000000000 +1000
@@ -0,0 +1,2 @@
+valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit)
+valgrind: ./shell_valid3: bad interpreter (/bin/sh): VG_(strerror): unknown error
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 16:27:39
|
Nightly build on ocean ( Ubuntu 9.04, Intel x86-64 ) started at 2009-05-08 02:00:01 EST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 485 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) ================================================= ./valgrind/none/tests/linux/mremap2.stdout.diff ================================================= --- mremap2.stdout.exp 2009-05-08 02:14:09.000000000 +1000 +++ mremap2.stdout.out 2009-05-08 02:26:47.000000000 +1000 @@ -27,38 +27,38 @@ .................................................. .................................................. -maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. @@ -173,40 +173,40 @@ .................................................. .................................................. -maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................... .................................................. -maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................... .................................................. -maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................... .................................................. <truncated beyond 100 lines> ================================================= ./valgrind/none/tests/linux/mremap2.stdout.diff-glibc28-amd64 ================================================= --- mremap2.stdout.exp-glibc28-amd64 2009-05-08 02:14:09.000000000 +1000 +++ mremap2.stdout.out 2009-05-08 02:26:47.000000000 +1000 @@ -188,37 +188,37 @@ maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== other) XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................... .................................................. maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== other) XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................... .................................................. maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== other) XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................... .................................................. maymv 1 fixed 0 newsz 30 dstpo 1 dst 0x........ -> 0x........ (== other) XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................... .................................................. maymv 1 fixed 0 newsz 31 dstpo 0 dst 0x........ -> 0x........ (== other) XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................... .................................................. maymv 1 fixed 0 newsz 31 dstpo 1 dst 0x........ -> 0x........ (== other) XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................... .................................................. ================================================= ./valgrind/none/tests/linux/mremap2.stdout.diff2 ================================================= --- mremap2.stdout.exp2 2009-05-08 02:14:09.000000000 +1000 +++ mremap2.stdout.out 2009-05-08 02:26:47.000000000 +1000 @@ -27,38 +27,38 @@ .................................................. .................................................. -maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 0 fixed 0 newsz 21 dstpo 0 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 0 fixed 0 newsz 21 dstpo 1 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 0 fixed 0 newsz 29 dstpo 0 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 0 fixed 0 newsz 29 dstpo 1 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +maymv 0 fixed 0 newsz 30 dstpo 0 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +maymv 0 fixed 0 newsz 30 dstpo 1 dst 0x........ -> error 12 +XXXXXXXXX.XXXXXXXXXXXXXXXXXXXX..........XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. @@ -173,52 +173,52 @@ .................................................. .................................................. -maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 1 fixed 0 newsz 21 dstpo 0 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.........XXXXXXXXXX +maymv 1 fixed 0 newsz 21 dstpo 1 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .................................................. .................................................. -maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 1 fixed 0 newsz 29 dstpo 0 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................... .................................................. -maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX +maymv 1 fixed 0 newsz 29 dstpo 1 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................... .................................................. -maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== src) -XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +maymv 1 fixed 0 newsz 30 dstpo 0 dst 0x........ -> 0x........ (== other) +XXXXXXXXX...............................XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -.................................................. +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................... .................................................. <truncated beyond 100 lines> |
|
From: Julian S. <js...@ac...> - 2009-05-07 08:54:46
|
> > It looks to me that leak-resolution=high will be a better default as it > > will not confuse users. If a user really needs to combine various stack > > traces in one stack trace, then resolution low or medium can then be > > given. > > I agree with this. The rationale in the docs is: > > <para>For hardcore leak debugging, you probably want to use > <option>--leak-resolution=high</option> together with > <option>--num-callers=40</option> or some such large number. Note > however that this can give an overwhelming amount of information, > which is why the defaults give less information.</para> > > but I can see it would be confusing, especially since it is *different > to the way other reports are merged*. I don't have a particularly strong opinion; if you want to change the default to high, then fine. The reason I set it the way it is is because of a feeling that it's better to present a small amount of info to the user and then say "I can show you more details if you want", then to flood the user with lots of different stack traces from the start. But perhaps a bad call. > If a user gets lots of leak reports with --leak-resolution=high, then > that's because the program has lots of leaks which will need to be > fixed! Pretending otherwise doesn't make their lives easier. Julian? Well, regardless of the setting of this, we always print the totals for blocks and bytes leaked (in various ways). So it's not like we're pretending the program is less leaky than it really is. J |
|
From: <sv...@va...> - 2009-05-07 05:44:38
|
Author: njn
Date: 2009-05-07 06:44:34 +0100 (Thu, 07 May 2009)
New Revision: 9792
Log:
Remove some unnecessary comments.
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-07 05:37:51 UTC (rev 9791)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-07 05:44:34 UTC (rev 9792)
@@ -782,7 +782,6 @@
//tst->sys_flags &= ~SfMayBlock;
break;
- // DDD: #warning GrP fixme darwin-specific ioctl
case VKI_FIODTYPE:
PRE_MEM_WRITE( "ioctl(FIONREAD)", ARG3, sizeof(int) );
break;
@@ -909,7 +908,6 @@
case VKI_SIOCSPGRP:
break;
- // DDD: #warning GrP fixme darwin-specific ioctl
case VKI_FIODTYPE:
POST_MEM_WRITE( ARG3, sizeof(int) );
break;
@@ -6701,39 +6699,6 @@
}
-/*
-// GrP fixme gone in Leopard
-PRE(MKGetTimeBaseInfo)
-{
- PRINT("MKGetTimeBaseInfo(%p, %p, %p, %p, %p)",
- ARG1, ARG2, ARG3, ARG4, ARG5);
- PRE_REG_READ5(long, "MKGetTimeBaseInfo", void*,"delta",
- void*,"abs_to_ns_numer", void*,"abs_to_ns_denom",
- void*,"proc_to_abs_numer", void*,"proc_to_abs_denom");
-
- PRE_MEM_WRITE("MKGetTimeBaseInfo(delta)",
- ARG1, sizeof(vki_uint32_t));
- PRE_MEM_WRITE("MKGetTimeBaseInfo(abs_to_ns_numer)",
- ARG1, sizeof(vki_uint32_t));
- PRE_MEM_WRITE("MKGetTimeBaseInfo(abs_to_ns_denom)",
- ARG1, sizeof(vki_uint32_t));
- PRE_MEM_WRITE("MKGetTimeBaseInfo(proc_to_abs_numer)",
- ARG1, sizeof(vki_uint32_t));
- PRE_MEM_WRITE("MKGetTimeBaseInfo(proc_to_abs_denom)",
- ARG1, sizeof(vki_uint32_t));
-}
-
-POST(MKGetTimeBaseInfo)
-{
- POST_MEM_WRITE(ARG1, sizeof(vki_uint32_t));
- POST_MEM_WRITE(ARG1, sizeof(vki_uint32_t));
- POST_MEM_WRITE(ARG1, sizeof(vki_uint32_t));
- POST_MEM_WRITE(ARG1, sizeof(vki_uint32_t));
- POST_MEM_WRITE(ARG1, sizeof(vki_uint32_t));
-}
-*/
-
-
PRE(swtch)
{
PRINT("swtch ( )");
|
|
From: Philippe W. <phi...@sk...> - 2009-05-07 05:38:51
|
> > It looks to me that leak-resolution=high will be a better default as it will not confuse users.
> I agree with this. The rationale in the docs is:
Note that the command line summary help text (3.4.1) is also somewhat confusing:
--leak-resolution=low|med|high how much bt merging in leak check [low]
Intuitively (at least for a french speaking person :), a "low how much bt merging"
will merge less stack traces than a "high" bt merging.
Maybe the help text should be changed to (assuming the default changes):
'precision and quantity of leak backtraces reporting [high]'
This explains you get a low precision and a low quantity
or a high precision and a high quantify
|
|
From: <sv...@va...> - 2009-05-07 05:38:01
|
Author: njn
Date: 2009-05-07 06:37:51 +0100 (Thu, 07 May 2009)
New Revision: 9791
Log:
Minor tweaks.
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-05-07 04:18:27 UTC (rev 9790)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-05-07 05:37:51 UTC (rev 9791)
@@ -160,7 +160,11 @@
we just pass di_handle=0 to notify_tool_of_mmap as we have no
better information. But really this function should be done away
with; problem is I don't understand what POST(sys_io_setup) does or
- how it works. */
+ how it works.
+
+ [This function is also used lots for Darwin, because
+ ML_(generic_PRE_sys_mmap) cannot be used for Darwin.]
+ */
void
ML_(notify_aspacem_and_tool_of_mmap) ( Addr a, SizeT len, UInt prot,
UInt flags, Int fd, Off64T offset )
@@ -1944,14 +1948,14 @@
MapRequest mreq;
Bool mreq_ok;
- // GrP fixme this has races - don't use
+#if defined(VGO_darwin)
+ // Nb: we can't use this on Darwin, it has races:
// * needs to RETRY if advisory succeeds but map fails
// (could have been some other thread in a nonblocking call)
// * needs to not use fixed-position mmap() on Darwin
// (mmap will cheerfully smash whatever's already there, which might
// be a new mapping from some other thread in a nonblocking call)
-#if defined(VGO_darwin)
- __builtin_trap();
+ VG_(core_panic)("can't use ML_(generic_PRE_sys_mmap) on Darwin");
#endif
if (arg2 == 0) {
|
|
From: <sv...@va...> - 2009-05-07 04:18:33
|
Author: njn
Date: 2009-05-07 05:18:27 +0100 (Thu, 07 May 2009)
New Revision: 9790
Log:
Fixed #191761 (getrlimit/setrlimit problem on Darwin) with a patch from Dan
Kegel. Also added a test case for it.
Added:
branches/DARWIN/none/tests/darwin/rlimit.c
branches/DARWIN/none/tests/darwin/rlimit.stderr.exp
branches/DARWIN/none/tests/darwin/rlimit.vgtest
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/include/vki/vki-darwin.h
branches/DARWIN/none/tests/darwin/Makefile.am
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-05-07 00:59:26 UTC (rev 9789)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-05-07 04:18:27 UTC (rev 9790)
@@ -3107,6 +3107,12 @@
{
POST_MEM_WRITE( a2, sizeof(struct vki_rlimit) );
+#ifdef _RLIMIT_POSIX_FLAG
+ // Darwin will sometimes set _RLIMIT_POSIX_FLAG on getrlimit calls.
+ // Unset it here to make the switch case below work correctly.
+ a1 &= ~_RLIMIT_POSIX_FLAG;
+#endif
+
switch (a1) {
case VKI_RLIMIT_NOFILE:
((struct vki_rlimit *)a2)->rlim_cur = VG_(fd_soft_limit);
@@ -3826,12 +3832,19 @@
PRE(sys_setrlimit)
{
+ UWord arg1 = ARG1;
PRINT("sys_setrlimit ( %ld, %#lx )", ARG1,ARG2);
PRE_REG_READ2(long, "setrlimit",
unsigned int, resource, struct rlimit *, rlim);
PRE_MEM_READ( "setrlimit(rlim)", ARG2, sizeof(struct vki_rlimit) );
- if (ARG1 == VKI_RLIMIT_NOFILE) {
+#ifdef _RLIMIT_POSIX_FLAG
+ // Darwin will sometimes set _RLIMIT_POSIX_FLAG on setrlimit calls.
+ // Unset it here to make the if statements below work correctly.
+ arg1 &= ~_RLIMIT_POSIX_FLAG;
+#endif
+
+ if (arg1 == VKI_RLIMIT_NOFILE) {
if (((struct vki_rlimit *)ARG2)->rlim_cur > VG_(fd_hard_limit) ||
((struct vki_rlimit *)ARG2)->rlim_max != VG_(fd_hard_limit)) {
SET_STATUS_Failure( VKI_EPERM );
@@ -3841,7 +3854,7 @@
SET_STATUS_Success( 0 );
}
}
- else if (ARG1 == VKI_RLIMIT_DATA) {
+ else if (arg1 == VKI_RLIMIT_DATA) {
if (((struct vki_rlimit *)ARG2)->rlim_cur > VG_(client_rlimit_data).rlim_max ||
((struct vki_rlimit *)ARG2)->rlim_max > VG_(client_rlimit_data).rlim_max) {
SET_STATUS_Failure( VKI_EPERM );
@@ -3851,7 +3864,7 @@
SET_STATUS_Success( 0 );
}
}
- else if (ARG1 == VKI_RLIMIT_STACK && tid == 1) {
+ else if (arg1 == VKI_RLIMIT_STACK && tid == 1) {
if (((struct vki_rlimit *)ARG2)->rlim_cur > VG_(client_rlimit_stack).rlim_max ||
((struct vki_rlimit *)ARG2)->rlim_max > VG_(client_rlimit_stack).rlim_max) {
SET_STATUS_Failure( VKI_EPERM );
Modified: branches/DARWIN/include/vki/vki-darwin.h
===================================================================
--- branches/DARWIN/include/vki/vki-darwin.h 2009-05-07 00:59:26 UTC (rev 9789)
+++ branches/DARWIN/include/vki/vki-darwin.h 2009-05-07 04:18:27 UTC (rev 9790)
@@ -636,7 +636,7 @@
#define VKI_RLIMIT_MEMLOCK RLIMIT_MEMLOCK
#define VKI_RLIMIT_NPROC RLIMIT_NPROC
#define VKI_RLIMIT_NOFILE RLIMIT_NOFILE
-#define VKI_RLIM_NLIMITS RLIM_MLIMITS
+#define VKI_RLIM_NLIMITS RLIM_NLIMITS
#define vki_rlim_t rlim_t
#define vki_rlimit rlimit
Modified: branches/DARWIN/none/tests/darwin/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/darwin/Makefile.am 2009-05-07 00:59:26 UTC (rev 9789)
+++ branches/DARWIN/none/tests/darwin/Makefile.am 2009-05-07 04:18:27 UTC (rev 9790)
@@ -4,10 +4,12 @@
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
- apple-main-arg.stderr.exp apple-main-arg.vgtest
+ apple-main-arg.stderr.exp apple-main-arg.vgtest \
+ rlimit.stderr.exp rlimit.vgtest
check_PROGRAMS = \
- apple-main-arg
+ apple-main-arg \
+ rlimit
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
Added: branches/DARWIN/none/tests/darwin/rlimit.c
===================================================================
--- branches/DARWIN/none/tests/darwin/rlimit.c (rev 0)
+++ branches/DARWIN/none/tests/darwin/rlimit.c 2009-05-07 04:18:27 UTC (rev 9790)
@@ -0,0 +1,17 @@
+// Small test program to demonstrate Valgrind bug.
+// https://bugs.kde.org/show_bug.cgi?id=191761
+// Author: roh...@go...
+//
+// Before the fix, it was printing 266. Now it prints 256.
+
+#include <stdio.h>
+#include <sys/resource.h>
+
+int main(void)
+{
+ struct rlimit rlp;
+ getrlimit(RLIMIT_NOFILE, &rlp);
+ fprintf(stderr, "RLIMIT_NOFILE is %lld\n", (long long)rlp.rlim_cur);
+ return 0;
+}
+
Added: branches/DARWIN/none/tests/darwin/rlimit.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/darwin/rlimit.stderr.exp (rev 0)
+++ branches/DARWIN/none/tests/darwin/rlimit.stderr.exp 2009-05-07 04:18:27 UTC (rev 9790)
@@ -0,0 +1 @@
+RLIMIT_NOFILE is 256
Added: branches/DARWIN/none/tests/darwin/rlimit.vgtest
===================================================================
--- branches/DARWIN/none/tests/darwin/rlimit.vgtest (rev 0)
+++ branches/DARWIN/none/tests/darwin/rlimit.vgtest 2009-05-07 04:18:27 UTC (rev 9790)
@@ -0,0 +1,2 @@
+prog: rlimit
+vgopts: -q
|
|
From: Tom H. <th...@cy...> - 2009-05-07 02:44:47
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-05-07 03:05:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 480 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-05-07 02:28:18
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-05-07 03:10:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 486 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 01:00:27
|
On Wed, Apr 29, 2009 at 5:19 AM, Filipe Cabecinhas <fi...@gm...> wrote:
>>> There's also memcheck/tests/darwin/scalar.c, which is intended to test
>>> all the arguments to all syscalls for undefinedness (at least, most of
>>> them). If you can understand how it works, additions to it for the
>>> new syscalls (or any other syscalls) would be welcome.
>>
>> I'll take a peek at it, when I can. :-)
>
> I took a peek at it and inserted some calls to csops and sem_{init,destroy}.
>
> Here is the patch.
Committed (r9789), thanks.
> I think I understood what the Xs Ym mean...
> Xs: X "scalar" arguments
> Ym: Y "memory" (pointer) arguments.
I explained that a little better in the comments, too.
Nick
|
|
From: <sv...@va...> - 2009-05-07 00:59:34
|
Author: njn
Date: 2009-05-07 01:59:26 +0100 (Thu, 07 May 2009)
New Revision: 9789
Log:
Augment darwin/scalar.c with cases from Filipe Cabecinhas. And expand on
the comment in x86-linux/scalar.c.
Modified:
branches/DARWIN/memcheck/tests/darwin/scalar.c
branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp
branches/DARWIN/memcheck/tests/x86-linux/scalar.c
Modified: branches/DARWIN/memcheck/tests/darwin/scalar.c
===================================================================
--- branches/DARWIN/memcheck/tests/darwin/scalar.c 2009-05-07 00:20:07 UTC (rev 9788)
+++ branches/DARWIN/memcheck/tests/darwin/scalar.c 2009-05-07 00:59:26 UTC (rev 9789)
@@ -4,20 +4,9 @@
#include <sched.h>
#include <signal.h>
+// See memcheck/tests/x86-linux/scalar.c for an explanation of what this test
+// is doing.
-// Here we are trying to trigger every syscall error (scalar errors and
-// memory errors) for every syscall. We do this by passing a lot of bogus
-// arguments, mostly 0 and 1 (often it's 1 because NULL ptr args often aren't
-// checked for memory errors, or in order to have a non-zero length used
-// with some buffer). So most of the syscalls don't actually succeed and do
-// anything.
-//
-// Occasionally we have to be careful not to cause Valgrind to seg fault in
-// its pre-syscall wrappers; it does so because it can't know in general
-// when memory is unaddressable, and so tries to dereference it when doing
-// PRE_MEM_READ/PRE_MEM_WRITE calls. (Note that Memcheck will
-// always issue an error message immediately before these seg faults occur).
-
int main(void)
{
// uninitialised, but we know px[0] is 0x0
@@ -222,7 +211,11 @@
// /* 166 old exportfs */
// __NR_mount 167
// /* 168 old ustat */
+
// __NR_csops 169
+ GO(__NR_csops, "4s 1m");
+ SY(__NR_csops, x0, x0, x0+1, x0+1); FAILx(EFAULT);
+
// /* 170 old table */
// /* 171 old wait3 */
// /* 172 old rpause */
@@ -346,8 +339,15 @@
SY(__NR_sem_post, x0); FAIL;
// __NR_sem_getvalue 274
+
// __NR_sem_init 275
+ GO(__NR_sem_init, "3s 1m");
+ SY(__NR_sem_init, x0+1, x0, x0); FAILx(ENOSYS);
+
// __NR_sem_destroy 276
+ GO(__NR_sem_destroy, "1s 1m");
+ SY(__NR_sem_destroy, x0+1); FAILx(ENOSYS);
+
// __NR_open_extended 277
// __NR_umask_extended 278
// __NR_stat_extended 279
Modified: branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp 2009-05-07 00:20:07 UTC (rev 9788)
+++ branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp 2009-05-07 00:59:26 UTC (rev 9789)
@@ -83,8 +83,27 @@
...
Address 0x........ is 0 bytes after a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (scalar.c:24)
+ by 0x........: main (scalar.c:13)
-----------------------------------------------------
+169: __NR_csops 4s 1m
+-----------------------------------------------------
+
+Syscall param csops(pid) contains uninitialised byte(s)
+ ...
+
+Syscall param csops(ops) contains uninitialised byte(s)
+ ...
+
+Syscall param csops(useraddr) contains uninitialised byte(s)
+ ...
+
+Syscall param csops(usersize) contains uninitialised byte(s)
+ ...
+
+Syscall param csops(addr) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
268: __NR_sem_open 2s 1m
-----------------------------------------------------
@@ -129,6 +148,32 @@
Syscall param sem_post(sem) contains uninitialised byte(s)
...
-----------------------------------------------------
+275: __NR_sem_init 3s 1m
+-----------------------------------------------------
+
+Syscall param sem_init(sem) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_init(pshared) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_init(value) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_init(sem) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
+276: __NR_sem_destroy 1s 1m
+-----------------------------------------------------
+
+Syscall param sem_destroy(sem) contains uninitialised byte(s)
+ ...
+
+Syscall param sem_destroy(sem) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
420:__NR_sem_wait_nocancel 1s 0m
-----------------------------------------------------
Modified: branches/DARWIN/memcheck/tests/x86-linux/scalar.c
===================================================================
--- branches/DARWIN/memcheck/tests/x86-linux/scalar.c 2009-05-07 00:20:07 UTC (rev 9788)
+++ branches/DARWIN/memcheck/tests/x86-linux/scalar.c 2009-05-07 00:59:26 UTC (rev 9789)
@@ -17,6 +17,10 @@
// when memory is unaddressable, and so tries to dereference it when doing
// PRE_MEM_READ/PRE_MEM_WRITE calls. (Note that Memcheck will
// always issue an error message immediately before these seg faults occur).
+//
+// The output has numbers like "3s 2m" for each syscall. "s" is short for
+// "scalar", ie. the argument itself is undefined. "m" is short for "memory",
+// ie. the argument points to memory which is unaddressable.
int main(void)
{
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 00:23:56
|
On Thu, May 7, 2009 at 6:38 AM, Philippe Waroquiers
<phi...@sk...> wrote:
> The default value for leak-resolution is set to low.
> The default value for the nr of callers in a stack trace is 12 (so significantly higher than the 2 entries corresponding
> to the medium leak resolution).
> When a leak is reported, it is reported with a full stack trace (e.g. 12 callers)
> but this report "merges" the leaks created by various other stack traces only having the first 2 callers
> in common.
>
> At work, this has created confusion (and some doubts about the tool behaviour/quality)
> e.g. because "this stack trace is only called once and allocates only one block, how can it leak that much blocks ?"
> or "I fixed the only leak(s) reported, and now I have other leaks being reported in other stack traces."
>
> It looks to me that leak-resolution=high will be a better default as it will not confuse users.
> If a user really needs to combine various stack traces in one stack trace, then resolution low or medium
> can then be given.
I agree with this. The rationale in the docs is:
<para>For hardcore leak debugging, you probably want to use
<option>--leak-resolution=high</option> together with
<option>--num-callers=40</option> or some such large number. Note
however that this can give an overwhelming amount of information,
which is why the defaults give less information.</para>
but I can see it would be confusing, especially since it is *different
to the way other reports are merged*.
If a user gets lots of leak reports with --leak-resolution=high, then
that's because the program has lots of leaks which will need to be
fixed! Pretending otherwise doesn't make their lives easier. Julian?
> NB: I believe the valgrind user manual description of leak-resolution wrongly says the default value for
> the nr of callers is 4 (I think it is 12).
This was fixed on the trunk, but not the 3.4.X branch. I've fixed it
there too, now.
Nick
|
|
From: <sv...@va...> - 2009-05-07 00:20:27
|
Author: njn
Date: 2009-05-07 01:20:07 +0100 (Thu, 07 May 2009)
New Revision: 9788
Log:
Minor doc fix.
Modified:
branches/VALGRIND_3_4_BRANCH/memcheck/docs/mc-manual.xml
Modified: branches/VALGRIND_3_4_BRANCH/memcheck/docs/mc-manual.xml
===================================================================
--- branches/VALGRIND_3_4_BRANCH/memcheck/docs/mc-manual.xml 2009-05-06 07:34:26 UTC (rev 9787)
+++ branches/VALGRIND_3_4_BRANCH/memcheck/docs/mc-manual.xml 2009-05-07 00:20:07 UTC (rev 9788)
@@ -183,8 +183,7 @@
<option>--leak-resolution=high</option> together with
<option>--num-callers=40</option> or some such large number. Note
however that this can give an overwhelming amount of information,
- which is why the defaults are 4 callers and low-resolution
- matching.</para>
+ which is why the defaults give less information.</para>
<para>Note that the <option>--leak-resolution=</option> setting
does not affect <constant>memcheck's</constant> ability to find
|