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: Tom H. <th...@cy...> - 2009-05-02 02:27:49
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-05-02 03:10:05 BST Results differ 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) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 484 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat May 2 03:18:46 2009 --- new.short Sat May 2 03:27:26 2009 *************** *** 8,10 **** ! == 484 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) --- 8,10 ---- ! == 485 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) |
|
From: <sv...@va...> - 2009-05-02 00:00:45
|
Author: bart
Date: 2009-05-01 13:23:47 +0100 (Fri, 01 May 2009)
New Revision: 9712
Log:
Added support for the VG_USERREQ__MALLOCLIKE_BLOCK and VG_USERREQ__FREELIKE_BLOCK client requests.
Added:
trunk/drd/tests/custom_alloc.stderr.exp
trunk/drd/tests/custom_alloc.vgtest
Modified:
trunk/drd/drd_clientreq.c
trunk/drd/tests/Makefile.am
Modified: trunk/drd/drd_clientreq.c
===================================================================
--- trunk/drd/drd_clientreq.c 2009-05-01 12:21:39 UTC (rev 9711)
+++ trunk/drd/drd_clientreq.c 2009-05-01 12:23:47 UTC (rev 9712)
@@ -26,7 +26,9 @@
#include "drd_barrier.h"
#include "drd_clientreq.h"
#include "drd_cond.h"
+#include "drd_error.h"
#include "drd_load_store.h"
+#include "drd_malloc_wrappers.h"
#include "drd_mutex.h"
#include "drd_rwlock.h"
#include "drd_semaphore.h"
@@ -44,9 +46,8 @@
/* Local function declarations. */
-static
-Bool DRD_(handle_client_request)(ThreadId vg_tid, UWord* arg, UWord* ret);
-static Addr DRD_(highest_used_stack_address)(const ThreadId vg_tid);
+static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret);
+static Addr highest_used_stack_address(const ThreadId vg_tid);
/* Function definitions. */
@@ -57,15 +58,14 @@
*/
void DRD_(clientreq_init)(void)
{
- VG_(needs_client_requests)(DRD_(handle_client_request));
+ VG_(needs_client_requests)(handle_client_request);
}
/**
* DRD's handler for Valgrind client requests. The code below handles both
* DRD's public and tool-internal client requests.
*/
-static
-Bool DRD_(handle_client_request)(ThreadId vg_tid, UWord* arg, UWord* ret)
+static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret)
{
UWord result = 0;
const DrdThreadId drd_tid = DRD_(thread_get_running_tid)();
@@ -75,6 +75,32 @@
switch (arg[0])
{
+ case VG_USERREQ__MALLOCLIKE_BLOCK:
+ if (arg[1])
+ DRD_(malloclike_block)(vg_tid, arg[1]/*addr*/, arg[2]/*size*/);
+ break;
+
+ case VG_USERREQ__FREELIKE_BLOCK:
+ if (arg[1] && ! DRD_(freelike_block)(vg_tid, arg[1]/*addr*/))
+ {
+ VG_(maybe_record_error)(vg_tid,
+ GenericErr,
+ VG_(get_IP)(vg_tid),
+ "Invalid VG_USERREQ__FREELIKE_BLOCK request",
+ NULL);
+ }
+ break;
+
+ case VG_USERREQ__CREATE_MEMPOOL:
+ case VG_USERREQ__DESTROY_MEMPOOL:
+ case VG_USERREQ__MEMPOOL_ALLOC:
+ case VG_USERREQ__MEMPOOL_FREE:
+ case VG_USERREQ__MEMPOOL_TRIM:
+ case VG_USERREQ__MOVE_MEMPOOL:
+ case VG_USERREQ__MEMPOOL_CHANGE:
+ case VG_USERREQ__MEMPOOL_EXISTS:
+ break;
+
case VG_USERREQ__DRD_GET_VALGRIND_THREAD_ID:
result = vg_tid;
break;
@@ -93,7 +119,7 @@
case VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK:
{
- const Addr topmost_sp = DRD_(highest_used_stack_address)(vg_tid);
+ const Addr topmost_sp = highest_used_stack_address(vg_tid);
#if 0
UInt nframes;
const UInt n_ips = 20;
@@ -375,9 +401,6 @@
break;
default:
- VG_(message)(Vg_DebugMsg, "Unrecognized client request 0x%lx 0x%lx",
- arg[0], arg[1]);
- tl_assert(0);
return False;
}
@@ -393,7 +416,7 @@
* in vgpreload_exp-drd-*.so or from the thread wrapper for a newly created
* thread. See also drd_pthread_intercepts.c.
*/
-static Addr DRD_(highest_used_stack_address)(const ThreadId vg_tid)
+static Addr highest_used_stack_address(const ThreadId vg_tid)
{
UInt nframes;
const UInt n_ips = 10;
Modified: trunk/drd/tests/Makefile.am
===================================================================
--- trunk/drd/tests/Makefile.am 2009-05-01 12:21:39 UTC (rev 9711)
+++ trunk/drd/tests/Makefile.am 2009-05-01 12:23:47 UTC (rev 9712)
@@ -27,6 +27,8 @@
circular_buffer.stderr.exp-with-atomic-builtins \
circular_buffer.stderr.exp-without-atomic-builtins \
circular_buffer.vgtest \
+ custom_alloc.vgtest \
+ custom_alloc.stderr.exp \
drd_bitmap_test.stderr.exp \
drd_bitmap_test.stdout.exp \
drd_bitmap_test.vgtest \
Added: trunk/drd/tests/custom_alloc.stderr.exp
===================================================================
--- trunk/drd/tests/custom_alloc.stderr.exp (rev 0)
+++ trunk/drd/tests/custom_alloc.stderr.exp 2009-05-01 12:23:47 UTC (rev 9712)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Added: trunk/drd/tests/custom_alloc.vgtest
===================================================================
--- trunk/drd/tests/custom_alloc.vgtest (rev 0)
+++ trunk/drd/tests/custom_alloc.vgtest 2009-05-01 12:23:47 UTC (rev 9712)
@@ -0,0 +1 @@
+prog: ../../memcheck/tests/custom_alloc
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-01 17:43:06
|
Nightly build on ocean32 ( Ubuntu 9.04, Intel x86-64 (32-bit only) ) started at 2009-05-02 03:00:01 EST
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 447 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)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 446 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)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Sat May 2 03:22:57 2009
--- new.short Sat May 2 03:42:58 2009
***************
*** 8,10 ****
! == 446 tests, 7 stderr failures, 2 stdout failures, 0 post failures ==
memcheck/tests/linux/stack_switch (stderr)
--- 8,10 ----
! == 447 tests, 7 stderr failures, 2 stdout failures, 0 post failures ==
memcheck/tests/linux/stack_switch (stderr)
=================================================
./valgrind/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2009-05-02 03:25:49.000000000 +1000
+++ stack_switch.stderr.out 2009-05-02 03:40:56.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-02 03:26:08.000000000 +1000
+++ origin1-yes.stderr.out 2009-05-02 03:41:14.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-02 03:26:08.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-02 03:41:18.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-02 03:26:08.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-02 03:41:18.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-02 03:26:08.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-02 03:41:18.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-02 03:28:54.000000000 +1000
+++ mremap2.stdout.out 2009-05-02 03:42:25.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-02 03:28:54.000000000 +1000
+++ mremap2.stdout.out 2009-05-02 03:42:25.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-02 03:28:54.000000000 +1000
+++ mremap2.stdout.out 2009-05-02 03:42:25.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-02 03:29:13.000000000 +1000
+++ shell.stderr.out 2009-05-02 03:42:40.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-02 03:29:13.000000000 +1000
+++ shell.stderr.out 2009-05-02 03:42:40.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-02 03:29:13.000000000 +1000
+++ shell.stdout.out 2009-05-02 03:42:40.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-02 03:29:13.000000000 +1000
+++ shell_valid1.stderr.out 2009-05-02 03:42:41.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-02 03:29:13.000000000 +1000
+++ shell_valid2.stderr.out 2009-05-02 03:42:41.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-02 03:29:13.000000000 +1000
+++ shell_valid3.stderr.out 2009-05-02 03:42:41.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-01 16:51:20
|
Nightly build on ocean ( Ubuntu 9.04, Intel x86-64 ) started at 2009-05-02 02:00:01 EST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 484 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 483 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat May 2 02:22:23 2009 --- new.short Sat May 2 02:51:03 2009 *************** *** 8,10 **** ! == 483 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) --- 8,10 ---- ! == 484 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-02 02:30:53.000000000 +1000 +++ mremap2.stdout.out 2009-05-02 02:50:30.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-02 02:30:53.000000000 +1000 +++ mremap2.stdout.out 2009-05-02 02:50:30.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-02 02:30:53.000000000 +1000 +++ mremap2.stdout.out 2009-05-02 02:50:30.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: <sv...@va...> - 2009-05-01 12:37:41
|
Author: bart
Date: 2009-05-01 13:21:39 +0100 (Fri, 01 May 2009)
New Revision: 9711
Log:
Introduced the functions DRD_(malloclike_block)() and DRD_(freelike_block)().
Modified:
trunk/drd/drd_malloc_wrappers.c
trunk/drd/drd_malloc_wrappers.h
Modified: trunk/drd/drd_malloc_wrappers.c
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2009-05-01 11:54:07 UTC (rev 9710)
+++ trunk/drd/drd_malloc_wrappers.c 2009-05-01 12:21:39 UTC (rev 9711)
@@ -50,14 +50,14 @@
/* Local variables. */
-static StartUsingMem DRD_(s_start_using_mem_callback);
-static StopUsingMem DRD_(s_stop_using_mem_callback);
+static StartUsingMem s_start_using_mem_callback;
+static StopUsingMem s_stop_using_mem_callback;
/* Stats ... */
-static SizeT DRD_(s_cmalloc_n_mallocs) = 0;
-static SizeT DRD_(s_cmalloc_n_frees) = 0;
-static SizeT DRD_(s_cmalloc_bs_mallocd) = 0;
+static SizeT s_cmalloc_n_mallocs = 0;
+static SizeT s_cmalloc_n_frees = 0;
+static SizeT s_cmalloc_bs_mallocd = 0;
/* Record malloc'd blocks. */
-static VgHashTable DRD_(s_malloc_list) = NULL;
+static VgHashTable s_malloc_list = NULL;
/*------------------------------------------------------------*/
@@ -65,7 +65,7 @@
/*------------------------------------------------------------*/
/** Allocate its shadow chunk, put it on the appropriate list. */
-static DRD_Chunk* DRD_(create_chunk)(ThreadId tid, Addr p, SizeT size)
+static DRD_Chunk* create_chunk(ThreadId tid, Addr p, SizeT size)
{
DRD_Chunk* mc = VG_(malloc)("drd.malloc_wrappers.cDC.1",
sizeof(DRD_Chunk));
@@ -81,15 +81,11 @@
/*------------------------------------------------------------*/
/* Allocate memory and note change in memory available */
-static
-__inline__
-void* DRD_(new_block)(ThreadId tid,
- SizeT size, SizeT align,
- Bool is_zeroed)
+static void* new_block(ThreadId tid, SizeT size, SizeT align, Bool is_zeroed)
{
Addr p;
- DRD_(s_cmalloc_n_mallocs) ++;
+ s_cmalloc_n_mallocs ++;
// Allocate and zero
p = (Addr)VG_(cli_malloc)(align, size);
@@ -97,56 +93,79 @@
return NULL;
}
if (is_zeroed) VG_(memset)((void*)p, 0, size);
- DRD_(s_start_using_mem_callback)(p, p + size, 0/*ec_uniq*/);
- // Only update this stat if allocation succeeded.
- DRD_(s_cmalloc_bs_mallocd) += size;
+ DRD_(malloclike_block)(tid, p, size);
- VG_(HT_add_node)(DRD_(s_malloc_list), DRD_(create_chunk)(tid, p, size));
-
return (void*)p;
}
+/**
+ * Store information about a memory block that has been allocated by
+ * malloc() or a malloc() replacement.
+ */
+void DRD_(malloclike_block)(const ThreadId tid, const Addr p, const SizeT size)
+{
+ tl_assert(p);
+
+ s_start_using_mem_callback(p, p + size, 0/*ec_uniq*/);
+
+ // Only update this stat if allocation succeeded.
+ s_cmalloc_bs_mallocd += size;
+
+ VG_(HT_add_node)(s_malloc_list, create_chunk(tid, p, size));
+}
+
static void* DRD_(malloc)(ThreadId tid, SizeT n)
{
- return DRD_(new_block)(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
+ return new_block(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
}
static void* DRD_(memalign)(ThreadId tid, SizeT align, SizeT n)
{
- return DRD_(new_block)(tid, n, align, /*is_zeroed*/False);
+ return new_block(tid, n, align, /*is_zeroed*/False);
}
static void* DRD_(calloc)(ThreadId tid, SizeT nmemb, SizeT size1)
{
- return DRD_(new_block)(tid, nmemb*size1, VG_(clo_alignment),
+ return new_block(tid, nmemb*size1, VG_(clo_alignment),
/*is_zeroed*/True);
}
-static __inline__ void DRD_(handle_free)(ThreadId tid, Addr p)
+/**
+ * Remove the information that was stored by DRD_(malloclike_block)() about
+ * a memory block.
+ */
+Bool DRD_(freelike_block)(const ThreadId tid, const Addr p)
{
DRD_Chunk* mc;
- DRD_(s_cmalloc_n_frees)++;
+ tl_assert(p);
- mc = VG_(HT_remove)(DRD_(s_malloc_list), (UWord)p);
- if (mc == NULL)
+ s_cmalloc_n_frees++;
+
+ mc = VG_(HT_remove)(s_malloc_list, (UWord)p);
+ if (mc)
{
- tl_assert(0);
- }
- else
- {
tl_assert(p == mc->data);
if (mc->size > 0)
- DRD_(s_stop_using_mem_callback)(mc->data, mc->size);
- VG_(cli_free)((void*)p);
+ s_stop_using_mem_callback(mc->data, mc->size);
VG_(free)(mc);
+ return True;
}
+ return False;
}
+static void handle_free(ThreadId tid, Addr p)
+{
+ if (DRD_(freelike_block)(tid, p))
+ VG_(cli_free)((void*)p);
+ else
+ tl_assert(False);
+}
+
static void DRD_(free)(ThreadId tid, void* p)
{
- DRD_(handle_free)(tid, (Addr)p);
+ handle_free(tid, (Addr)p);
}
static void* DRD_(realloc)(ThreadId tid, void* p_old, SizeT new_size)
@@ -155,12 +174,12 @@
void* p_new;
SizeT old_size;
- DRD_(s_cmalloc_n_frees) ++;
- DRD_(s_cmalloc_n_mallocs) ++;
- DRD_(s_cmalloc_bs_mallocd) += new_size;
+ s_cmalloc_n_frees ++;
+ s_cmalloc_n_mallocs ++;
+ s_cmalloc_bs_mallocd += new_size;
/* Remove the old block */
- mc = VG_(HT_remove)(DRD_(s_malloc_list), (UWord)p_old);
+ mc = VG_(HT_remove)(s_malloc_list, (UWord)p_old);
if (mc == NULL) {
tl_assert(0);
return NULL;
@@ -178,7 +197,7 @@
else if (old_size > new_size)
{
/* new size is smaller */
- DRD_(s_stop_using_mem_callback)(mc->data + new_size, old_size);
+ s_stop_using_mem_callback(mc->data + new_size, old_size);
mc->size = new_size;
mc->where = VG_(record_ExeContext)(tid, 0);
p_new = p_old;
@@ -196,12 +215,12 @@
VG_(memcpy)((void*)a_new, p_old, mc->size);
/* Free old memory */
- DRD_(s_stop_using_mem_callback)(mc->data, mc->size);
+ s_stop_using_mem_callback(mc->data, mc->size);
VG_(free)(mc);
// Allocate a new chunk.
- mc = DRD_(create_chunk)(tid, a_new, new_size);
- DRD_(s_start_using_mem_callback)(a_new, a_new + new_size,
+ mc = create_chunk(tid, a_new, new_size);
+ s_start_using_mem_callback(a_new, a_new + new_size,
0/*ec_uniq*/);
}
else
@@ -217,14 +236,14 @@
// will have removed and then re-added mc unnecessarily. But that's ok
// because shrinking a block with realloc() is (presumably) much rarer
// than growing it, and this way simplifies the growing case.
- VG_(HT_add_node)(DRD_(s_malloc_list), mc);
+ VG_(HT_add_node)(s_malloc_list, mc);
return p_new;
}
static void* DRD_(__builtin_new)(ThreadId tid, SizeT n)
{
- void* const result = DRD_(new_block)(tid, n, VG_(clo_alignment),
+ void* const result = new_block(tid, n, VG_(clo_alignment),
/*is_zeroed*/False);
//VG_(message)(Vg_DebugMsg, "__builtin_new(%d, %d) = %p", tid, n, result);
return result;
@@ -233,22 +252,22 @@
static void DRD_(__builtin_delete)(ThreadId tid, void* p)
{
//VG_(message)(Vg_DebugMsg, "__builtin_delete(%d, %p)", tid, p);
- DRD_(handle_free)(tid, (Addr)p);
+ handle_free(tid, (Addr)p);
}
static void* DRD_(__builtin_vec_new)(ThreadId tid, SizeT n)
{
- return DRD_(new_block)(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
+ return new_block(tid, n, VG_(clo_alignment), /*is_zeroed*/False);
}
static void DRD_(__builtin_vec_delete)(ThreadId tid, void* p)
{
- DRD_(handle_free)(tid, (Addr)p);
+ handle_free(tid, (Addr)p);
}
static SizeT DRD_(malloc_usable_size) ( ThreadId tid, void* p )
{
- DRD_Chunk *mc = VG_(HT_lookup)( DRD_(s_malloc_list), (UWord)p );
+ DRD_Chunk *mc = VG_(HT_lookup)( s_malloc_list, (UWord)p );
// There may be slop, but pretend there isn't because only the asked-for
// area will have been shadowed properly.
@@ -258,14 +277,14 @@
void DRD_(register_malloc_wrappers)(const StartUsingMem start_callback,
const StopUsingMem stop_callback)
{
- tl_assert(DRD_(s_malloc_list) == 0);
- DRD_(s_malloc_list) = VG_(HT_construct)("drd_malloc_list"); // a big prime
- tl_assert(DRD_(s_malloc_list) != 0);
+ tl_assert(s_malloc_list == 0);
+ s_malloc_list = VG_(HT_construct)("drd_malloc_list"); // a big prime
+ tl_assert(s_malloc_list != 0);
tl_assert(start_callback);
tl_assert(stop_callback);
- DRD_(s_start_using_mem_callback) = start_callback;
- DRD_(s_stop_using_mem_callback) = stop_callback;
+ s_start_using_mem_callback = start_callback;
+ s_stop_using_mem_callback = stop_callback;
VG_(needs_malloc_replacement)(DRD_(malloc),
DRD_(__builtin_new),
@@ -291,8 +310,8 @@
tl_assert(size);
tl_assert(where);
- VG_(HT_ResetIter)(DRD_(s_malloc_list));
- while ((mc = VG_(HT_Next)(DRD_(s_malloc_list))))
+ VG_(HT_ResetIter)(s_malloc_list);
+ while ((mc = VG_(HT_Next)(s_malloc_list)))
{
if (mc->data <= a && a < mc->data + mc->size)
{
@@ -321,8 +340,8 @@
return;
/* Count memory still in use. */
- VG_(HT_ResetIter)(DRD_(s_malloc_list));
- while ((mc = VG_(HT_Next)(DRD_(s_malloc_list))))
+ VG_(HT_ResetIter)(s_malloc_list);
+ while ((mc = VG_(HT_Next)(s_malloc_list)))
{
nblocks++;
nbytes += mc->size;
@@ -333,8 +352,8 @@
nbytes, nblocks);
VG_(message)(Vg_DebugMsg,
"malloc/free: %lu allocs, %lu frees, %lu bytes allocated.",
- DRD_(s_cmalloc_n_mallocs),
- DRD_(s_cmalloc_n_frees), DRD_(s_cmalloc_bs_mallocd));
+ s_cmalloc_n_mallocs,
+ s_cmalloc_n_frees, s_cmalloc_bs_mallocd);
if (VG_(clo_verbosity) > 1)
VG_(message)(Vg_DebugMsg, " ");
}
Modified: trunk/drd/drd_malloc_wrappers.h
===================================================================
--- trunk/drd/drd_malloc_wrappers.h 2009-05-01 11:54:07 UTC (rev 9710)
+++ trunk/drd/drd_malloc_wrappers.h 2009-05-01 12:21:39 UTC (rev 9711)
@@ -37,6 +37,8 @@
void DRD_(register_malloc_wrappers)(const StartUsingMem start_callback,
const StopUsingMem stop_callback);
+void DRD_(malloclike_block)(const ThreadId tid, const Addr p, const SizeT size);
+Bool DRD_(freelike_block)(const ThreadId tid, const Addr p);
Bool DRD_(heap_addrinfo)(Addr const a,
Addr* const data,
SizeT* const size,
|
|
From: <sv...@va...> - 2009-05-01 11:54:24
|
Author: bart Date: 2009-05-01 12:54:07 +0100 (Fri, 01 May 2009) New Revision: 9710 Log: Compiles now on RHEL 5.3 systems. In the RHEL 5.3 headers __NR_timerfd_create is defined but neither __NR_timerfd_settime nor __NR_timerfd_gettime. Modified: trunk/memcheck/tests/linux/timerfd-syscall.c Modified: trunk/memcheck/tests/linux/timerfd-syscall.c =================================================================== --- trunk/memcheck/tests/linux/timerfd-syscall.c 2009-05-01 08:08:54 UTC (rev 9709) +++ trunk/memcheck/tests/linux/timerfd-syscall.c 2009-05-01 11:54:07 UTC (rev 9710) @@ -57,14 +57,23 @@ #ifndef __NR_timerfd_create #if defined(__x86_64__) #define __NR_timerfd_create 283 +#elif defined(__i386__) +#define __NR_timerfd_create 322 +#elif defined(__powerpc__) +#define __NR_timerfd_create 306 +#else +#error Cannot detect your architecture! +#endif +#endif + +#ifndef __NR_timerfd_settime +#if defined(__x86_64__) #define __NR_timerfd_settime 286 #define __NR_timerfd_gettime 287 #elif defined(__i386__) -#define __NR_timerfd_create 322 #define __NR_timerfd_settime 325 #define __NR_timerfd_gettime 326 #elif defined(__powerpc__) -#define __NR_timerfd_create 306 #define __NR_timerfd_settime 311 #define __NR_timerfd_gettime 312 #else |
|
From: <sv...@va...> - 2009-05-01 08:09:17
|
Author: njn
Date: 2009-05-01 09:08:54 +0100 (Fri, 01 May 2009)
New Revision: 9709
Log:
- Reenable async-sigs. It still doesn't pass.
- Rename some things in m_signals.c.
- Update and comment is_signal_from_kernel. Unfortunately it's broken on
Darwin because si_code is totally unreliable.
Modified:
branches/DARWIN/coregrind/m_signals.c
branches/DARWIN/none/tests/Makefile.am
Modified: branches/DARWIN/coregrind/m_signals.c
===================================================================
--- branches/DARWIN/coregrind/m_signals.c 2009-05-01 06:54:43 UTC (rev 9708)
+++ branches/DARWIN/coregrind/m_signals.c 2009-05-01 08:08:54 UTC (rev 9709)
@@ -1255,8 +1255,18 @@
// them.
return ( si_code > VKI_SI_USER ? True : False );
#elif defined(VGO_darwin)
- // On Darwin, SI_USER is 0x10001, values greater than that are from the
- // user, small positive integers are from the kernel.
+ // On Darwin 9.6.0, the si_code is completely unreliable. It should be the
+ // case that 0 means "user", and >0 means "kernel". But:
+ // - For SIGSEGV, it seems quite reliable.
+ // - For SIGBUS, it's always 2.
+ // - For SIGFPE, it's often 0, even for kernel ones (eg.
+ // div-by-integer-zero always gives zero).
+ // - For SIGILL, it's unclear.
+ // - For SIGTRAP, it's always 1.
+ // You can see the "NOTIMP" (not implemented) status of a number of the
+ // sub-cases in sys/signal.h. Since it's fairly hopeless, we just pretend
+ // like the problems don't exist. Hopefully future versions of Darwin will
+ // get closer to this ideal...
return ( si_code < VKI_SI_USER ? True : False );
#else
# error Unknown OS
@@ -1925,12 +1935,12 @@
}
static
-void sync_signalhandler_from_outside ( ThreadId tid,
+void sync_signalhandler_from_user ( ThreadId tid,
Int sigNo, vki_siginfo_t *info, struct vki_ucontext *uc )
{
ThreadId qtid;
- /* If some user-process sent us a sync signal (ie, they're not the result
+ /* If some user-process sent us a sync signal (ie. it's not the result
of a faulting instruction), then how we treat it depends on when it
arrives... */
@@ -2058,7 +2068,7 @@
}
static
-void sync_signalhandler_from_inside ( ThreadId tid,
+void sync_signalhandler_from_kernel ( ThreadId tid,
Int sigNo, vki_siginfo_t *info, struct vki_ucontext *uc )
{
/* Check to see if some part of Valgrind itself is interested in faults.
@@ -2150,7 +2160,7 @@
vki_siginfo_t *info, struct vki_ucontext *uc )
{
ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
- Bool from_outside;
+ Bool from_user;
if (0)
VG_(printf)("sync_sighandler(%d, %p, %p)\n", sigNo, info, uc);
@@ -2165,14 +2175,14 @@
info->si_code = sanitize_si_code(info->si_code);
- from_outside = !is_signal_from_kernel(info->si_code);
+ from_user = !is_signal_from_kernel(info->si_code);
if (VG_(clo_trace_signals)) {
VG_DMSG("sync signal handler: "
"signal=%d, si_code=%d, EIP=%#lx, eip=%#lx, from %s",
sigNo, info->si_code, VG_(get_IP)(tid),
VG_UCONTEXT_INSTR_PTR(uc),
- ( from_outside ? "outside" : "inside" ));
+ ( from_user ? "user" : "kernel" ));
}
vg_assert(sigNo >= 1 && sigNo <= VG_(max_signal));
@@ -2192,10 +2202,10 @@
(Why do we care?) If the signal is from the user rather than the
kernel, then treat it more like an async signal than a sync signal --
that is, merely queue it for later delivery. */
- if (from_outside) {
- sync_signalhandler_from_outside(tid, sigNo, info, uc);
+ if (from_user) {
+ sync_signalhandler_from_user(tid, sigNo, info, uc);
} else {
- sync_signalhandler_from_inside( tid, sigNo, info, uc);
+ sync_signalhandler_from_kernel( tid, sigNo, info, uc);
}
}
Modified: branches/DARWIN/none/tests/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/Makefile.am 2009-05-01 06:54:43 UTC (rev 9708)
+++ branches/DARWIN/none/tests/Makefile.am 2009-05-01 08:08:54 UTC (rev 9709)
@@ -130,6 +130,7 @@
check_PROGRAMS = \
ansi args \
+ async-sigs \
bitfield1 \
bug129866 \
closeall coolo_strlen \
@@ -152,12 +153,6 @@
tls tls.so tls2.so vgprintf \
coolo_sigaction gxx304
-# DDD: async-sigs builds and runs under Valgrind, although it fails I think
-# it is disabled because it currently screw up other tests.
-if ! VGCONF_OS_IS_DARWIN
- check_PROGRAMS += \
- async-sigs
-endif
# DDD:
# - manythreads and thread-exits have lots of this:
# --61831:0:aspacem sync_check_mapping_callback: segment mismatch:
|
|
From: <sv...@va...> - 2009-05-01 06:54:49
|
Author: bart
Date: 2009-05-01 07:54:43 +0100 (Fri, 01 May 2009)
New Revision: 9708
Log:
Updated cross-compilation nightly build config files (not in use at this time).
Modified:
trunk/nightly/conf/georgia-tech-cellbuzz-cross.conf
trunk/nightly/conf/georgia-tech-cellbuzz-cross.sendmail
Modified: trunk/nightly/conf/georgia-tech-cellbuzz-cross.conf
===================================================================
--- trunk/nightly/conf/georgia-tech-cellbuzz-cross.conf 2009-05-01 05:23:08 UTC (rev 9707)
+++ trunk/nightly/conf/georgia-tech-cellbuzz-cross.conf 2009-05-01 06:54:43 UTC (rev 9708)
@@ -7,18 +7,18 @@
# Georgia Tech Cellbuzz cluster is tcsh. Any shell code must be suitable for
# sh, bash and tcsh. As an example, tcsh understands ">&" but not "2>&1".
-ABT_DETAILS="cellbuzz, ppc64, Fedora 6, cross"
-ABT_CONFIGURE_OPTIONS="--build=x86_64-linux-gnu --host=powerpc64-unknown-linux --target=powerpc64-unknown-linux STRIP=/opt/cell/bin/ppu-strip CC=/opt/cell/bin/ppu-gcc CPP='/opt/cell/bin/ppu-gcc -E' CXX=/opt/cell/bin/ppu-g++ RANLIB=/opt/cell/bin/ppu-ranlib CCAS=/opt/cell/bin/ppu-gcc"
+ABT_DETAILS="cellbuzz, ppc64, Fedora 9, cross"
+CROSS_PATH="/opt/cell/toolchain/bin"
+ABT_CONFIGURE_OPTIONS="--build=x86_64-linux-gnu --host=powerpc64-unknown-linux --target=powerpc64-unknown-linux STRIP=${CROSS_PATH}/ppu-strip CC=${CROSS_PATH}/ppu-gcc CPP='${CROSS_PATH}/ppu-gcc -E' CXX=${CROSS_PATH}/ppu-g++ RANLIB=${CROSS_PATH}/ppu-ranlib CCAS=${CROSS_PATH}/ppu-gcc"
ABT_RUN_REGTEST="cellbuzz_run_regtest"
ABT_JOBS=3
cellbuzz_run_regtest() {
cd valgrind || return $?
rm -f regtest-output.txt
- jobid=`echo "{ cd $PWD && perl tests/vg_regtest --all; } >& $PWD/regtest-output.txt" \
- | /usr/pbs/bin/qsub`
+ jobid=`echo "{ cd $PWD && perl tests/vg_regtest --all; } >& $PWD/regtest-output.txt" | qsub`
echo "Job ID = ${jobid}"
- while [ `/usr/pbs/bin/qstat "${jobid}" 2>/dev/null | wc --lines` -gt 0 ]
+ while [ `qstat "${jobid}" 2>/dev/null | wc --lines` -gt 0 ]
do
sleep 10
done
Modified: trunk/nightly/conf/georgia-tech-cellbuzz-cross.sendmail
===================================================================
--- trunk/nightly/conf/georgia-tech-cellbuzz-cross.sendmail 2009-05-01 05:23:08 UTC (rev 9707)
+++ trunk/nightly/conf/georgia-tech-cellbuzz-cross.sendmail 2009-05-01 06:54:43 UTC (rev 9708)
@@ -1,4 +1,15 @@
+#!/bin/sh
-# use: georgia-tech-cellbuzz.sendmail subject file-to-mail
+# use: georgia-tech-cellbuzz.sendmail subject file-to-mail [file-to-attach]
+# Don't forget to set the variables 'from' and 'realname' in ~/.muttrc !
-/bin/mailx -s "$1" val...@li... -- -R bar...@gm... -r bar...@gm... < $2
+sender="bar...@gm..."
+recipients="val...@li..."
+#recipients="bar...@gm..."
+if [ $# -ge 3 ]; then
+ gzip -9 <"$3" >"$3.gz"
+ mutt -s "$1" -a "$3.gz" ${recipients} < "$2"
+ rm -f "$3.gz"
+else
+ mutt -s "$1" ${recipients} < "$2"
+fi
|
|
From: <sv...@va...> - 2009-05-01 05:23:22
|
Author: njn
Date: 2009-05-01 06:23:08 +0100 (Fri, 01 May 2009)
New Revision: 9707
Log:
Merged r9706 (async-sigs clean-ups) from the trunk.
Removed:
branches/DARWIN/none/tests/async-sigs.stdout.exp
Modified:
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/async-sigs.c
branches/DARWIN/none/tests/async-sigs.stderr.exp
branches/DARWIN/none/tests/async-sigs.vgtest
Modified: branches/DARWIN/none/tests/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/Makefile.am 2009-05-01 05:00:34 UTC (rev 9706)
+++ branches/DARWIN/none/tests/Makefile.am 2009-05-01 05:23:08 UTC (rev 9707)
@@ -38,7 +38,7 @@
EXTRA_DIST = $(noinst_SCRIPTS) \
ansi.stderr.exp ansi.vgtest \
args.stderr.exp args.stdout.exp args.vgtest \
- async-sigs.stderr.exp async-sigs.stdout.exp async-sigs.vgtest \
+ async-sigs.stderr.exp async-sigs.vgtest \
bitfield1.stderr.exp bitfield1.vgtest \
bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
closeall.stderr.exp closeall.vgtest \
Modified: branches/DARWIN/none/tests/async-sigs.c
===================================================================
--- branches/DARWIN/none/tests/async-sigs.c 2009-05-01 05:00:34 UTC (rev 9706)
+++ branches/DARWIN/none/tests/async-sigs.c 2009-05-01 05:23:08 UTC (rev 9707)
@@ -1,3 +1,12 @@
+// This tests handling of signals sent from outside the process in the
+// following combinations: sync and async signals, caught and uncaught
+// signals, and while blocking or not blocking in a syscall. This exercises
+// various different paths in Valgrind's signal handling.
+//
+// It does this by installing signal handlers for one signal S, spawning
+// another process P, sending S from P multiple times (all caught), then
+// sending another signal from P (not caught).
+
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
@@ -7,7 +16,7 @@
#include <errno.h>
#include <time.h>
-static const struct timespec bip = { 0, 1000000000 / 5 };
+static const struct timespec bip = { 0, 1000000000 / 5 }; // 0.2 seconds.
static void handler(int sig)
{
@@ -18,103 +27,113 @@
respect to thread scheduling. */
static void do_kill(int pid, int sig)
{
- int status;
- int killer;
- int ret;
+ int status;
+ int killer;
+ int ret;
- killer = vfork();
-
- if (killer == -1) {
- perror("killer/vfork");
- exit(1);
- }
+ killer = vfork();
+ if (killer == -1) {
+ perror("killer/vfork");
+ exit(1);
+ }
- if (killer == 0) {
- char sigbuf[20];
- char pidbuf[20];
- sprintf(sigbuf, "-%d", sig);
- sprintf(pidbuf, "%d", pid);
- execl("/bin/kill", "kill", sigbuf, pidbuf, NULL);
- perror("exec failed");
- exit(1);
- }
+ // In the child, exec 'kill' in order to send the signal.
+ if (killer == 0) {
+ char sigbuf[20];
+ char pidbuf[20];
+ sprintf(sigbuf, "-%d", sig);
+ sprintf(pidbuf, "%d", pid);
+ execl("/bin/kill", "kill", sigbuf, pidbuf, NULL);
+ perror("exec failed");
+ exit(1);
+ }
- do
- ret = waitpid(killer, &status, 0);
- while(ret == -1 && errno == EINTR);
+ // In the parent, just wait for the child and then check it ran ok.
+ do
+ ret = waitpid(killer, &status, 0);
+ while (ret == -1 && errno == EINTR);
- if (ret != killer) {
- perror("kill/waitpid");
- exit(1);
- }
+ if (ret != killer) {
+ perror("kill/waitpid");
+ exit(1);
+ }
- if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
- printf("kill %d failed status=%s %d\n", killer,
- WIFEXITED(status) ? "exit" : "signal",
- WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
- exit(1);
- }
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
+ fprintf(stderr, "kill %d failed status=%s %d\n", killer,
+ WIFEXITED(status) ? "exit" : "signal",
+ WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
+ exit(1);
+ }
}
static void test(int block, int caughtsig, int fatalsig)
{
- int pid;
- int status;
- int i;
+ int pid;
+ int status;
+ int i;
- printf("testing: blocking=%d caught=%d fatal=%d... ", block, caughtsig, fatalsig);
- fflush(stdout);
+ fprintf(stderr, "testing: blocking=%d caught=%d fatal=%d... ",
+ block, caughtsig, fatalsig);
- pid = fork();
- if (pid == -1) {
- perror("fork");
- exit(1);
- }
+ pid = fork();
+ if (pid == -1) {
+ perror("fork");
+ exit(1);
+ }
- if (pid == 0) {
- alarm(10); /* if something breaks, don't spin forever */
- signal(caughtsig, handler);
+ // In the child, install the signal handler, then wait for the signal to
+ // arrive:
+ // - if 'block' is set, wait on a system call;
+ // - otherwise, wait in client code (by spinning).
+ // The alarm() calls is so that if something breaks, we don't get stuck.
+ if (pid == 0) {
+ signal(caughtsig, handler);
+ alarm(10);
- for(;;)
- if (block)
- pause();
+ for (;;)
+ if (block) {
+ pause();
+ }
+ }
- }
+ // In the parent, send the signals.
+ nanosleep(&bip, 0); // Wait for child to get going.
- nanosleep(&bip, 0); /* wait for child to get going */
+ for (i = 0; i < 5; i++) {
+ do_kill(pid, caughtsig); // Should be caught.
+ nanosleep(&bip, 0);
+ do_kill(pid, caughtsig); // Ditto.
+ do_kill(pid, caughtsig); // Ditto.
+ }
- for(i = 0; i < 5; i++) {
- do_kill(pid, caughtsig); /* should be caught */
- nanosleep(&bip, 0);
- do_kill(pid, caughtsig);
- do_kill(pid, caughtsig);
- }
+ nanosleep(&bip, 0);
- nanosleep(&bip, 0);
+ do_kill(pid, fatalsig); // Should kill it.
+
+ // Check that the child behaved as expected when it received the signals.
+ if (waitpid(pid, &status, 0) != pid) {
+ fprintf(stderr, "FAILED: waitpid failed: %s\n", strerror(errno));
- do_kill(pid, fatalsig); /* should kill it */
-
- if (waitpid(pid, &status, 0) != pid)
- printf("FAILED: waitpid failed: %s\n", strerror(errno));
- else if (!WIFSIGNALED(status) || WTERMSIG(status) != fatalsig)
- printf("FAILED: child exited with unexpected status %s %d\n",
- WIFEXITED(status) ? "exit" : "signal",
- WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
- else
- printf("PASSED\n");
+ } else if (!WIFSIGNALED(status) || WTERMSIG(status) != fatalsig) {
+ fprintf(stderr, "FAILED: child exited with unexpected status %s %d\n",
+ WIFEXITED(status) ? "exit" : "signal",
+ WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
+
+ } else {
+ fprintf(stderr, "PASSED\n");
+ }
}
int main()
{
- static const int catch[] = { SIGSEGV, SIGUSR1 };
- static const int fatal[] = { SIGBUS, SIGUSR2 };
- int block, catchidx, fatalidx;
+ test(/*non-blocked*/0, /* sync*/SIGSEGV, /* sync*/SIGBUS);
+ test(/*non-blocked*/0, /* sync*/SIGSEGV, /*async*/SIGHUP);
+ test(/*non-blocked*/0, /*async*/SIGUSR1, /* sync*/SIGBUS);
+ test(/*non-blocked*/0, /*async*/SIGUSR1, /*async*/SIGHUP);
+ test(/* blocked*/1, /* sync*/SIGSEGV, /* sync*/SIGBUS);
+ test(/* blocked*/1, /* sync*/SIGSEGV, /*async*/SIGHUP);
+ test(/* blocked*/1, /*async*/SIGUSR1, /* sync*/SIGBUS);
+ test(/* blocked*/1, /*async*/SIGUSR1, /*async*/SIGHUP);
- setvbuf(stdout, NULL, _IOLBF, 0);
-
- for(block = 0; block < 2; block++)
- for(catchidx = 0; catchidx < sizeof(catch)/sizeof(*catch); catchidx++)
- for(fatalidx = 0; fatalidx < sizeof(fatal)/sizeof(*fatal); fatalidx++)
- test(block, catch[catchidx], fatal[fatalidx]);
- return 0;
+ return 0;
}
Modified: branches/DARWIN/none/tests/async-sigs.stderr.exp
===================================================================
--- branches/DARWIN/none/tests/async-sigs.stderr.exp 2009-05-01 05:00:34 UTC (rev 9706)
+++ branches/DARWIN/none/tests/async-sigs.stderr.exp 2009-05-01 05:23:08 UTC (rev 9707)
@@ -1,10 +1,8 @@
-
-
-
-
-
-
-
-
-
-
+testing: blocking=0 caught=11 fatal=7... PASSED
+testing: blocking=0 caught=11 fatal=1... PASSED
+testing: blocking=0 caught=10 fatal=7... PASSED
+testing: blocking=0 caught=10 fatal=1... PASSED
+testing: blocking=1 caught=11 fatal=7... PASSED
+testing: blocking=1 caught=11 fatal=1... PASSED
+testing: blocking=1 caught=10 fatal=7... PASSED
+testing: blocking=1 caught=10 fatal=1... PASSED
Deleted: branches/DARWIN/none/tests/async-sigs.stdout.exp
===================================================================
--- branches/DARWIN/none/tests/async-sigs.stdout.exp 2009-05-01 05:00:34 UTC (rev 9706)
+++ branches/DARWIN/none/tests/async-sigs.stdout.exp 2009-05-01 05:23:08 UTC (rev 9707)
@@ -1,8 +0,0 @@
-testing: blocking=0 caught=11 fatal=7... PASSED
-testing: blocking=0 caught=11 fatal=12... PASSED
-testing: blocking=0 caught=10 fatal=7... PASSED
-testing: blocking=0 caught=10 fatal=12... PASSED
-testing: blocking=1 caught=11 fatal=7... PASSED
-testing: blocking=1 caught=11 fatal=12... PASSED
-testing: blocking=1 caught=10 fatal=7... PASSED
-testing: blocking=1 caught=10 fatal=12... PASSED
Modified: branches/DARWIN/none/tests/async-sigs.vgtest
===================================================================
--- branches/DARWIN/none/tests/async-sigs.vgtest 2009-05-01 05:00:34 UTC (rev 9706)
+++ branches/DARWIN/none/tests/async-sigs.vgtest 2009-05-01 05:23:08 UTC (rev 9707)
@@ -1 +1,2 @@
prog: async-sigs
+vgopts: -q
|
|
From: <sv...@va...> - 2009-05-01 05:00:43
|
Author: njn
Date: 2009-05-01 06:00:34 +0100 (Fri, 01 May 2009)
New Revision: 9706
Log:
Refactor and recomment async-sigs so it's easier to understand. Send all
its output to stderr as well.
Removed:
trunk/none/tests/async-sigs.stdout.exp
Modified:
trunk/none/tests/Makefile.am
trunk/none/tests/async-sigs.c
trunk/none/tests/async-sigs.stderr.exp
trunk/none/tests/async-sigs.vgtest
Modified: trunk/none/tests/Makefile.am
===================================================================
--- trunk/none/tests/Makefile.am 2009-05-01 00:43:49 UTC (rev 9705)
+++ trunk/none/tests/Makefile.am 2009-05-01 05:00:34 UTC (rev 9706)
@@ -38,7 +38,7 @@
EXTRA_DIST = $(noinst_SCRIPTS) \
ansi.stderr.exp ansi.vgtest \
args.stderr.exp args.stdout.exp args.vgtest \
- async-sigs.stderr.exp async-sigs.stdout.exp async-sigs.vgtest \
+ async-sigs.stderr.exp async-sigs.vgtest \
bitfield1.stderr.exp bitfield1.vgtest \
bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
closeall.stderr.exp closeall.vgtest \
Modified: trunk/none/tests/async-sigs.c
===================================================================
--- trunk/none/tests/async-sigs.c 2009-05-01 00:43:49 UTC (rev 9705)
+++ trunk/none/tests/async-sigs.c 2009-05-01 05:00:34 UTC (rev 9706)
@@ -1,3 +1,12 @@
+// This tests handling of signals sent from outside the process in the
+// following combinations: sync and async signals, caught and uncaught
+// signals, and while blocking or not blocking in a syscall. This exercises
+// various different paths in Valgrind's signal handling.
+//
+// It does this by installing signal handlers for one signal S, spawning
+// another process P, sending S from P multiple times (all caught), then
+// sending another signal from P (not caught).
+
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
@@ -7,7 +16,7 @@
#include <errno.h>
#include <time.h>
-static const struct timespec bip = { 0, 1000000000 / 5 };
+static const struct timespec bip = { 0, 1000000000 / 5 }; // 0.2 seconds.
static void handler(int sig)
{
@@ -18,103 +27,113 @@
respect to thread scheduling. */
static void do_kill(int pid, int sig)
{
- int status;
- int killer;
- int ret;
+ int status;
+ int killer;
+ int ret;
- killer = vfork();
-
- if (killer == -1) {
- perror("killer/vfork");
- exit(1);
- }
+ killer = vfork();
+ if (killer == -1) {
+ perror("killer/vfork");
+ exit(1);
+ }
- if (killer == 0) {
- char sigbuf[20];
- char pidbuf[20];
- sprintf(sigbuf, "-%d", sig);
- sprintf(pidbuf, "%d", pid);
- execl("/bin/kill", "kill", sigbuf, pidbuf, NULL);
- perror("exec failed");
- exit(1);
- }
+ // In the child, exec 'kill' in order to send the signal.
+ if (killer == 0) {
+ char sigbuf[20];
+ char pidbuf[20];
+ sprintf(sigbuf, "-%d", sig);
+ sprintf(pidbuf, "%d", pid);
+ execl("/bin/kill", "kill", sigbuf, pidbuf, NULL);
+ perror("exec failed");
+ exit(1);
+ }
- do
- ret = waitpid(killer, &status, 0);
- while(ret == -1 && errno == EINTR);
+ // In the parent, just wait for the child and then check it ran ok.
+ do
+ ret = waitpid(killer, &status, 0);
+ while (ret == -1 && errno == EINTR);
- if (ret != killer) {
- perror("kill/waitpid");
- exit(1);
- }
+ if (ret != killer) {
+ perror("kill/waitpid");
+ exit(1);
+ }
- if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
- printf("kill %d failed status=%s %d\n", killer,
- WIFEXITED(status) ? "exit" : "signal",
- WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
- exit(1);
- }
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
+ fprintf(stderr, "kill %d failed status=%s %d\n", killer,
+ WIFEXITED(status) ? "exit" : "signal",
+ WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
+ exit(1);
+ }
}
static void test(int block, int caughtsig, int fatalsig)
{
- int pid;
- int status;
- int i;
+ int pid;
+ int status;
+ int i;
- printf("testing: blocking=%d caught=%d fatal=%d... ", block, caughtsig, fatalsig);
- fflush(stdout);
+ fprintf(stderr, "testing: blocking=%d caught=%d fatal=%d... ",
+ block, caughtsig, fatalsig);
- pid = fork();
- if (pid == -1) {
- perror("fork");
- exit(1);
- }
+ pid = fork();
+ if (pid == -1) {
+ perror("fork");
+ exit(1);
+ }
- if (pid == 0) {
- alarm(10); /* if something breaks, don't spin forever */
- signal(caughtsig, handler);
+ // In the child, install the signal handler, then wait for the signal to
+ // arrive:
+ // - if 'block' is set, wait on a system call;
+ // - otherwise, wait in client code (by spinning).
+ // The alarm() calls is so that if something breaks, we don't get stuck.
+ if (pid == 0) {
+ signal(caughtsig, handler);
+ alarm(10);
- for(;;)
- if (block)
- pause();
+ for (;;)
+ if (block) {
+ pause();
+ }
+ }
- }
+ // In the parent, send the signals.
+ nanosleep(&bip, 0); // Wait for child to get going.
- nanosleep(&bip, 0); /* wait for child to get going */
+ for (i = 0; i < 5; i++) {
+ do_kill(pid, caughtsig); // Should be caught.
+ nanosleep(&bip, 0);
+ do_kill(pid, caughtsig); // Ditto.
+ do_kill(pid, caughtsig); // Ditto.
+ }
- for(i = 0; i < 5; i++) {
- do_kill(pid, caughtsig); /* should be caught */
- nanosleep(&bip, 0);
- do_kill(pid, caughtsig);
- do_kill(pid, caughtsig);
- }
+ nanosleep(&bip, 0);
- nanosleep(&bip, 0);
+ do_kill(pid, fatalsig); // Should kill it.
+
+ // Check that the child behaved as expected when it received the signals.
+ if (waitpid(pid, &status, 0) != pid) {
+ fprintf(stderr, "FAILED: waitpid failed: %s\n", strerror(errno));
- do_kill(pid, fatalsig); /* should kill it */
-
- if (waitpid(pid, &status, 0) != pid)
- printf("FAILED: waitpid failed: %s\n", strerror(errno));
- else if (!WIFSIGNALED(status) || WTERMSIG(status) != fatalsig)
- printf("FAILED: child exited with unexpected status %s %d\n",
- WIFEXITED(status) ? "exit" : "signal",
- WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
- else
- printf("PASSED\n");
+ } else if (!WIFSIGNALED(status) || WTERMSIG(status) != fatalsig) {
+ fprintf(stderr, "FAILED: child exited with unexpected status %s %d\n",
+ WIFEXITED(status) ? "exit" : "signal",
+ WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
+
+ } else {
+ fprintf(stderr, "PASSED\n");
+ }
}
int main()
{
- static const int catch[] = { SIGSEGV, SIGUSR1 };
- static const int fatal[] = { SIGBUS, SIGUSR2 };
- int block, catchidx, fatalidx;
+ test(/*non-blocked*/0, /* sync*/SIGSEGV, /* sync*/SIGBUS);
+ test(/*non-blocked*/0, /* sync*/SIGSEGV, /*async*/SIGHUP);
+ test(/*non-blocked*/0, /*async*/SIGUSR1, /* sync*/SIGBUS);
+ test(/*non-blocked*/0, /*async*/SIGUSR1, /*async*/SIGHUP);
+ test(/* blocked*/1, /* sync*/SIGSEGV, /* sync*/SIGBUS);
+ test(/* blocked*/1, /* sync*/SIGSEGV, /*async*/SIGHUP);
+ test(/* blocked*/1, /*async*/SIGUSR1, /* sync*/SIGBUS);
+ test(/* blocked*/1, /*async*/SIGUSR1, /*async*/SIGHUP);
- setvbuf(stdout, NULL, _IOLBF, 0);
-
- for(block = 0; block < 2; block++)
- for(catchidx = 0; catchidx < sizeof(catch)/sizeof(*catch); catchidx++)
- for(fatalidx = 0; fatalidx < sizeof(fatal)/sizeof(*fatal); fatalidx++)
- test(block, catch[catchidx], fatal[fatalidx]);
- return 0;
+ return 0;
}
Modified: trunk/none/tests/async-sigs.stderr.exp
===================================================================
--- trunk/none/tests/async-sigs.stderr.exp 2009-05-01 00:43:49 UTC (rev 9705)
+++ trunk/none/tests/async-sigs.stderr.exp 2009-05-01 05:00:34 UTC (rev 9706)
@@ -1,10 +1,8 @@
-
-
-
-
-
-
-
-
-
-
+testing: blocking=0 caught=11 fatal=7... PASSED
+testing: blocking=0 caught=11 fatal=1... PASSED
+testing: blocking=0 caught=10 fatal=7... PASSED
+testing: blocking=0 caught=10 fatal=1... PASSED
+testing: blocking=1 caught=11 fatal=7... PASSED
+testing: blocking=1 caught=11 fatal=1... PASSED
+testing: blocking=1 caught=10 fatal=7... PASSED
+testing: blocking=1 caught=10 fatal=1... PASSED
Deleted: trunk/none/tests/async-sigs.stdout.exp
===================================================================
--- trunk/none/tests/async-sigs.stdout.exp 2009-05-01 00:43:49 UTC (rev 9705)
+++ trunk/none/tests/async-sigs.stdout.exp 2009-05-01 05:00:34 UTC (rev 9706)
@@ -1,8 +0,0 @@
-testing: blocking=0 caught=11 fatal=7... PASSED
-testing: blocking=0 caught=11 fatal=12... PASSED
-testing: blocking=0 caught=10 fatal=7... PASSED
-testing: blocking=0 caught=10 fatal=12... PASSED
-testing: blocking=1 caught=11 fatal=7... PASSED
-testing: blocking=1 caught=11 fatal=12... PASSED
-testing: blocking=1 caught=10 fatal=7... PASSED
-testing: blocking=1 caught=10 fatal=12... PASSED
Modified: trunk/none/tests/async-sigs.vgtest
===================================================================
--- trunk/none/tests/async-sigs.vgtest 2009-05-01 00:43:49 UTC (rev 9705)
+++ trunk/none/tests/async-sigs.vgtest 2009-05-01 05:00:34 UTC (rev 9706)
@@ -1 +1,2 @@
prog: async-sigs
+vgopts: -q
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-01 03:51:08
|
On Thu, Apr 30, 2009 at 7:18 PM, Filipe Cabecinhas <fi...@gm...> wrote:
> Hi,
>
> I'm having a little problem running the heap test, and can't figure out
> what's wrong:
>
> [filcab@farnsworth ~/dev/stuff/valgrind-darwin64] $ ./perf/vg_perf
> perf/heap.vgperf
> heap valgrind-darwin64:0.36s no:
> *** Command returned non-zero (32256)
> *** See perf.{cmd,stdout,stderr} to determine what went wrong.
> [filcab@farnsworth ~/dev/stuff/valgrind-darwin64] $ cat perf/perf.std*
> valgrind: ./heap: cannot execute binary file
> real 0.01
> user 0.00
> sys 0.00
> [filcab@farnsworth ~/dev/stuff/valgrind-darwin64] $ cd perf
> /Users/filcab/dev/stuff/valgrind-darwin64/perf
> [filcab@farnsworth ~/dev/stuff/valgrind-darwin64/perf] $ bash perf.cmd
> valgrind: ./heap: cannot execute binary file
> real 0.00
> user 0.00
> sys 0.00
> [filcab@farnsworth ~/dev/stuff/valgrind-darwin64/perf] $ cd ..
> [filcab@farnsworth ~/dev/stuff/valgrind-darwin64] $ sed -e
> 's!\./heap!./perf/heap!g' perf/perf.cmd |bashinitialisingrunningdonereal
> 7.09
> user 2.76
> sys 4.17
>
>
>
> The weird thing is... if I'm not in the perf directory, valgrind can run
> the test... If I'm in the perf directory, it can't execute the file...
That is weird. Could it be a path issue? There is an executable
/usr/bin/heap on my machine...
Nick
|
|
From: Tom H. <th...@cy...> - 2009-05-01 02:46:08
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-05-01 03:05:04 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 == 478 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-05-01 02:28:17
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-05-01 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 == 484 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) |
|
From: <sv...@va...> - 2009-05-01 00:44:07
|
Author: njn
Date: 2009-05-01 01:43:49 +0100 (Fri, 01 May 2009)
New Revision: 9705
Log:
Merge r9704 (leak check clarifications) from the trunk.
Modified:
branches/DARWIN/coregrind/m_execontext.c
branches/DARWIN/memcheck/mc_errors.c
branches/DARWIN/memcheck/mc_include.h
branches/DARWIN/memcheck/mc_leakcheck.c
branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp
branches/DARWIN/memcheck/tests/leak-cycle.stderr.exp
Modified: branches/DARWIN/coregrind/m_execontext.c
===================================================================
--- branches/DARWIN/coregrind/m_execontext.c 2009-05-01 00:30:43 UTC (rev 9704)
+++ branches/DARWIN/coregrind/m_execontext.c 2009-05-01 00:43:49 UTC (rev 9705)
@@ -173,7 +173,7 @@
}
-/* Compare two ExeContexts, comparing all callers. */
+/* Compare two ExeContexts. Number of callers considered depends on res. */
Bool VG_(eq_ExeContext) ( VgRes res, ExeContext* e1, ExeContext* e2 )
{
Int i;
Modified: branches/DARWIN/memcheck/mc_errors.c
===================================================================
--- branches/DARWIN/memcheck/mc_errors.c 2009-05-01 00:30:43 UTC (rev 9704)
+++ branches/DARWIN/memcheck/mc_errors.c 2009-05-01 00:43:49 UTC (rev 9705)
@@ -242,7 +242,7 @@
struct {
UInt n_this_record;
UInt n_total_records;
- LossRecord* lossRecord;
+ LossRecord* lr;
} Leak;
// A memory pool error.
@@ -568,49 +568,49 @@
HChar* xpost = VG_(clo_xml) ? "</what>" : "";
UInt n_this_record = extra->Err.Leak.n_this_record;
UInt n_total_records = extra->Err.Leak.n_total_records;
- LossRecord* l = extra->Err.Leak.lossRecord;
+ LossRecord* lr = extra->Err.Leak.lr;
if (VG_(clo_xml)) {
VG_(message_no_f_c)(Vg_UserMsg, " <kind>%t</kind>",
- xml_leak_kind(l->loss_mode));
+ xml_leak_kind(lr->state));
} else {
VG_(message)(Vg_UserMsg, "");
}
- if (l->indirect_szB) {
+ if (lr->indirect_szB > 0) {
VG_(message)(Vg_UserMsg,
"%s%'lu (%'lu direct, %'lu indirect) bytes in %'u blocks"
" are %s in loss record %'u of %'u%s",
xpre,
- l->total_bytes + l->indirect_szB,
- l->total_bytes, l->indirect_szB, l->num_blocks,
- str_leak_lossmode(l->loss_mode), n_this_record, n_total_records,
+ lr->szB + lr->indirect_szB, lr->szB, lr->indirect_szB,
+ lr->num_blocks,
+ str_leak_lossmode(lr->state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
// Nb: don't put commas in these XML numbers
VG_(message)(Vg_UserMsg, " <leakedbytes>%lu</leakedbytes>",
- l->total_bytes + l->indirect_szB);
+ lr->szB + lr->indirect_szB);
VG_(message)(Vg_UserMsg, " <leakedblocks>%u</leakedblocks>",
- l->num_blocks);
+ lr->num_blocks);
}
} else {
VG_(message)(
Vg_UserMsg,
"%s%'lu bytes in %'u blocks are %s in loss record %'u of %'u%s",
xpre,
- l->total_bytes, l->num_blocks,
- str_leak_lossmode(l->loss_mode), n_this_record, n_total_records,
+ lr->szB, lr->num_blocks,
+ str_leak_lossmode(lr->state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
VG_(message)(Vg_UserMsg, " <leakedbytes>%ld</leakedbytes>",
- l->total_bytes);
+ lr->szB);
VG_(message)(Vg_UserMsg, " <leakedblocks>%d</leakedblocks>",
- l->num_blocks);
+ lr->num_blocks);
}
}
- VG_(pp_ExeContext)(l->allocated_at);
+ VG_(pp_ExeContext)(lr->allocated_at);
break;
}
@@ -807,16 +807,16 @@
}
Bool MC_(record_leak_error) ( ThreadId tid, UInt n_this_record,
- UInt n_total_records, LossRecord* lossRecord,
+ UInt n_total_records, LossRecord* lr,
Bool print_record )
{
MC_Error extra;
extra.Err.Leak.n_this_record = n_this_record;
extra.Err.Leak.n_total_records = n_total_records;
- extra.Err.Leak.lossRecord = lossRecord;
+ extra.Err.Leak.lr = lr;
return
VG_(unique_error) ( tid, Err_Leak, /*Addr*/0, /*s*/NULL, &extra,
- lossRecord->allocated_at, print_record,
+ lr->allocated_at, print_record,
/*allow_GDB_attach*/False, /*count_error*/False );
}
Modified: branches/DARWIN/memcheck/mc_include.h
===================================================================
--- branches/DARWIN/memcheck/mc_include.h 2009-05-01 00:30:43 UTC (rev 9704)
+++ branches/DARWIN/memcheck/mc_include.h 2009-05-01 00:43:49 UTC (rev 9705)
@@ -262,18 +262,17 @@
}
LeakCheckMode;
-/* A block record, used for generating err msgs. */
+/* A loss record, used for generating err msgs. Multiple leaked blocks can be
+ * merged into a single loss record if they have the same state and similar
+ * enough allocation points (controlled by --leak-resolution). */
typedef
struct _LossRecord {
struct _LossRecord* next;
- /* Where these lost blocks were allocated. */
- ExeContext* allocated_at;
- /* Their reachability. */
- Reachedness loss_mode;
- /* Number of blocks and total # bytes involved. */
- SizeT total_bytes;
- SizeT indirect_szB;
- UInt num_blocks;
+ ExeContext* allocated_at; // Where they were allocated.
+ Reachedness state; // LC_Extra.state value shared by all blocks.
+ SizeT szB; // Sum of all MC_Chunk.szB values.
+ SizeT indirect_szB; // Sum of all LC_Extra.indirect_szB values.
+ UInt num_blocks; // Number of blocks represented by the record.
}
LossRecord;
Modified: branches/DARWIN/memcheck/mc_leakcheck.c
===================================================================
--- branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-01 00:30:43 UTC (rev 9704)
+++ branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-01 00:43:49 UTC (rev 9705)
@@ -754,39 +754,44 @@
static void print_results(ThreadId tid, Bool is_full_check)
{
Int i, n_lossrecords;
- LossRecord* errlist;
- LossRecord* p;
+ LossRecord* lr_list;
+ LossRecord* lr;
Bool is_suppressed;
// Common up the lost blocks so we can print sensible error messages.
n_lossrecords = 0;
- errlist = NULL;
+ lr_list = NULL;
for (i = 0; i < lc_n_chunks; i++) {
MC_Chunk* ch = lc_chunks[i];
LC_Extra* ex = &(lc_extras)[i];
- for (p = errlist; p != NULL; p = p->next) {
- if (p->loss_mode == ex->state
+ // Determine if this chunk is sufficiently similar to any of our
+ // previously-created loss records to merge.
+ // XXX: This is quadratic! (see bug #191182)
+ for (lr = lr_list; lr != NULL; lr = lr->next) {
+ if (lr->state == ex->state
&& VG_(eq_ExeContext) ( MC_(clo_leak_resolution),
- p->allocated_at,
+ lr->allocated_at,
ch->where) ) {
break;
}
}
- if (p != NULL) {
- p->num_blocks++;
- p->total_bytes += ch->szB;
- p->indirect_szB += ex->indirect_szB;
+ if (lr != NULL) {
+ // Similar to a previous loss record; merge.
+ lr->num_blocks++;
+ lr->szB += ch->szB;
+ lr->indirect_szB += ex->indirect_szB;
} else {
+ // Create a new loss record.
n_lossrecords++;
- p = VG_(malloc)( "mc.fr.1", sizeof(LossRecord));
- p->loss_mode = ex->state;
- p->allocated_at = ch->where;
- p->total_bytes = ch->szB;
- p->indirect_szB = ex->indirect_szB;
- p->num_blocks = 1;
- p->next = errlist;
- errlist = p;
+ lr = VG_(malloc)( "mc.fr.1", sizeof(LossRecord));
+ lr->state = ex->state;
+ lr->allocated_at = ch->where;
+ lr->szB = ch->szB;
+ lr->indirect_szB = ex->indirect_szB;
+ lr->num_blocks = 1;
+ lr->next = lr_list;
+ lr_list = lr;
}
}
@@ -796,18 +801,26 @@
MC_(blocks_reachable) = MC_(bytes_reachable) = 0;
MC_(blocks_suppressed) = MC_(bytes_suppressed) = 0;
- // Print out the commoned-up blocks and collect summary stats.
+ // Print out the loss records and collect summary stats.
for (i = 0; i < n_lossrecords; i++) {
Bool print_record;
- LossRecord* p_min = NULL;
- SizeT n_min = ~(0x0L);
- for (p = errlist; p != NULL; p = p->next) {
- if (p->num_blocks > 0 && p->total_bytes < n_min) {
- n_min = p->total_bytes + p->indirect_szB;
- p_min = p;
+ LossRecord* lr_min = NULL;
+ SizeT total_szB_min = ~(0x0L);
+ // Find the loss record covering the smallest number of directly-lost
+ // bytes. Note that we set lr_min->num_blocks to zero after printing it;
+ // that combined with the "lr->num_blocks > 0" test ensures that each
+ // loss record is only printed once.
+ // XXX: This is quadratic! (see bug #191182)
+ // XXX: why do we show the smallest loss records first -- biggest first
+ // would make more sense?
+ for (lr = lr_list; lr != NULL; lr = lr->next) {
+ SizeT total_szB = lr->szB + lr->indirect_szB;
+ if (lr->num_blocks > 0 && total_szB < total_szB_min) {
+ total_szB_min = total_szB;
+ lr_min = lr;
}
}
- tl_assert(p_min != NULL);
+ tl_assert(lr_min != NULL);
// Rules for printing:
// - We don't show suppressed loss records ever (and that's controlled
@@ -823,36 +836,36 @@
//
print_record = is_full_check &&
( MC_(clo_show_reachable) ||
- Unreached == p_min->loss_mode ||
- Possible == p_min->loss_mode );
+ Unreached == lr_min->state ||
+ Possible == lr_min->state );
is_suppressed =
- MC_(record_leak_error) ( tid, i+1, n_lossrecords, p_min,
+ MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr_min,
print_record );
if (is_suppressed) {
- MC_(blocks_suppressed) += p_min->num_blocks;
- MC_(bytes_suppressed) += p_min->total_bytes;
+ MC_(blocks_suppressed) += lr_min->num_blocks;
+ MC_(bytes_suppressed) += lr_min->szB;
- } else if (Unreached == p_min->loss_mode) {
- MC_(blocks_leaked) += p_min->num_blocks;
- MC_(bytes_leaked) += p_min->total_bytes;
+ } else if (Unreached == lr_min->state) {
+ MC_(blocks_leaked) += lr_min->num_blocks;
+ MC_(bytes_leaked) += lr_min->szB;
- } else if (IndirectLeak == p_min->loss_mode) {
- MC_(blocks_indirect) += p_min->num_blocks;
- MC_(bytes_indirect) += p_min->total_bytes;
+ } else if (IndirectLeak == lr_min->state) {
+ MC_(blocks_indirect) += lr_min->num_blocks;
+ MC_(bytes_indirect) += lr_min->szB;
- } else if (Possible == p_min->loss_mode) {
- MC_(blocks_dubious) += p_min->num_blocks;
- MC_(bytes_dubious) += p_min->total_bytes;
+ } else if (Possible == lr_min->state) {
+ MC_(blocks_dubious) += lr_min->num_blocks;
+ MC_(bytes_dubious) += lr_min->szB;
- } else if (Reachable == p_min->loss_mode) {
- MC_(blocks_reachable) += p_min->num_blocks;
- MC_(bytes_reachable) += p_min->total_bytes;
+ } else if (Reachable == lr_min->state) {
+ MC_(blocks_reachable) += lr_min->num_blocks;
+ MC_(bytes_reachable) += lr_min->szB;
} else {
VG_(tool_panic)("unknown loss mode");
}
- p_min->num_blocks = 0;
+ lr_min->num_blocks = 0;
}
if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
Modified: branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp 2009-05-01 00:30:43 UTC (rev 9704)
+++ branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp 2009-05-01 00:43:49 UTC (rev 9705)
@@ -55,12 +55,12 @@
32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:76)
+ by 0x........: f (leak-cases.c:91)
by 0x........: main (leak-cases.c:107)
32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:91)
+ by 0x........: f (leak-cases.c:76)
by 0x........: main (leak-cases.c:107)
Modified: branches/DARWIN/memcheck/tests/leak-cycle.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/leak-cycle.stderr.exp 2009-05-01 00:30:43 UTC (rev 9704)
+++ branches/DARWIN/memcheck/tests/leak-cycle.stderr.exp 2009-05-01 00:43:49 UTC (rev 9705)
@@ -7,25 +7,25 @@
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:44)
+ by 0x........: main (leak-cycle.c:45)
48 (16 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:45)
+ by 0x........: main (leak-cycle.c:44)
96 (16 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:51)
+ by 0x........: main (leak-cycle.c:63)
96 (16 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:63)
+ by 0x........: main (leak-cycle.c:51)
|
|
From: <sv...@va...> - 2009-05-01 00:30:49
|
Author: njn
Date: 2009-05-01 01:30:43 +0100 (Fri, 01 May 2009)
New Revision: 9704
Log:
Renamed various things for clarity. Added some comments. And fixed the
dubious find-minimum-loss-record loop in print_results(), which was using an
inconsistent mixture of szB and szB+indirect_szB.
Two test results changed, just different sort orders for same-sized loss
records.
Modified:
trunk/coregrind/m_execontext.c
trunk/memcheck/mc_errors.c
trunk/memcheck/mc_include.h
trunk/memcheck/mc_leakcheck.c
trunk/memcheck/tests/leak-cases-full.stderr.exp
trunk/memcheck/tests/leak-cycle.stderr.exp
Modified: trunk/coregrind/m_execontext.c
===================================================================
--- trunk/coregrind/m_execontext.c 2009-04-30 07:52:52 UTC (rev 9703)
+++ trunk/coregrind/m_execontext.c 2009-05-01 00:30:43 UTC (rev 9704)
@@ -173,7 +173,7 @@
}
-/* Compare two ExeContexts, comparing all callers. */
+/* Compare two ExeContexts. Number of callers considered depends on res. */
Bool VG_(eq_ExeContext) ( VgRes res, ExeContext* e1, ExeContext* e2 )
{
Int i;
Modified: trunk/memcheck/mc_errors.c
===================================================================
--- trunk/memcheck/mc_errors.c 2009-04-30 07:52:52 UTC (rev 9703)
+++ trunk/memcheck/mc_errors.c 2009-05-01 00:30:43 UTC (rev 9704)
@@ -242,7 +242,7 @@
struct {
UInt n_this_record;
UInt n_total_records;
- LossRecord* lossRecord;
+ LossRecord* lr;
} Leak;
// A memory pool error.
@@ -565,49 +565,49 @@
HChar* xpost = VG_(clo_xml) ? "</what>" : "";
UInt n_this_record = extra->Err.Leak.n_this_record;
UInt n_total_records = extra->Err.Leak.n_total_records;
- LossRecord* l = extra->Err.Leak.lossRecord;
+ LossRecord* lr = extra->Err.Leak.lr;
if (VG_(clo_xml)) {
VG_(message_no_f_c)(Vg_UserMsg, " <kind>%t</kind>",
- xml_leak_kind(l->loss_mode));
+ xml_leak_kind(lr->state));
} else {
VG_(message)(Vg_UserMsg, "");
}
- if (l->indirect_szB) {
+ if (lr->indirect_szB > 0) {
VG_(message)(Vg_UserMsg,
"%s%'lu (%'lu direct, %'lu indirect) bytes in %'u blocks"
" are %s in loss record %'u of %'u%s",
xpre,
- l->total_bytes + l->indirect_szB,
- l->total_bytes, l->indirect_szB, l->num_blocks,
- str_leak_lossmode(l->loss_mode), n_this_record, n_total_records,
+ lr->szB + lr->indirect_szB, lr->szB, lr->indirect_szB,
+ lr->num_blocks,
+ str_leak_lossmode(lr->state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
// Nb: don't put commas in these XML numbers
VG_(message)(Vg_UserMsg, " <leakedbytes>%lu</leakedbytes>",
- l->total_bytes + l->indirect_szB);
+ lr->szB + lr->indirect_szB);
VG_(message)(Vg_UserMsg, " <leakedblocks>%u</leakedblocks>",
- l->num_blocks);
+ lr->num_blocks);
}
} else {
VG_(message)(
Vg_UserMsg,
"%s%'lu bytes in %'u blocks are %s in loss record %'u of %'u%s",
xpre,
- l->total_bytes, l->num_blocks,
- str_leak_lossmode(l->loss_mode), n_this_record, n_total_records,
+ lr->szB, lr->num_blocks,
+ str_leak_lossmode(lr->state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
VG_(message)(Vg_UserMsg, " <leakedbytes>%ld</leakedbytes>",
- l->total_bytes);
+ lr->szB);
VG_(message)(Vg_UserMsg, " <leakedblocks>%d</leakedblocks>",
- l->num_blocks);
+ lr->num_blocks);
}
}
- VG_(pp_ExeContext)(l->allocated_at);
+ VG_(pp_ExeContext)(lr->allocated_at);
break;
}
@@ -802,16 +802,16 @@
}
Bool MC_(record_leak_error) ( ThreadId tid, UInt n_this_record,
- UInt n_total_records, LossRecord* lossRecord,
+ UInt n_total_records, LossRecord* lr,
Bool print_record )
{
MC_Error extra;
extra.Err.Leak.n_this_record = n_this_record;
extra.Err.Leak.n_total_records = n_total_records;
- extra.Err.Leak.lossRecord = lossRecord;
+ extra.Err.Leak.lr = lr;
return
VG_(unique_error) ( tid, Err_Leak, /*Addr*/0, /*s*/NULL, &extra,
- lossRecord->allocated_at, print_record,
+ lr->allocated_at, print_record,
/*allow_GDB_attach*/False, /*count_error*/False );
}
Modified: trunk/memcheck/mc_include.h
===================================================================
--- trunk/memcheck/mc_include.h 2009-04-30 07:52:52 UTC (rev 9703)
+++ trunk/memcheck/mc_include.h 2009-05-01 00:30:43 UTC (rev 9704)
@@ -262,18 +262,17 @@
}
LeakCheckMode;
-/* A block record, used for generating err msgs. */
+/* A loss record, used for generating err msgs. Multiple leaked blocks can be
+ * merged into a single loss record if they have the same state and similar
+ * enough allocation points (controlled by --leak-resolution). */
typedef
struct _LossRecord {
struct _LossRecord* next;
- /* Where these lost blocks were allocated. */
- ExeContext* allocated_at;
- /* Their reachability. */
- Reachedness loss_mode;
- /* Number of blocks and total # bytes involved. */
- SizeT total_bytes;
- SizeT indirect_szB;
- UInt num_blocks;
+ ExeContext* allocated_at; // Where they were allocated.
+ Reachedness state; // LC_Extra.state value shared by all blocks.
+ SizeT szB; // Sum of all MC_Chunk.szB values.
+ SizeT indirect_szB; // Sum of all LC_Extra.indirect_szB values.
+ UInt num_blocks; // Number of blocks represented by the record.
}
LossRecord;
Modified: trunk/memcheck/mc_leakcheck.c
===================================================================
--- trunk/memcheck/mc_leakcheck.c 2009-04-30 07:52:52 UTC (rev 9703)
+++ trunk/memcheck/mc_leakcheck.c 2009-05-01 00:30:43 UTC (rev 9704)
@@ -753,39 +753,44 @@
static void print_results(ThreadId tid, Bool is_full_check)
{
Int i, n_lossrecords;
- LossRecord* errlist;
- LossRecord* p;
+ LossRecord* lr_list;
+ LossRecord* lr;
Bool is_suppressed;
// Common up the lost blocks so we can print sensible error messages.
n_lossrecords = 0;
- errlist = NULL;
+ lr_list = NULL;
for (i = 0; i < lc_n_chunks; i++) {
MC_Chunk* ch = lc_chunks[i];
LC_Extra* ex = &(lc_extras)[i];
- for (p = errlist; p != NULL; p = p->next) {
- if (p->loss_mode == ex->state
+ // Determine if this chunk is sufficiently similar to any of our
+ // previously-created loss records to merge.
+ // XXX: This is quadratic! (see bug #191182)
+ for (lr = lr_list; lr != NULL; lr = lr->next) {
+ if (lr->state == ex->state
&& VG_(eq_ExeContext) ( MC_(clo_leak_resolution),
- p->allocated_at,
+ lr->allocated_at,
ch->where) ) {
break;
}
}
- if (p != NULL) {
- p->num_blocks++;
- p->total_bytes += ch->szB;
- p->indirect_szB += ex->indirect_szB;
+ if (lr != NULL) {
+ // Similar to a previous loss record; merge.
+ lr->num_blocks++;
+ lr->szB += ch->szB;
+ lr->indirect_szB += ex->indirect_szB;
} else {
+ // Create a new loss record.
n_lossrecords++;
- p = VG_(malloc)( "mc.fr.1", sizeof(LossRecord));
- p->loss_mode = ex->state;
- p->allocated_at = ch->where;
- p->total_bytes = ch->szB;
- p->indirect_szB = ex->indirect_szB;
- p->num_blocks = 1;
- p->next = errlist;
- errlist = p;
+ lr = VG_(malloc)( "mc.fr.1", sizeof(LossRecord));
+ lr->state = ex->state;
+ lr->allocated_at = ch->where;
+ lr->szB = ch->szB;
+ lr->indirect_szB = ex->indirect_szB;
+ lr->num_blocks = 1;
+ lr->next = lr_list;
+ lr_list = lr;
}
}
@@ -795,18 +800,26 @@
MC_(blocks_reachable) = MC_(bytes_reachable) = 0;
MC_(blocks_suppressed) = MC_(bytes_suppressed) = 0;
- // Print out the commoned-up blocks and collect summary stats.
+ // Print out the loss records and collect summary stats.
for (i = 0; i < n_lossrecords; i++) {
Bool print_record;
- LossRecord* p_min = NULL;
- SizeT n_min = ~(0x0L);
- for (p = errlist; p != NULL; p = p->next) {
- if (p->num_blocks > 0 && p->total_bytes < n_min) {
- n_min = p->total_bytes + p->indirect_szB;
- p_min = p;
+ LossRecord* lr_min = NULL;
+ SizeT total_szB_min = ~(0x0L);
+ // Find the loss record covering the smallest number of directly-lost
+ // bytes. Note that we set lr_min->num_blocks to zero after printing it;
+ // that combined with the "lr->num_blocks > 0" test ensures that each
+ // loss record is only printed once.
+ // XXX: This is quadratic! (see bug #191182)
+ // XXX: why do we show the smallest loss records first -- biggest first
+ // would make more sense?
+ for (lr = lr_list; lr != NULL; lr = lr->next) {
+ SizeT total_szB = lr->szB + lr->indirect_szB;
+ if (lr->num_blocks > 0 && total_szB < total_szB_min) {
+ total_szB_min = total_szB;
+ lr_min = lr;
}
}
- tl_assert(p_min != NULL);
+ tl_assert(lr_min != NULL);
// Rules for printing:
// - We don't show suppressed loss records ever (and that's controlled
@@ -822,36 +835,36 @@
//
print_record = is_full_check &&
( MC_(clo_show_reachable) ||
- Unreached == p_min->loss_mode ||
- Possible == p_min->loss_mode );
+ Unreached == lr_min->state ||
+ Possible == lr_min->state );
is_suppressed =
- MC_(record_leak_error) ( tid, i+1, n_lossrecords, p_min,
+ MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr_min,
print_record );
if (is_suppressed) {
- MC_(blocks_suppressed) += p_min->num_blocks;
- MC_(bytes_suppressed) += p_min->total_bytes;
+ MC_(blocks_suppressed) += lr_min->num_blocks;
+ MC_(bytes_suppressed) += lr_min->szB;
- } else if (Unreached == p_min->loss_mode) {
- MC_(blocks_leaked) += p_min->num_blocks;
- MC_(bytes_leaked) += p_min->total_bytes;
+ } else if (Unreached == lr_min->state) {
+ MC_(blocks_leaked) += lr_min->num_blocks;
+ MC_(bytes_leaked) += lr_min->szB;
- } else if (IndirectLeak == p_min->loss_mode) {
- MC_(blocks_indirect) += p_min->num_blocks;
- MC_(bytes_indirect) += p_min->total_bytes;
+ } else if (IndirectLeak == lr_min->state) {
+ MC_(blocks_indirect) += lr_min->num_blocks;
+ MC_(bytes_indirect) += lr_min->szB;
- } else if (Possible == p_min->loss_mode) {
- MC_(blocks_dubious) += p_min->num_blocks;
- MC_(bytes_dubious) += p_min->total_bytes;
+ } else if (Possible == lr_min->state) {
+ MC_(blocks_dubious) += lr_min->num_blocks;
+ MC_(bytes_dubious) += lr_min->szB;
- } else if (Reachable == p_min->loss_mode) {
- MC_(blocks_reachable) += p_min->num_blocks;
- MC_(bytes_reachable) += p_min->total_bytes;
+ } else if (Reachable == lr_min->state) {
+ MC_(blocks_reachable) += lr_min->num_blocks;
+ MC_(bytes_reachable) += lr_min->szB;
} else {
VG_(tool_panic)("unknown loss mode");
}
- p_min->num_blocks = 0;
+ lr_min->num_blocks = 0;
}
if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
Modified: trunk/memcheck/tests/leak-cases-full.stderr.exp
===================================================================
--- trunk/memcheck/tests/leak-cases-full.stderr.exp 2009-04-30 07:52:52 UTC (rev 9703)
+++ trunk/memcheck/tests/leak-cases-full.stderr.exp 2009-05-01 00:30:43 UTC (rev 9704)
@@ -55,12 +55,12 @@
32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:76)
+ by 0x........: f (leak-cases.c:91)
by 0x........: main (leak-cases.c:107)
32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:91)
+ by 0x........: f (leak-cases.c:76)
by 0x........: main (leak-cases.c:107)
Modified: trunk/memcheck/tests/leak-cycle.stderr.exp
===================================================================
--- trunk/memcheck/tests/leak-cycle.stderr.exp 2009-04-30 07:52:52 UTC (rev 9703)
+++ trunk/memcheck/tests/leak-cycle.stderr.exp 2009-05-01 00:30:43 UTC (rev 9704)
@@ -7,25 +7,25 @@
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:44)
+ by 0x........: main (leak-cycle.c:45)
48 (16 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:45)
+ by 0x........: main (leak-cycle.c:44)
96 (16 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:51)
+ by 0x........: main (leak-cycle.c:63)
96 (16 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cycle.c:15)
by 0x........: mkcycle (leak-cycle.c:26)
- by 0x........: main (leak-cycle.c:63)
+ by 0x........: main (leak-cycle.c:51)
|