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: Philippe W. <phi...@sk...> - 2009-05-06 20:38:52
|
The default value for leak-resolution is set to low. The default value for the nr of callers in a stack trace is 12 (so significantly higher than the 2 entries corresponding to the medium leak resolution). When a leak is reported, it is reported with a full stack trace (e.g. 12 callers) but this report "merges" the leaks created by various other stack traces only having the first 2 callers in common. At work, this has created confusion (and some doubts about the tool behaviour/quality) e.g. because "this stack trace is only called once and allocates only one block, how can it leak that much blocks ?" or "I fixed the only leak(s) reported, and now I have other leaks being reported in other stack traces." It looks to me that leak-resolution=high will be a better default as it will not confuse users. If a user really needs to combine various stack traces in one stack trace, then resolution low or medium can then be given. NB: due to this confusion, at work, we switched to leak-resolution=high, triggering a quadratic behaviour in the leak report code. This bug #191182 has been fixed in 3.5.0 SVN. To my knowledge, other leak search tools (purify, wdb) always report full stack traces for leaks (or at least according to the num-callers equivalent). => I believe default value high resolution is better. NB: I believe the valgrind user manual description of leak-resolution wrongly says the default value for the nr of callers is 4 (I think it is 12). |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-06 17:25:55
|
Nightly build on ocean32 ( Ubuntu 9.04, Intel x86-64 (32-bit only) ) started at 2009-05-07 03:00:01 EST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 448 tests, 7 stderr failures, 2 stdout failures, 0 post failures ==
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/origin1-yes (stderr)
memcheck/tests/origin5-bz2 (stderr)
none/tests/linux/mremap2 (stdout)
none/tests/shell (stdout)
none/tests/shell (stderr)
none/tests/shell_valid1 (stderr)
none/tests/shell_valid2 (stderr)
none/tests/shell_valid3 (stderr)
=================================================
./valgrind/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2009-05-07 03:14:50.000000000 +1000
+++ stack_switch.stderr.out 2009-05-07 03:23:37.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-07 03:14:59.000000000 +1000
+++ origin1-yes.stderr.out 2009-05-07 03:23:55.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-07 03:14:59.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-07 03:23:59.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-07 03:14:59.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-07 03:23:59.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-07 03:14:59.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-07 03:23:59.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-07 03:15:56.000000000 +1000
+++ mremap2.stdout.out 2009-05-07 03:25:07.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-07 03:15:56.000000000 +1000
+++ mremap2.stdout.out 2009-05-07 03:25:07.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-07 03:15:56.000000000 +1000
+++ mremap2.stdout.out 2009-05-07 03:25:07.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-07 03:16:03.000000000 +1000
+++ shell.stderr.out 2009-05-07 03:25:22.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-07 03:16:03.000000000 +1000
+++ shell.stderr.out 2009-05-07 03:25:22.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-07 03:16:03.000000000 +1000
+++ shell.stdout.out 2009-05-07 03:25:22.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-07 03:16:03.000000000 +1000
+++ shell_valid1.stderr.out 2009-05-07 03:25:22.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-07 03:16:03.000000000 +1000
+++ shell_valid2.stderr.out 2009-05-07 03:25:22.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-07 03:16:03.000000000 +1000
+++ shell_valid3.stderr.out 2009-05-07 03:25:22.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-06 16:26:32
|
Nightly build on ocean ( Ubuntu 9.04, Intel x86-64 ) started at 2009-05-07 02:00:01 EST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 485 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) ================================================= ./valgrind/none/tests/linux/mremap2.stdout.diff ================================================= --- mremap2.stdout.exp 2009-05-07 02:13:59.000000000 +1000 +++ mremap2.stdout.out 2009-05-07 02:25:46.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-07 02:13:59.000000000 +1000 +++ mremap2.stdout.out 2009-05-07 02:25:46.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-07 02:13:59.000000000 +1000 +++ mremap2.stdout.out 2009-05-07 02:25:46.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: Jay F. <jay...@gm...> - 2009-05-06 11:36:14
|
> > These ones are always tricky, where the language spec doesn't match > > what happens in practice. This case is particularly annoying because > > we can't distinguish between a user-inserted memcpy() and a > > GCC-generated one. It's arguably that GCC shouldn't generate such > > code -- you say you assume glibc will not explode in this case, but > > that is an assumption. > > I think you should file this as a gcc bug. Looks like it has already been filed and fixed here: http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00932.html Cheers, Jay. |
|
From: Jay F. <jay...@gm...> - 2009-05-06 11:33:43
|
Hi, On my application, valgrind complained: ==27037== Warning: noted but unhandled ioctl 0x500e with no size/direction hints ==27037== This could cause spurious value errors to appear. ==27037== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper. 0x500e is SNDCTL_DSP_NONBLOCK, which doesn't read or write anything, so does the attached patch look OK? Thanks, Jay. |
|
From: Konstantin S. <kon...@gm...> - 2009-05-06 08:32:12
|
On Wed, May 6, 2009 at 12:23 PM, Konstantin Serebryany <kon...@gm...> wrote: > On Wed, May 6, 2009 at 12:24 PM, Julian Seward <js...@ac...> wrote: >> On Tuesday 05 May 2009, Nicholas Nethercote wrote: >>> On Tue, May 5, 2009 at 5:03 AM, Konstantin Serebryany >>> >>> <kon...@gm...> wrote: >>> > When copying structures of size 5, g++ (4.3.1) generates memcpy(dst, src, >>> > 5). It may happen that src==dst (see example below). >>> > src==dst is not allowed by the standard, but this code is not written >>> > by humans and the compiler knows it is correct >>> > (I asume that glibc will not explode with src==dst) >>> > >>> > Memcheck reports a warning. >>> > >>> > Even if this is a bug in gcc (is it?) we still need to workaround it >>> > in memcheck. >>> > Comments? >>> >>> These ones are always tricky, where the language spec doesn't match >>> what happens in practice. This case is particularly annoying because >>> we can't distinguish between a user-inserted memcpy() and a >>> GCC-generated one. It's arguably that GCC shouldn't generate such >>> code -- you say you assume glibc will not explode in this case, but >>> that is an assumption. >> >> I think you should file this as a gcc bug. > Yea, probably. > But we still need a workaround in Memcheck. > The existing versions of gcc will be there for years... Actually, it seems to be fixed in gcc 4.4 But gcc 4.3.1 and earlier will be everywhere for quite some time... --kcc > > --kcc > >> >> AIUI, POSIX says the src==dst case is not allowed (along with all other >> overlapping cases) because (eg) on PowerPC, it is possible to make a high >> performance memcpy that preallocates the destination area in D1 using >> dcbz instructions, which create the line in D1 and fill it full of >> zeroes. This avoids dragging the destination line up the memory >> hierarchy only to completely overwrite it with stuff from the source. >> >> Result is however that if the src and dst overlap, in any way, including >> completely, then this causes zeroes to be written into the src area (!) >> which is certainly not what you want. >> >> J >> > |
|
From: Konstantin S. <kon...@gm...> - 2009-05-06 08:23:34
|
On Wed, May 6, 2009 at 12:24 PM, Julian Seward <js...@ac...> wrote: > On Tuesday 05 May 2009, Nicholas Nethercote wrote: >> On Tue, May 5, 2009 at 5:03 AM, Konstantin Serebryany >> >> <kon...@gm...> wrote: >> > When copying structures of size 5, g++ (4.3.1) generates memcpy(dst, src, >> > 5). It may happen that src==dst (see example below). >> > src==dst is not allowed by the standard, but this code is not written >> > by humans and the compiler knows it is correct >> > (I asume that glibc will not explode with src==dst) >> > >> > Memcheck reports a warning. >> > >> > Even if this is a bug in gcc (is it?) we still need to workaround it >> > in memcheck. >> > Comments? >> >> These ones are always tricky, where the language spec doesn't match >> what happens in practice. This case is particularly annoying because >> we can't distinguish between a user-inserted memcpy() and a >> GCC-generated one. It's arguably that GCC shouldn't generate such >> code -- you say you assume glibc will not explode in this case, but >> that is an assumption. > > I think you should file this as a gcc bug. Yea, probably. But we still need a workaround in Memcheck. The existing versions of gcc will be there for years... --kcc > > AIUI, POSIX says the src==dst case is not allowed (along with all other > overlapping cases) because (eg) on PowerPC, it is possible to make a high > performance memcpy that preallocates the destination area in D1 using > dcbz instructions, which create the line in D1 and fill it full of > zeroes. This avoids dragging the destination line up the memory > hierarchy only to completely overwrite it with stuff from the source. > > Result is however that if the src and dst overlap, in any way, including > completely, then this causes zeroes to be written into the src area (!) > which is certainly not what you want. > > J > |
|
From: Julian S. <js...@ac...> - 2009-05-06 08:20:21
|
On Tuesday 05 May 2009, Nicholas Nethercote wrote: > On Tue, May 5, 2009 at 5:03 AM, Konstantin Serebryany > > <kon...@gm...> wrote: > > When copying structures of size 5, g++ (4.3.1) generates memcpy(dst, src, > > 5). It may happen that src==dst (see example below). > > src==dst is not allowed by the standard, but this code is not written > > by humans and the compiler knows it is correct > > (I asume that glibc will not explode with src==dst) > > > > Memcheck reports a warning. > > > > Even if this is a bug in gcc (is it?) we still need to workaround it > > in memcheck. > > Comments? > > These ones are always tricky, where the language spec doesn't match > what happens in practice. This case is particularly annoying because > we can't distinguish between a user-inserted memcpy() and a > GCC-generated one. It's arguably that GCC shouldn't generate such > code -- you say you assume glibc will not explode in this case, but > that is an assumption. I think you should file this as a gcc bug. AIUI, POSIX says the src==dst case is not allowed (along with all other overlapping cases) because (eg) on PowerPC, it is possible to make a high performance memcpy that preallocates the destination area in D1 using dcbz instructions, which create the line in D1 and fill it full of zeroes. This avoids dragging the destination line up the memory hierarchy only to completely overwrite it with stuff from the source. Result is however that if the src and dst overlap, in any way, including completely, then this causes zeroes to be written into the src area (!) which is certainly not what you want. J |
|
From: Konstantin S. <kon...@gm...> - 2009-05-06 07:42:09
|
On Tue, May 5, 2009 at 2:30 AM, Nicholas Nethercote <n.n...@gm...> wrote: > On Tue, May 5, 2009 at 5:03 AM, Konstantin Serebryany > <kon...@gm...> wrote: >> >> When copying structures of size 5, g++ (4.3.1) generates memcpy(dst, src, 5). >> It may happen that src==dst (see example below). >> src==dst is not allowed by the standard, but this code is not written >> by humans and the compiler knows it is correct >> (I asume that glibc will not explode with src==dst) >> >> Memcheck reports a warning. >> >> Even if this is a bug in gcc (is it?) we still need to workaround it >> in memcheck. >> Comments? > > These ones are always tricky, where the language spec doesn't match > what happens in practice. This case is particularly annoying because > we can't distinguish between a user-inserted memcpy() and a > GCC-generated one. It's arguably that GCC shouldn't generate such > code -- you say you assume glibc will not explode in this case, but > that is an assumption. > > So I don't know what to do. Maybe Julian will have some ideas. I would suggest two "workarounds": - add a flag that disables warnings on src=dst (off by default) or - generate a different kind of warning for src=dst. Right now memcheck reports warning of type Memcheck:Overlap for cases when the memory regions partially overlap and when they are equal. We can generate Memcheck:MemcpySrcEqualsDst for the latter case. This looks better but may break someone's suppression files. Which one do you prefer (if any)? --kcc > > Nick > |
|
From: <sv...@va...> - 2009-05-06 07:34:35
|
Author: njn
Date: 2009-05-06 08:34:26 +0100 (Wed, 06 May 2009)
New Revision: 9787
Log:
Merge r9786 (fix rwlock_test) from the trunk.
Modified:
branches/DARWIN/drd/tests/rwlock_test.c
Modified: branches/DARWIN/drd/tests/rwlock_test.c
===================================================================
--- branches/DARWIN/drd/tests/rwlock_test.c 2009-05-06 07:28:38 UTC (rev 9786)
+++ branches/DARWIN/drd/tests/rwlock_test.c 2009-05-06 07:34:26 UTC (rev 9787)
@@ -36,6 +36,7 @@
pthread_t tid[thread_count];
int i;
+ pthread_rwlock_init(&s_rwlock, NULL);
for (i = 0; i < thread_count; i++)
{
pthread_create(&tid[i], 0, thread_func, 0);
|
|
From: <sv...@va...> - 2009-05-06 07:28:48
|
Author: njn
Date: 2009-05-06 08:28:38 +0100 (Wed, 06 May 2009)
New Revision: 9786
Log:
Add a missing rwlock initialisation.
Modified:
trunk/drd/tests/rwlock_test.c
Modified: trunk/drd/tests/rwlock_test.c
===================================================================
--- trunk/drd/tests/rwlock_test.c 2009-05-06 06:58:09 UTC (rev 9785)
+++ trunk/drd/tests/rwlock_test.c 2009-05-06 07:28:38 UTC (rev 9786)
@@ -36,6 +36,7 @@
pthread_t tid[thread_count];
int i;
+ pthread_rwlock_init(&s_rwlock, NULL);
for (i = 0; i < thread_count; i++)
{
pthread_create(&tid[i], 0, thread_func, 0);
|
|
From: <sv...@va...> - 2009-05-06 06:58:16
|
Author: njn
Date: 2009-05-06 07:58:09 +0100 (Wed, 06 May 2009)
New Revision: 9785
Log:
Merge r9784 (make leak check output more deterministic) from the trunk.
Modified:
branches/DARWIN/memcheck/mc_leakcheck.c
branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp
Modified: branches/DARWIN/memcheck/mc_leakcheck.c
===================================================================
--- branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-06 06:52:47 UTC (rev 9784)
+++ branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-06 06:58:09 UTC (rev 9785)
@@ -783,6 +783,15 @@
// If size are equal, compare by states.
if (lr_a->key.state < lr_b->key.state) return -1;
if (lr_a->key.state > lr_b->key.state) return 1;
+ // If they're still equal here, it doesn't matter that much, but we keep
+ // comparing other things so that regtests are as deterministic as
+ // possible. So: compare num_blocks.
+ if (lr_a->num_blocks < lr_b->num_blocks) return -1;
+ if (lr_a->num_blocks > lr_b->num_blocks) return 1;
+ // Finally, compare ExeContext addresses... older ones are likely to have
+ // lower addresses.
+ if (lr_a->key.allocated_at < lr_b->key.allocated_at) return -1;
+ if (lr_a->key.allocated_at > lr_b->key.allocated_at) return 1;
return 0;
}
Modified: branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:52:47 UTC (rev 9784)
+++ branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:58:09 UTC (rev 9785)
@@ -6,42 +6,42 @@
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:87)
+ by 0x........: f (leak-cases.c:78)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:87)
+ by 0x........: f (leak-cases.c:81)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:78)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:81)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:87)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:87)
by 0x........: main (leak-cases.c:107)
|
|
From: <sv...@va...> - 2009-05-06 06:52:51
|
Author: njn
Date: 2009-05-06 07:52:47 +0100 (Wed, 06 May 2009)
New Revision: 9784
Log:
Make loss record ordering more deterministic, so that regtests are reliable.
Modified:
trunk/memcheck/mc_leakcheck.c
trunk/memcheck/tests/leak-cases-full.stderr.exp
Modified: trunk/memcheck/mc_leakcheck.c
===================================================================
--- trunk/memcheck/mc_leakcheck.c 2009-05-06 06:45:05 UTC (rev 9783)
+++ trunk/memcheck/mc_leakcheck.c 2009-05-06 06:52:47 UTC (rev 9784)
@@ -782,6 +782,15 @@
// If size are equal, compare by states.
if (lr_a->key.state < lr_b->key.state) return -1;
if (lr_a->key.state > lr_b->key.state) return 1;
+ // If they're still equal here, it doesn't matter that much, but we keep
+ // comparing other things so that regtests are as deterministic as
+ // possible. So: compare num_blocks.
+ if (lr_a->num_blocks < lr_b->num_blocks) return -1;
+ if (lr_a->num_blocks > lr_b->num_blocks) return 1;
+ // Finally, compare ExeContext addresses... older ones are likely to have
+ // lower addresses.
+ if (lr_a->key.allocated_at < lr_b->key.allocated_at) return -1;
+ if (lr_a->key.allocated_at > lr_b->key.allocated_at) return 1;
return 0;
}
Modified: trunk/memcheck/tests/leak-cases-full.stderr.exp
===================================================================
--- trunk/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:45:05 UTC (rev 9783)
+++ trunk/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:52:47 UTC (rev 9784)
@@ -6,42 +6,42 @@
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:87)
+ by 0x........: f (leak-cases.c:78)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:87)
+ by 0x........: f (leak-cases.c:81)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:78)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:81)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:87)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:87)
by 0x........: main (leak-cases.c:107)
|
|
From: <sv...@va...> - 2009-05-06 06:45:13
|
Author: njn
Date: 2009-05-06 07:45:05 +0100 (Wed, 06 May 2009)
New Revision: 9783
Log:
Merge r9781 and r9782 (fix quadratic behaviour in Memcheck) from the trunk.
Added:
branches/DARWIN/memcheck/perf/
Removed:
branches/DARWIN/memcheck/tests/mempool.stderr.exp64
Modified:
branches/DARWIN/configure.in
branches/DARWIN/coregrind/m_hashtable.c
branches/DARWIN/include/pub_tool_hashtable.h
branches/DARWIN/include/pub_tool_oset.h
branches/DARWIN/massif/perf/Makefile.am
branches/DARWIN/memcheck/Makefile.am
branches/DARWIN/memcheck/mc_errors.c
branches/DARWIN/memcheck/mc_include.h
branches/DARWIN/memcheck/mc_leakcheck.c
branches/DARWIN/memcheck/perf/many-loss-records.c
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp
branches/DARWIN/memcheck/tests/leak-cycle.stderr.exp
branches/DARWIN/memcheck/tests/mempool.c
branches/DARWIN/memcheck/tests/mempool.stderr.exp
Modified: branches/DARWIN/configure.in
===================================================================
--- branches/DARWIN/configure.in 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/configure.in 2009-05-06 06:45:05 UTC (rev 9783)
@@ -1843,8 +1843,9 @@
memcheck/tests/amd64/Makefile
memcheck/tests/x86/Makefile
memcheck/tests/linux/Makefile
+ memcheck/tests/darwin/Makefile
memcheck/tests/x86-linux/Makefile
- memcheck/tests/darwin/Makefile
+ memcheck/perf/Makefile
memcheck/docs/Makefile
cachegrind/Makefile
cachegrind/tests/Makefile
Modified: branches/DARWIN/coregrind/m_hashtable.c
===================================================================
--- branches/DARWIN/coregrind/m_hashtable.c 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/coregrind/m_hashtable.c 2009-05-06 06:45:05 UTC (rev 9783)
@@ -190,10 +190,9 @@
return NULL;
}
-/* Allocates a suitably-sized array, copies all the hashtable elements
- into it, then returns both the array and the size of it. This is
- used by the memory-leak detector. The array must be freed with
- VG_(free).
+/* Allocates a suitably-sized array, copies pointers to all the hashtable
+ elements into it, then returns both the array and the size of it. The
+ array must be freed with VG_(free).
*/
VgHashNode** VG_(HT_to_array) ( VgHashTable table, /*OUT*/ UInt* n_elems )
{
@@ -201,12 +200,7 @@
VgHashNode** arr;
VgHashNode* node;
- *n_elems = 0;
- for (i = 0; i < table->n_chains; i++) {
- for (node = table->chains[i]; node != NULL; node = node->next) {
- (*n_elems)++;
- }
- }
+ *n_elems = table->n_elements;
if (*n_elems == 0)
return NULL;
Modified: branches/DARWIN/include/pub_tool_hashtable.h
===================================================================
--- branches/DARWIN/include/pub_tool_hashtable.h 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/include/pub_tool_hashtable.h 2009-05-06 06:45:05 UTC (rev 9783)
@@ -67,10 +67,9 @@
/* Removes a VgHashNode from the table. Returns NULL if not found. */
extern void* VG_(HT_remove) ( VgHashTable table, UWord key );
-/* Allocates a suitably-sized array, copies all the hashtable elements
- into it, then returns both the array and the size of it. This is
- used by the memory-leak detector. The array must be freed with
- VG_(free). */
+/* Allocates a suitably-sized array, copies pointers to all the hashtable
+ elements into it, then returns both the array and the size of it. The
+ array must be freed with VG_(free). */
extern VgHashNode** VG_(HT_to_array) ( VgHashTable t, /*OUT*/ UInt* n_elems );
/* Reset the table's iterator to point to the first element. */
Modified: branches/DARWIN/include/pub_tool_oset.h
===================================================================
--- branches/DARWIN/include/pub_tool_oset.h 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/include/pub_tool_oset.h 2009-05-06 06:45:05 UTC (rev 9783)
@@ -72,9 +72,9 @@
typedef struct _OSet OSet;
-// - Cmp: returns -1, 0 or 1 if key is <, == or > elem.
+// - Cmp: returns -1, 0 or 1 if key is <, == or > elem.
// - Alloc: allocates a chunk of memory.
-// - Free: frees a chunk of memory allocated with Alloc.
+// - Free: frees a chunk of memory allocated with Alloc.
typedef Word (*OSetCmp_t) ( const void* key, const void* elem );
typedef void* (*OSetAlloc_t) ( HChar* ec, SizeT szB );
@@ -219,6 +219,11 @@
// * ResetIter: Each OSet has an iterator. This resets it to point to the
// first element in the OSet.
//
+// * ResetIterAt: Like ResetIter, but instead of resetting the iterator to the
+// smallest element, it resets the iterator to point to the smallest element
+// in the set whose key is greater-than-or-equal to the given key. (In many
+// cases this will be the element whose key equals that of the given key.)
+//
// * Next: Returns a pointer to the element pointed to by the OSet's
// iterator, and advances the iterator by one; the elements are visited
// in order. Or, returns NULL if the iterator has reached the OSet's end.
@@ -238,19 +243,15 @@
extern Word VG_(OSetGen_Size) ( const OSet* os );
extern void VG_(OSetGen_Insert) ( OSet* os, void* elem );
-extern Bool VG_(OSetGen_Contains) ( const OSet* os, const void* key );
-extern void* VG_(OSetGen_Lookup) ( const OSet* os, const void* key );
+extern Bool VG_(OSetGen_Contains) ( const OSet* os, const void* key );
+extern void* VG_(OSetGen_Lookup) ( const OSet* os, const void* key );
extern void* VG_(OSetGen_LookupWithCmp)( OSet* os,
const void* key, OSetCmp_t cmp );
-extern void* VG_(OSetGen_Remove) ( OSet* os, const void* key );
+extern void* VG_(OSetGen_Remove) ( OSet* os, const void* key );
extern void VG_(OSetGen_ResetIter) ( OSet* os );
+extern void VG_(OSetGen_ResetIterAt) ( OSet* os, const void* key );
extern void* VG_(OSetGen_Next) ( OSet* os );
-// set up 'oset' for iteration so that the first key subsequently
-// produced VG_(OSetGen_Next) is the smallest key in the map
-// >= start_at. Naturally ">=" is defined by the comparison
-// function supplied to VG_(OSetGen_Create).
-extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, const void* key );
#endif // __PUB_TOOL_OSET_H
Modified: branches/DARWIN/massif/perf/Makefile.am
===================================================================
--- branches/DARWIN/massif/perf/Makefile.am 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/massif/perf/Makefile.am 2009-05-06 06:45:05 UTC (rev 9783)
@@ -1,6 +1,5 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
EXTRA_DIST = \
many-xpts.vgperf
@@ -8,6 +7,6 @@
check_PROGRAMS = \
many-xpts
-AM_CFLAGS = -Winline -Wall -Wshadow -g -O $(AM_FLAG_M3264_PRI)
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CFLAGS += -O $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += -O $(AM_FLAG_M3264_PRI)
+
Modified: branches/DARWIN/memcheck/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/Makefile.am 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/Makefile.am 2009-05-06 06:45:05 UTC (rev 9783)
@@ -1,5 +1,7 @@
include $(top_srcdir)/Makefile.tool.am
+SUBDIRS += perf
+
noinst_PROGRAMS =
noinst_DSYMS =
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
Modified: branches/DARWIN/memcheck/mc_errors.c
===================================================================
--- branches/DARWIN/memcheck/mc_errors.c 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/mc_errors.c 2009-05-06 06:45:05 UTC (rev 9783)
@@ -572,7 +572,7 @@
if (VG_(clo_xml)) {
VG_(message_no_f_c)(Vg_UserMsg, " <kind>%t</kind>",
- xml_leak_kind(lr->state));
+ xml_leak_kind(lr->key.state));
} else {
VG_(message)(Vg_UserMsg, "");
}
@@ -584,7 +584,7 @@
xpre,
lr->szB + lr->indirect_szB, lr->szB, lr->indirect_szB,
lr->num_blocks,
- str_leak_lossmode(lr->state), n_this_record, n_total_records,
+ str_leak_lossmode(lr->key.state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
@@ -600,7 +600,7 @@
"%s%'lu bytes in %'u blocks are %s in loss record %'u of %'u%s",
xpre,
lr->szB, lr->num_blocks,
- str_leak_lossmode(lr->state), n_this_record, n_total_records,
+ str_leak_lossmode(lr->key.state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
@@ -610,7 +610,7 @@
lr->num_blocks);
}
}
- VG_(pp_ExeContext)(lr->allocated_at);
+ VG_(pp_ExeContext)(lr->key.allocated_at);
break;
}
@@ -816,7 +816,7 @@
extra.Err.Leak.lr = lr;
return
VG_(unique_error) ( tid, Err_Leak, /*Addr*/0, /*s*/NULL, &extra,
- lr->allocated_at, print_record,
+ lr->key.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-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/mc_include.h 2009-05-06 06:45:05 UTC (rev 9783)
@@ -230,13 +230,15 @@
typedef
enum {
- Unreached =0, // Not reached, ie. leaked.
- // (At best, only reachable from itself via a cycle.
- IndirectLeak =1, // Leaked, but reachable from another leaked block
+ // Nb: the order is important -- it dictates the order of loss records
+ // of equal sizes.
+ Reachable =0, // Definitely reachable from root-set.
+ Possible =1, // Possibly reachable from root-set; involves at
+ // least one interior-pointer along the way.
+ IndirectLeak =2, // Leaked, but reachable from another leaked block
// (be it Unreached or IndirectLeak).
- Possible =2, // Possibly reachable from root-set; involves at
- // least one interior-pointer along the way.
- Reachable =3 // Definitely reachable from root-set.
+ Unreached =3, // Not reached, ie. leaked.
+ // (At best, only reachable from itself via a cycle.)
}
Reachedness;
@@ -262,17 +264,23 @@
}
LeakCheckMode;
+/* When a LossRecord is put into an OSet, these elements represent the key. */
+typedef
+ struct _LossRecordKey {
+ Reachedness state; // LC_Extra.state value shared by all blocks.
+ ExeContext* allocated_at; // Where they were allocated.
+ }
+ LossRecordKey;
+
/* 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;
- 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.
+ LossRecordKey key; // Key, when used in an OSet.
+ 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-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-06 06:45:05 UTC (rev 9783)
@@ -40,6 +40,7 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
+#include "pub_tool_oset.h"
#include "pub_tool_signals.h"
#include "pub_tool_tooliface.h" // Needed for mc_include.h
@@ -751,77 +752,108 @@
}
}
+static Word cmp_LossRecordKey_LossRecord(const void* key, const void* elem)
+{
+ LossRecordKey* a = (LossRecordKey*)key;
+ LossRecordKey* b = &(((LossRecord*)elem)->key);
+
+ // Compare on states first because that's fast.
+ if (a->state < b->state) return -1;
+ if (a->state > b->state) return 1;
+ // Ok, the states are equal. Now compare the locations, which is slower.
+ if (VG_(eq_ExeContext)(
+ MC_(clo_leak_resolution), a->allocated_at, b->allocated_at))
+ return 0;
+ // Different locations. Ordering is arbitrary, just use the ec pointer.
+ if (a->allocated_at < b->allocated_at) return -1;
+ if (a->allocated_at > b->allocated_at) return 1;
+ VG_(tool_panic)("bad LossRecord comparison");
+}
+
+static Int cmp_LossRecords(void* va, void* vb)
+{
+ LossRecord* lr_a = *(LossRecord**)va;
+ LossRecord* lr_b = *(LossRecord**)vb;
+ SizeT total_szB_a = lr_a->szB + lr_a->indirect_szB;
+ SizeT total_szB_b = lr_b->szB + lr_b->indirect_szB;
+
+ // First compare by sizes.
+ if (total_szB_a < total_szB_b) return -1;
+ if (total_szB_a > total_szB_b) return 1;
+ // If size are equal, compare by states.
+ if (lr_a->key.state < lr_b->key.state) return -1;
+ if (lr_a->key.state > lr_b->key.state) return 1;
+ return 0;
+}
+
static void print_results(ThreadId tid, Bool is_full_check)
{
- Int i, n_lossrecords;
- LossRecord* lr_list;
- LossRecord* lr;
- Bool is_suppressed;
+ Int i, n_lossrecords;
+ OSet* lr_table;
+ LossRecord** lr_array;
+ LossRecord* lr;
+ Bool is_suppressed;
- // Common up the lost blocks so we can print sensible error messages.
- n_lossrecords = 0;
- lr_list = NULL;
+ // Create the lr_table, which holds the loss records.
+ lr_table =
+ VG_(OSetGen_Create)(offsetof(LossRecord, key),
+ cmp_LossRecordKey_LossRecord,
+ VG_(malloc), "mc.pr.1",
+ VG_(free));
+
+ // Convert the chunks into loss records, merging them where appropriate.
for (i = 0; i < lc_n_chunks; i++) {
- MC_Chunk* ch = lc_chunks[i];
- LC_Extra* ex = &(lc_extras)[i];
+ MC_Chunk* ch = lc_chunks[i];
+ LC_Extra* ex = &(lc_extras)[i];
+ LossRecord* old_lr;
+ LossRecordKey lrkey;
+ lrkey.state = ex->state;
+ lrkey.allocated_at = ch->where;
- // 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),
- lr->allocated_at,
- ch->where) ) {
- break;
- }
- }
- if (lr != NULL) {
- // Similar to a previous loss record; merge.
- lr->num_blocks++;
- lr->szB += ch->szB;
- lr->indirect_szB += ex->indirect_szB;
+ old_lr = VG_(OSetGen_Lookup)(lr_table, &lrkey);
+ if (old_lr) {
+ // We found an existing loss record matching this chunk. Update the
+ // loss record's details in-situ. This is safe because we don't
+ // change the elements used as the OSet key.
+ old_lr->szB += ch->szB;
+ old_lr->indirect_szB += ex->indirect_szB;
+ old_lr->num_blocks++;
} else {
- // Create a new loss record.
- n_lossrecords++;
- 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;
+ // No existing loss record matches this chunk. Create a new loss
+ // record, initialise it from the chunk, and insert it into lr_table.
+ lr = VG_(OSetGen_AllocNode)(lr_table, sizeof(LossRecord));
+ lr->key = lrkey;
+ lr->szB = ch->szB;
+ lr->indirect_szB = ex->indirect_szB;
+ lr->num_blocks = 1;
+ VG_(OSetGen_Insert)(lr_table, lr);
}
}
+ n_lossrecords = VG_(OSetGen_Size)(lr_table);
+ // Create an array of pointers to the loss records.
+ lr_array = VG_(malloc)("mc.pr.2", n_lossrecords * sizeof(LossRecord*));
+ i = 0;
+ VG_(OSetGen_ResetIter)(lr_table);
+ while ( (lr = VG_(OSetGen_Next)(lr_table)) ) {
+ lr_array[i++] = lr;
+ }
+ tl_assert(i == n_lossrecords);
+
+ // Sort the array by loss record sizes.
+ VG_(ssort)(lr_array, n_lossrecords, sizeof(LossRecord*),
+ cmp_LossRecords);
+
+ // Zero totals.
MC_(blocks_leaked) = MC_(bytes_leaked) = 0;
MC_(blocks_indirect) = MC_(bytes_indirect) = 0;
MC_(blocks_dubious) = MC_(bytes_dubious) = 0;
MC_(blocks_reachable) = MC_(bytes_reachable) = 0;
MC_(blocks_suppressed) = MC_(bytes_suppressed) = 0;
- // Print out the loss records and collect summary stats.
+ // Print the loss records (in size order) and collect summary stats.
for (i = 0; i < n_lossrecords; i++) {
- Bool print_record;
- 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(lr_min != NULL);
-
+ Bool print_record;
// Rules for printing:
// - We don't show suppressed loss records ever (and that's controlled
// within the error manager).
@@ -834,38 +866,37 @@
// this is different to "still reachable" used elsewhere because it
// includes indirectly lost blocks!
//
+ lr = lr_array[i];
print_record = is_full_check &&
( MC_(clo_show_reachable) ||
- Unreached == lr_min->state ||
- Possible == lr_min->state );
+ Unreached == lr->key.state ||
+ Possible == lr->key.state );
is_suppressed =
- MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr_min,
- print_record );
+ MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr, print_record );
if (is_suppressed) {
- MC_(blocks_suppressed) += lr_min->num_blocks;
- MC_(bytes_suppressed) += lr_min->szB;
+ MC_(blocks_suppressed) += lr->num_blocks;
+ MC_(bytes_suppressed) += lr->szB;
- } else if (Unreached == lr_min->state) {
- MC_(blocks_leaked) += lr_min->num_blocks;
- MC_(bytes_leaked) += lr_min->szB;
+ } else if (Unreached == lr->key.state) {
+ MC_(blocks_leaked) += lr->num_blocks;
+ MC_(bytes_leaked) += lr->szB;
- } else if (IndirectLeak == lr_min->state) {
- MC_(blocks_indirect) += lr_min->num_blocks;
- MC_(bytes_indirect) += lr_min->szB;
+ } else if (IndirectLeak == lr->key.state) {
+ MC_(blocks_indirect) += lr->num_blocks;
+ MC_(bytes_indirect) += lr->szB;
- } else if (Possible == lr_min->state) {
- MC_(blocks_dubious) += lr_min->num_blocks;
- MC_(bytes_dubious) += lr_min->szB;
+ } else if (Possible == lr->key.state) {
+ MC_(blocks_dubious) += lr->num_blocks;
+ MC_(bytes_dubious) += lr->szB;
- } else if (Reachable == lr_min->state) {
- MC_(blocks_reachable) += lr_min->num_blocks;
- MC_(bytes_reachable) += lr_min->szB;
+ } else if (Reachable == lr->key.state) {
+ MC_(blocks_reachable) += lr->num_blocks;
+ MC_(bytes_reachable) += lr->szB;
} else {
VG_(tool_panic)("unknown loss mode");
}
- lr_min->num_blocks = 0;
}
if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
Copied: branches/DARWIN/memcheck/perf (from rev 9781, trunk/memcheck/perf)
Modified: branches/DARWIN/memcheck/perf/many-loss-records.c
===================================================================
--- trunk/memcheck/perf/many-loss-records.c 2009-05-06 06:15:55 UTC (rev 9781)
+++ branches/DARWIN/memcheck/perf/many-loss-records.c 2009-05-06 06:45:05 UTC (rev 9783)
@@ -8,7 +8,7 @@
// fixed it took about 2 seconds, and the leak checking was only a small
// fraction of that. --njn
-#include <malloc.h>
+#include <stdlib.h>
#include <strings.h>
#include <stdio.h>
#include <math.h>
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-05-06 06:45:05 UTC (rev 9783)
@@ -95,7 +95,7 @@
memalign2.stderr.exp memalign2.vgtest \
memcmptest.stderr.exp memcmptest.stderr.exp2 \
memcmptest.stdout.exp memcmptest.vgtest \
- mempool.stderr.exp mempool.stderr.exp64 mempool.vgtest \
+ mempool.stderr.exp mempool.vgtest \
metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
mismatches.stderr.exp mismatches.vgtest \
mmaptest.stderr.exp mmaptest.vgtest \
Modified: branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:45:05 UTC (rev 9783)
@@ -20,28 +20,28 @@
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:78)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:81)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:81)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:78)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
@@ -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:91)
+ by 0x........: f (leak-cases.c:76)
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:76)
+ by 0x........: f (leak-cases.c:91)
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-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/tests/leak-cycle.stderr.exp 2009-05-06 06:45:05 UTC (rev 9783)
@@ -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:45)
+ by 0x........: main (leak-cycle.c:44)
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:44)
+ by 0x........: main (leak-cycle.c:45)
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)
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)
Modified: branches/DARWIN/memcheck/tests/mempool.c
===================================================================
--- branches/DARWIN/memcheck/tests/mempool.c 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/tests/mempool.c 2009-05-06 06:45:05 UTC (rev 9783)
@@ -14,13 +14,19 @@
{
struct _level_list *next;
char *where;
+ // Padding ensures the struct is the same size on 32-bit and 64-bit
+ // machines.
+ char padding[16 - 2*sizeof(char*)];
} level_list;
typedef struct _pool {
char *mem;
char *where;
+ level_list *levels;
int size, left;
- level_list *levels;
+ // Padding ensures the struct is the same size on 32-bit and 64-bit
+ // machines.
+ char padding[24 - 3*sizeof(char*)];
} pool;
pool *make_pool()
Modified: branches/DARWIN/memcheck/tests/mempool.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/mempool.stderr.exp 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/tests/mempool.stderr.exp 2009-05-06 06:45:05 UTC (rev 9783)
@@ -1,60 +1,60 @@
Invalid write of size 1
- at 0x........: test (mempool.c:124)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:130)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 7 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Invalid write of size 1
- at 0x........: test (mempool.c:125)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:131)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 18 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Invalid write of size 1
- at 0x........: test (mempool.c:129)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:135)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 70 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Invalid write of size 1
- at 0x........: test (mempool.c:130)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:136)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 96 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:135)
- by 0x........: main (mempool.c:148)
+ at 0x........: allocate (mempool.c:105)
+ by 0x........: test (mempool.c:121)
+ by 0x........: main (mempool.c:154)
10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:115)
- by 0x........: main (mempool.c:148)
+ at 0x........: allocate (mempool.c:105)
+ by 0x........: test (mempool.c:141)
+ by 0x........: main (mempool.c:154)
20 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:116)
- by 0x........: main (mempool.c:148)
+ at 0x........: allocate (mempool.c:105)
+ by 0x........: test (mempool.c:122)
+ by 0x........: main (mempool.c:154)
-28 (20 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
+48 (32 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:37)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:43)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Deleted: branches/DARWIN/memcheck/tests/mempool.stderr.exp64
===================================================================
--- branches/DARWIN/memcheck/tests/mempool.stderr.exp64 2009-05-06 06:27:19 UTC (rev 9782)
+++ branches/DARWIN/memcheck/tests/mempool.stderr.exp64 2009-05-06 06:45:05 UTC (rev 9783)
@@ -1,60 +0,0 @@
-Invalid write of size 1
- at 0x........: test (mempool.c:124)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 7 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-Invalid write of size 1
- at 0x........: test (mempool.c:125)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 18 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-Invalid write of size 1
- at 0x........: test (mempool.c:129)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 70 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-Invalid write of size 1
- at 0x........: test (mempool.c:130)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 96 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-
-10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:135)
- by 0x........: main (mempool.c:148)
-
-
-10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:115)
- by 0x........: main (mempool.c:148)
-
-
-20 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:116)
- by 0x........: main (mempool.c:148)
-
-
-48 (32 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:37)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
|
|
From: <sv...@va...> - 2009-05-06 06:27:22
|
Author: njn Date: 2009-05-06 07:27:19 +0100 (Wed, 06 May 2009) New Revision: 9782 Log: Change a #include to make the test more portable. Modified: trunk/memcheck/perf/many-loss-records.c Modified: trunk/memcheck/perf/many-loss-records.c =================================================================== --- trunk/memcheck/perf/many-loss-records.c 2009-05-06 06:15:55 UTC (rev 9781) +++ trunk/memcheck/perf/many-loss-records.c 2009-05-06 06:27:19 UTC (rev 9782) @@ -8,7 +8,7 @@ // fixed it took about 2 seconds, and the leak checking was only a small // fraction of that. --njn -#include <malloc.h> +#include <stdlib.h> #include <strings.h> #include <stdio.h> #include <math.h> |
|
From: <sv...@va...> - 2009-05-06 06:16:06
|
Author: njn
Date: 2009-05-06 07:15:55 +0100 (Wed, 06 May 2009)
New Revision: 9781
Log:
Fix bug #191182, where printing the leak checker results was really slow if
there were a lot of loss records.
The fix was:
- Avoid the O(m * n) looping over the chunks when creating the loss
records, by putting loss records into an OSet instead of a list, which
makes duplicate detection for each chunk an O(log n) operation instead of
an O(n) operation.
- Avoid the looping over loss records which was used to do a poor
man's sort, but was O(n^2). Instead copy pointers to the loss records
from the OSet into an array and sort it normally with VG_(ssort) (n log n,
usually) before printing.
This approach was similar to that used in the patch Philippe attached to the
bug report.
Other changes:
- Added Philippe's test programs in the new memcheck/perf directory. It
used to take 57s on my machine, now it takes 1.6s.
- Cleaned up massif/perf/Makefile.am to be consistent with other Makefiles.
- Improved some comments relating to VgHashTable and OSet.
- Avoided a redundant traversal of the hash table in VG_(HT_to_array), also
identified by Philippe..
- Made memcheck/tests/mempool's results independent of the pointer size, and
thus was able to remove its .stderr.exp64 file.
Added:
trunk/memcheck/perf/
trunk/memcheck/perf/Makefile.am
trunk/memcheck/perf/many-loss-records.c
trunk/memcheck/perf/many-loss-records.vgperf
Removed:
trunk/memcheck/tests/mempool.stderr.exp64
Modified:
trunk/configure.in
trunk/coregrind/m_hashtable.c
trunk/include/pub_tool_hashtable.h
trunk/include/pub_tool_oset.h
trunk/massif/perf/Makefile.am
trunk/memcheck/Makefile.am
trunk/memcheck/mc_errors.c
trunk/memcheck/mc_include.h
trunk/memcheck/mc_leakcheck.c
trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/leak-cases-full.stderr.exp
trunk/memcheck/tests/leak-cycle.stderr.exp
trunk/memcheck/tests/mempool.c
trunk/memcheck/tests/mempool.stderr.exp
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/configure.in 2009-05-06 06:15:55 UTC (rev 9781)
@@ -1751,6 +1751,7 @@
memcheck/tests/x86/Makefile
memcheck/tests/linux/Makefile
memcheck/tests/x86-linux/Makefile
+ memcheck/perf/Makefile
memcheck/docs/Makefile
cachegrind/Makefile
cachegrind/tests/Makefile
Modified: trunk/coregrind/m_hashtable.c
===================================================================
--- trunk/coregrind/m_hashtable.c 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/coregrind/m_hashtable.c 2009-05-06 06:15:55 UTC (rev 9781)
@@ -190,10 +190,9 @@
return NULL;
}
-/* Allocates a suitably-sized array, copies all the hashtable elements
- into it, then returns both the array and the size of it. This is
- used by the memory-leak detector. The array must be freed with
- VG_(free).
+/* Allocates a suitably-sized array, copies pointers to all the hashtable
+ elements into it, then returns both the array and the size of it. The
+ array must be freed with VG_(free).
*/
VgHashNode** VG_(HT_to_array) ( VgHashTable table, /*OUT*/ UInt* n_elems )
{
@@ -201,12 +200,7 @@
VgHashNode** arr;
VgHashNode* node;
- *n_elems = 0;
- for (i = 0; i < table->n_chains; i++) {
- for (node = table->chains[i]; node != NULL; node = node->next) {
- (*n_elems)++;
- }
- }
+ *n_elems = table->n_elements;
if (*n_elems == 0)
return NULL;
Modified: trunk/include/pub_tool_hashtable.h
===================================================================
--- trunk/include/pub_tool_hashtable.h 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/include/pub_tool_hashtable.h 2009-05-06 06:15:55 UTC (rev 9781)
@@ -67,10 +67,9 @@
/* Removes a VgHashNode from the table. Returns NULL if not found. */
extern void* VG_(HT_remove) ( VgHashTable table, UWord key );
-/* Allocates a suitably-sized array, copies all the hashtable elements
- into it, then returns both the array and the size of it. This is
- used by the memory-leak detector. The array must be freed with
- VG_(free). */
+/* Allocates a suitably-sized array, copies pointers to all the hashtable
+ elements into it, then returns both the array and the size of it. The
+ array must be freed with VG_(free). */
extern VgHashNode** VG_(HT_to_array) ( VgHashTable t, /*OUT*/ UInt* n_elems );
/* Reset the table's iterator to point to the first element. */
Modified: trunk/include/pub_tool_oset.h
===================================================================
--- trunk/include/pub_tool_oset.h 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/include/pub_tool_oset.h 2009-05-06 06:15:55 UTC (rev 9781)
@@ -72,9 +72,9 @@
typedef struct _OSet OSet;
-// - Cmp: returns -1, 0 or 1 if key is <, == or > elem.
+// - Cmp: returns -1, 0 or 1 if key is <, == or > elem.
// - Alloc: allocates a chunk of memory.
-// - Free: frees a chunk of memory allocated with Alloc.
+// - Free: frees a chunk of memory allocated with Alloc.
typedef Word (*OSetCmp_t) ( const void* key, const void* elem );
typedef void* (*OSetAlloc_t) ( HChar* ec, SizeT szB );
@@ -219,6 +219,11 @@
// * ResetIter: Each OSet has an iterator. This resets it to point to the
// first element in the OSet.
//
+// * ResetIterAt: Like ResetIter, but instead of resetting the iterator to the
+// smallest element, it resets the iterator to point to the smallest element
+// in the set whose key is greater-than-or-equal to the given key. (In many
+// cases this will be the element whose key equals that of the given key.)
+//
// * Next: Returns a pointer to the element pointed to by the OSet's
// iterator, and advances the iterator by one; the elements are visited
// in order. Or, returns NULL if the iterator has reached the OSet's end.
@@ -238,19 +243,15 @@
extern Word VG_(OSetGen_Size) ( const OSet* os );
extern void VG_(OSetGen_Insert) ( OSet* os, void* elem );
-extern Bool VG_(OSetGen_Contains) ( const OSet* os, const void* key );
-extern void* VG_(OSetGen_Lookup) ( const OSet* os, const void* key );
+extern Bool VG_(OSetGen_Contains) ( const OSet* os, const void* key );
+extern void* VG_(OSetGen_Lookup) ( const OSet* os, const void* key );
extern void* VG_(OSetGen_LookupWithCmp)( OSet* os,
const void* key, OSetCmp_t cmp );
-extern void* VG_(OSetGen_Remove) ( OSet* os, const void* key );
+extern void* VG_(OSetGen_Remove) ( OSet* os, const void* key );
extern void VG_(OSetGen_ResetIter) ( OSet* os );
+extern void VG_(OSetGen_ResetIterAt) ( OSet* os, const void* key );
extern void* VG_(OSetGen_Next) ( OSet* os );
-// set up 'oset' for iteration so that the first key subsequently
-// produced VG_(OSetGen_Next) is the smallest key in the map
-// >= start_at. Naturally ">=" is defined by the comparison
-// function supplied to VG_(OSetGen_Create).
-extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, const void* key );
#endif // __PUB_TOOL_OSET_H
Modified: trunk/massif/perf/Makefile.am
===================================================================
--- trunk/massif/perf/Makefile.am 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/massif/perf/Makefile.am 2009-05-06 06:15:55 UTC (rev 9781)
@@ -1,6 +1,5 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
+include $(top_srcdir)/Makefile.tool-tests.am
EXTRA_DIST = \
many-xpts.vgperf
@@ -8,6 +7,6 @@
check_PROGRAMS = \
many-xpts
-AM_CFLAGS = -Winline -Wall -Wshadow -g -O $(AM_FLAG_M3264_PRI)
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CFLAGS += -O $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += -O $(AM_FLAG_M3264_PRI)
+
Modified: trunk/memcheck/Makefile.am
===================================================================
--- trunk/memcheck/Makefile.am 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/Makefile.am 2009-05-06 06:15:55 UTC (rev 9781)
@@ -1,5 +1,7 @@
include $(top_srcdir)/Makefile.tool.am
+SUBDIRS += perf
+
noinst_PROGRAMS =
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_PROGRAMS += memcheck-x86-linux vgpreload_memcheck-x86-linux.so
Modified: trunk/memcheck/mc_errors.c
===================================================================
--- trunk/memcheck/mc_errors.c 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/mc_errors.c 2009-05-06 06:15:55 UTC (rev 9781)
@@ -569,7 +569,7 @@
if (VG_(clo_xml)) {
VG_(message_no_f_c)(Vg_UserMsg, " <kind>%t</kind>",
- xml_leak_kind(lr->state));
+ xml_leak_kind(lr->key.state));
} else {
VG_(message)(Vg_UserMsg, "");
}
@@ -581,7 +581,7 @@
xpre,
lr->szB + lr->indirect_szB, lr->szB, lr->indirect_szB,
lr->num_blocks,
- str_leak_lossmode(lr->state), n_this_record, n_total_records,
+ str_leak_lossmode(lr->key.state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
@@ -597,7 +597,7 @@
"%s%'lu bytes in %'u blocks are %s in loss record %'u of %'u%s",
xpre,
lr->szB, lr->num_blocks,
- str_leak_lossmode(lr->state), n_this_record, n_total_records,
+ str_leak_lossmode(lr->key.state), n_this_record, n_total_records,
xpost
);
if (VG_(clo_xml)) {
@@ -607,7 +607,7 @@
lr->num_blocks);
}
}
- VG_(pp_ExeContext)(lr->allocated_at);
+ VG_(pp_ExeContext)(lr->key.allocated_at);
break;
}
@@ -811,7 +811,7 @@
extra.Err.Leak.lr = lr;
return
VG_(unique_error) ( tid, Err_Leak, /*Addr*/0, /*s*/NULL, &extra,
- lr->allocated_at, print_record,
+ lr->key.allocated_at, print_record,
/*allow_GDB_attach*/False, /*count_error*/False );
}
Modified: trunk/memcheck/mc_include.h
===================================================================
--- trunk/memcheck/mc_include.h 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/mc_include.h 2009-05-06 06:15:55 UTC (rev 9781)
@@ -230,13 +230,15 @@
typedef
enum {
- Unreached =0, // Not reached, ie. leaked.
- // (At best, only reachable from itself via a cycle.
- IndirectLeak =1, // Leaked, but reachable from another leaked block
+ // Nb: the order is important -- it dictates the order of loss records
+ // of equal sizes.
+ Reachable =0, // Definitely reachable from root-set.
+ Possible =1, // Possibly reachable from root-set; involves at
+ // least one interior-pointer along the way.
+ IndirectLeak =2, // Leaked, but reachable from another leaked block
// (be it Unreached or IndirectLeak).
- Possible =2, // Possibly reachable from root-set; involves at
- // least one interior-pointer along the way.
- Reachable =3 // Definitely reachable from root-set.
+ Unreached =3, // Not reached, ie. leaked.
+ // (At best, only reachable from itself via a cycle.)
}
Reachedness;
@@ -262,17 +264,23 @@
}
LeakCheckMode;
+/* When a LossRecord is put into an OSet, these elements represent the key. */
+typedef
+ struct _LossRecordKey {
+ Reachedness state; // LC_Extra.state value shared by all blocks.
+ ExeContext* allocated_at; // Where they were allocated.
+ }
+ LossRecordKey;
+
/* 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;
- 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.
+ LossRecordKey key; // Key, when used in an OSet.
+ 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-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/mc_leakcheck.c 2009-05-06 06:15:55 UTC (rev 9781)
@@ -40,6 +40,7 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
+#include "pub_tool_oset.h"
#include "pub_tool_signals.h"
#include "pub_tool_tooliface.h" // Needed for mc_include.h
@@ -750,77 +751,108 @@
}
}
+static Word cmp_LossRecordKey_LossRecord(const void* key, const void* elem)
+{
+ LossRecordKey* a = (LossRecordKey*)key;
+ LossRecordKey* b = &(((LossRecord*)elem)->key);
+
+ // Compare on states first because that's fast.
+ if (a->state < b->state) return -1;
+ if (a->state > b->state) return 1;
+ // Ok, the states are equal. Now compare the locations, which is slower.
+ if (VG_(eq_ExeContext)(
+ MC_(clo_leak_resolution), a->allocated_at, b->allocated_at))
+ return 0;
+ // Different locations. Ordering is arbitrary, just use the ec pointer.
+ if (a->allocated_at < b->allocated_at) return -1;
+ if (a->allocated_at > b->allocated_at) return 1;
+ VG_(tool_panic)("bad LossRecord comparison");
+}
+
+static Int cmp_LossRecords(void* va, void* vb)
+{
+ LossRecord* lr_a = *(LossRecord**)va;
+ LossRecord* lr_b = *(LossRecord**)vb;
+ SizeT total_szB_a = lr_a->szB + lr_a->indirect_szB;
+ SizeT total_szB_b = lr_b->szB + lr_b->indirect_szB;
+
+ // First compare by sizes.
+ if (total_szB_a < total_szB_b) return -1;
+ if (total_szB_a > total_szB_b) return 1;
+ // If size are equal, compare by states.
+ if (lr_a->key.state < lr_b->key.state) return -1;
+ if (lr_a->key.state > lr_b->key.state) return 1;
+ return 0;
+}
+
static void print_results(ThreadId tid, Bool is_full_check)
{
- Int i, n_lossrecords;
- LossRecord* lr_list;
- LossRecord* lr;
- Bool is_suppressed;
+ Int i, n_lossrecords;
+ OSet* lr_table;
+ LossRecord** lr_array;
+ LossRecord* lr;
+ Bool is_suppressed;
- // Common up the lost blocks so we can print sensible error messages.
- n_lossrecords = 0;
- lr_list = NULL;
+ // Create the lr_table, which holds the loss records.
+ lr_table =
+ VG_(OSetGen_Create)(offsetof(LossRecord, key),
+ cmp_LossRecordKey_LossRecord,
+ VG_(malloc), "mc.pr.1",
+ VG_(free));
+
+ // Convert the chunks into loss records, merging them where appropriate.
for (i = 0; i < lc_n_chunks; i++) {
- MC_Chunk* ch = lc_chunks[i];
- LC_Extra* ex = &(lc_extras)[i];
+ MC_Chunk* ch = lc_chunks[i];
+ LC_Extra* ex = &(lc_extras)[i];
+ LossRecord* old_lr;
+ LossRecordKey lrkey;
+ lrkey.state = ex->state;
+ lrkey.allocated_at = ch->where;
- // 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),
- lr->allocated_at,
- ch->where) ) {
- break;
- }
- }
- if (lr != NULL) {
- // Similar to a previous loss record; merge.
- lr->num_blocks++;
- lr->szB += ch->szB;
- lr->indirect_szB += ex->indirect_szB;
+ old_lr = VG_(OSetGen_Lookup)(lr_table, &lrkey);
+ if (old_lr) {
+ // We found an existing loss record matching this chunk. Update the
+ // loss record's details in-situ. This is safe because we don't
+ // change the elements used as the OSet key.
+ old_lr->szB += ch->szB;
+ old_lr->indirect_szB += ex->indirect_szB;
+ old_lr->num_blocks++;
} else {
- // Create a new loss record.
- n_lossrecords++;
- 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;
+ // No existing loss record matches this chunk. Create a new loss
+ // record, initialise it from the chunk, and insert it into lr_table.
+ lr = VG_(OSetGen_AllocNode)(lr_table, sizeof(LossRecord));
+ lr->key = lrkey;
+ lr->szB = ch->szB;
+ lr->indirect_szB = ex->indirect_szB;
+ lr->num_blocks = 1;
+ VG_(OSetGen_Insert)(lr_table, lr);
}
}
+ n_lossrecords = VG_(OSetGen_Size)(lr_table);
+ // Create an array of pointers to the loss records.
+ lr_array = VG_(malloc)("mc.pr.2", n_lossrecords * sizeof(LossRecord*));
+ i = 0;
+ VG_(OSetGen_ResetIter)(lr_table);
+ while ( (lr = VG_(OSetGen_Next)(lr_table)) ) {
+ lr_array[i++] = lr;
+ }
+ tl_assert(i == n_lossrecords);
+
+ // Sort the array by loss record sizes.
+ VG_(ssort)(lr_array, n_lossrecords, sizeof(LossRecord*),
+ cmp_LossRecords);
+
+ // Zero totals.
MC_(blocks_leaked) = MC_(bytes_leaked) = 0;
MC_(blocks_indirect) = MC_(bytes_indirect) = 0;
MC_(blocks_dubious) = MC_(bytes_dubious) = 0;
MC_(blocks_reachable) = MC_(bytes_reachable) = 0;
MC_(blocks_suppressed) = MC_(bytes_suppressed) = 0;
- // Print out the loss records and collect summary stats.
+ // Print the loss records (in size order) and collect summary stats.
for (i = 0; i < n_lossrecords; i++) {
- Bool print_record;
- 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(lr_min != NULL);
-
+ Bool print_record;
// Rules for printing:
// - We don't show suppressed loss records ever (and that's controlled
// within the error manager).
@@ -833,38 +865,37 @@
// this is different to "still reachable" used elsewhere because it
// includes indirectly lost blocks!
//
+ lr = lr_array[i];
print_record = is_full_check &&
( MC_(clo_show_reachable) ||
- Unreached == lr_min->state ||
- Possible == lr_min->state );
+ Unreached == lr->key.state ||
+ Possible == lr->key.state );
is_suppressed =
- MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr_min,
- print_record );
+ MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr, print_record );
if (is_suppressed) {
- MC_(blocks_suppressed) += lr_min->num_blocks;
- MC_(bytes_suppressed) += lr_min->szB;
+ MC_(blocks_suppressed) += lr->num_blocks;
+ MC_(bytes_suppressed) += lr->szB;
- } else if (Unreached == lr_min->state) {
- MC_(blocks_leaked) += lr_min->num_blocks;
- MC_(bytes_leaked) += lr_min->szB;
+ } else if (Unreached == lr->key.state) {
+ MC_(blocks_leaked) += lr->num_blocks;
+ MC_(bytes_leaked) += lr->szB;
- } else if (IndirectLeak == lr_min->state) {
- MC_(blocks_indirect) += lr_min->num_blocks;
- MC_(bytes_indirect) += lr_min->szB;
+ } else if (IndirectLeak == lr->key.state) {
+ MC_(blocks_indirect) += lr->num_blocks;
+ MC_(bytes_indirect) += lr->szB;
- } else if (Possible == lr_min->state) {
- MC_(blocks_dubious) += lr_min->num_blocks;
- MC_(bytes_dubious) += lr_min->szB;
+ } else if (Possible == lr->key.state) {
+ MC_(blocks_dubious) += lr->num_blocks;
+ MC_(bytes_dubious) += lr->szB;
- } else if (Reachable == lr_min->state) {
- MC_(blocks_reachable) += lr_min->num_blocks;
- MC_(bytes_reachable) += lr_min->szB;
+ } else if (Reachable == lr->key.state) {
+ MC_(blocks_reachable) += lr->num_blocks;
+ MC_(bytes_reachable) += lr->szB;
} else {
VG_(tool_panic)("unknown loss mode");
}
- lr_min->num_blocks = 0;
}
if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
Added: trunk/memcheck/perf/Makefile.am
===================================================================
--- trunk/memcheck/perf/Makefile.am (rev 0)
+++ trunk/memcheck/perf/Makefile.am 2009-05-06 06:15:55 UTC (rev 9781)
@@ -0,0 +1,11 @@
+
+include $(top_srcdir)/Makefile.tool-tests.am
+
+EXTRA_DIST = \
+ many-loss-records.vgperf
+
+check_PROGRAMS = \
+ many-loss-records
+
+AM_CFLAGS += -O $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += -O $(AM_FLAG_M3264_PRI)
Added: trunk/memcheck/perf/many-loss-records.c
===================================================================
--- trunk/memcheck/perf/many-loss-records.c (rev 0)
+++ trunk/memcheck/perf/many-loss-records.c 2009-05-06 06:15:55 UTC (rev 9781)
@@ -0,0 +1,214 @@
+// Performance test for the leak checker from bug #191182.
+// Nb: it must be run with --leak-resolution=high to show the quadratic
+// behaviour caused by the large number of loss records.
+// By Philippe Waroquiers.
+//
+// On my machine, before being fixed, building the loss record list took about
+// 36 seconds, and sorting + printing it took about 20 seconds. After being
+// fixed it took about 2 seconds, and the leak checking was only a small
+// fraction of that. --njn
+
+#include <malloc.h>
+#include <strings.h>
+#include <stdio.h>
+#include <math.h>
+
+/* parameters */
+
+/* we will create stack_fan_out ^ stack_depth different call stacks */
+int stack_fan_out = 15;
+int stack_depth = 4;
+
+/* for each call stack, allocate malloc_fan blocks */
+int malloc_fan = 4;
+
+/* for each call stack, allocate data structures having malloc_depth
+ indirection at each malloc-ed level */
+int malloc_depth = 2;
+
+/* in addition to the pointer needed to maintain the levels; some more
+ bytes are allocated simulating the data stored in the data structure */
+int malloc_data = 5;
+
+/* every n top blocks, 1 block and all its children will be freed instead of
+ being kept */
+int free_every_n = 2;
+
+/* every n release block operation, 1 block and its children will be leaked */
+int leak_every_n = 250;
+
+
+
+struct Chunk {
+ struct Chunk* child;
+ char s[];
+};
+
+struct Chunk** topblocks;
+int freetop = 0;
+
+/* statistics */
+long total_malloced = 0;
+int blocknr = 0;
+int blockfreed = 0;
+int blockleaked = 0;
+int total_stacks = 0;
+int releaseop = 0;
+
+void free_chunks (struct Chunk ** mem)
+{
+ if (*mem == 0)
+ return;
+
+ free_chunks ((&(*mem)->child));
+
+ blockfreed++;
+ free (*mem);
+ *mem = 0;
+}
+
+void release (struct Chunk ** mem)
+{
+ releaseop++;
+
+ if (releaseop % leak_every_n == 0) {
+ blockleaked++;
+ *mem = 0; // lose the pointer without free-ing the blocks
+ } else {
+ free_chunks (mem);
+ }
+}
+
+void call_stack (int level)
+{
+ int call_fan_out = 1;
+
+ if (level == stack_depth) {
+ int sz = sizeof(struct Chunk*) + malloc_data;
+ int d;
+ int f;
+
+ for (f = 0; f < malloc_fan; f++) {
+ struct Chunk *new = NULL; // shut gcc up
+ struct Chunk *prev = NULL;
+
+ for (d = 0; d < malloc_depth; d++) {
+ new = malloc (sz);
+ total_malloced += sz;
+ blocknr++;
+ new->child = prev;
+ prev = new;
+ }
+ topblocks[freetop] = new;
+
+ if (freetop % free_every_n == 0) {
+ release (&topblocks[freetop]);
+ }
+ freetop++;
+ }
+
+ total_stacks++;
+
+ } else {
+ /* Nb: don't common these up into a loop! We need different code
+ locations to exercise the problem. */
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ call_stack (level + 1);
+ if (call_fan_out == stack_fan_out) return;
+ call_fan_out++;
+
+ printf ("maximum stack_fan_out exceeded\n");
+ }
+}
+
+int main()
+{
+ int d;
+ int stacks = 1;
+ for (d = 0; d < stack_depth; d++)
+ stacks *= stack_fan_out;
+ printf ("will generate %d different stacks\n", stacks);
+ topblocks = malloc(sizeof(struct Chunk*) * stacks * malloc_fan);
+ call_stack (0);
+ printf ("total stacks %d\n", total_stacks);
+ printf ("total bytes malloc-ed: %ld\n", total_malloced);
+ printf ("total blocks malloc-ed: %d\n", blocknr);
+ printf ("total blocks free-ed: %d\n", blockfreed);
+ printf ("total blocks leak-ed: %d\n", blockleaked);
+ return 0;
+}
Added: trunk/memcheck/perf/many-loss-records.vgperf
===================================================================
--- trunk/memcheck/perf/many-loss-records.vgperf (rev 0)
+++ trunk/memcheck/perf/many-loss-records.vgperf 2009-05-06 06:15:55 UTC (rev 9781)
@@ -0,0 +1,2 @@
+prog: many-loss-records
+vgopts: --leak-check=yes --leak-resolution=high
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/tests/Makefile.am 2009-05-06 06:15:55 UTC (rev 9781)
@@ -92,7 +92,7 @@
memalign2.stderr.exp memalign2.vgtest \
memcmptest.stderr.exp memcmptest.stderr.exp2 \
memcmptest.stdout.exp memcmptest.vgtest \
- mempool.stderr.exp mempool.stderr.exp64 mempool.vgtest \
+ mempool.stderr.exp mempool.vgtest \
metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
mismatches.stderr.exp mismatches.vgtest \
mmaptest.stderr.exp mmaptest.vgtest \
Modified: trunk/memcheck/tests/leak-cases-full.stderr.exp
===================================================================
--- trunk/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/tests/leak-cases-full.stderr.exp 2009-05-06 06:15:55 UTC (rev 9781)
@@ -20,28 +20,28 @@
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:78)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:84)
+ by 0x........: f (leak-cases.c:81)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:81)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
16 bytes in 1 blocks are possibly lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: mk (leak-cases.c:52)
- by 0x........: f (leak-cases.c:78)
+ by 0x........: f (leak-cases.c:84)
by 0x........: main (leak-cases.c:107)
@@ -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:91)
+ by 0x........: f (leak-cases.c:76)
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:76)
+ by 0x........: f (leak-cases.c:91)
by 0x........: main (leak-cases.c:107)
Modified: trunk/memcheck/tests/leak-cycle.stderr.exp
===================================================================
--- trunk/memcheck/tests/leak-cycle.stderr.exp 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/tests/leak-cycle.stderr.exp 2009-05-06 06:15:55 UTC (rev 9781)
@@ -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:45)
+ by 0x........: main (leak-cycle.c:44)
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:44)
+ by 0x........: main (leak-cycle.c:45)
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)
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)
Modified: trunk/memcheck/tests/mempool.c
===================================================================
--- trunk/memcheck/tests/mempool.c 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/tests/mempool.c 2009-05-06 06:15:55 UTC (rev 9781)
@@ -14,13 +14,19 @@
{
struct _level_list *next;
char *where;
+ // Padding ensures the struct is the same size on 32-bit and 64-bit
+ // machines.
+ char padding[16 - 2*sizeof(char*)];
} level_list;
typedef struct _pool {
char *mem;
char *where;
+ level_list *levels;
int size, left;
- level_list *levels;
+ // Padding ensures the struct is the same size on 32-bit and 64-bit
+ // machines.
+ char padding[24 - 3*sizeof(char*)];
} pool;
pool *make_pool()
Modified: trunk/memcheck/tests/mempool.stderr.exp
===================================================================
--- trunk/memcheck/tests/mempool.stderr.exp 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/tests/mempool.stderr.exp 2009-05-06 06:15:55 UTC (rev 9781)
@@ -1,60 +1,60 @@
Invalid write of size 1
- at 0x........: test (mempool.c:124)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:130)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 7 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Invalid write of size 1
- at 0x........: test (mempool.c:125)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:131)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 18 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Invalid write of size 1
- at 0x........: test (mempool.c:129)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:135)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 70 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Invalid write of size 1
- at 0x........: test (mempool.c:130)
- by 0x........: main (mempool.c:148)
+ at 0x........: test (mempool.c:136)
+ by 0x........: main (mempool.c:154)
Address 0x........ is 96 bytes inside a block of size 100,000 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:44)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:135)
- by 0x........: main (mempool.c:148)
+ at 0x........: allocate (mempool.c:105)
+ by 0x........: test (mempool.c:121)
+ by 0x........: main (mempool.c:154)
10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:115)
- by 0x........: main (mempool.c:148)
+ at 0x........: allocate (mempool.c:105)
+ by 0x........: test (mempool.c:141)
+ by 0x........: main (mempool.c:154)
20 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:116)
- by 0x........: main (mempool.c:148)
+ at 0x........: allocate (mempool.c:105)
+ by 0x........: test (mempool.c:122)
+ by 0x........: main (mempool.c:154)
-28 (20 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
+48 (32 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:37)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
+ by 0x........: make_pool (mempool.c:43)
+ by 0x........: test (mempool.c:117)
+ by 0x........: main (mempool.c:154)
Deleted: trunk/memcheck/tests/mempool.stderr.exp64
===================================================================
--- trunk/memcheck/tests/mempool.stderr.exp64 2009-05-06 00:41:32 UTC (rev 9780)
+++ trunk/memcheck/tests/mempool.stderr.exp64 2009-05-06 06:15:55 UTC (rev 9781)
@@ -1,60 +0,0 @@
-Invalid write of size 1
- at 0x........: test (mempool.c:124)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 7 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-Invalid write of size 1
- at 0x........: test (mempool.c:125)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 18 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-Invalid write of size 1
- at 0x........: test (mempool.c:129)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 70 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-Invalid write of size 1
- at 0x........: test (mempool.c:130)
- by 0x........: main (mempool.c:148)
- Address 0x........ is 96 bytes inside a block of size 100,000 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:38)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
-
-
-10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:135)
- by 0x........: main (mempool.c:148)
-
-
-10 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:115)
- by 0x........: main (mempool.c:148)
-
-
-20 bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: allocate (mempool.c:99)
- by 0x........: test (mempool.c:116)
- by 0x........: main (mempool.c:148)
-
-
-48 (32 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record ... of ...
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: make_pool (mempool.c:37)
- by 0x........: test (mempool.c:111)
- by 0x........: main (mempool.c:148)
|
|
From: Tom H. <th...@cy...> - 2009-05-06 02:47:07
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-05-06 03:05:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 480 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-05-06 02:30:39
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-05-06 03:10:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 486 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) |
|
From: <sv...@va...> - 2009-05-06 00:41:42
|
Author: njn
Date: 2009-05-06 01:41:32 +0100 (Wed, 06 May 2009)
New Revision: 9780
Log:
Tweak a helgrind suppression. Results in two fewer test failures.
Modified:
branches/DARWIN/darwin9.supp
Modified: branches/DARWIN/darwin9.supp
===================================================================
--- branches/DARWIN/darwin9.supp 2009-05-06 00:26:20 UTC (rev 9779)
+++ branches/DARWIN/darwin9.supp 2009-05-06 00:41:32 UTC (rev 9780)
@@ -143,7 +143,6 @@
{
crude2
Helgrind:Race
- ...
obj:/usr/lib/libSystem.B.dylib
}
# This would be better as "fun:\?\?\?" but string matching doesn't seem to
|
|
From: <sv...@va...> - 2009-05-06 00:34:25
|
Author: njn
Date: 2009-05-06 01:26:20 +0100 (Wed, 06 May 2009)
New Revision: 9779
Log:
Merge r9778 (libhb_core frames simplification) from the trunk.
Modified:
branches/DARWIN/helgrind/libhb_core.c
Modified: branches/DARWIN/helgrind/libhb_core.c
===================================================================
--- branches/DARWIN/helgrind/libhb_core.c 2009-05-05 23:46:24 UTC (rev 9778)
+++ branches/DARWIN/helgrind/libhb_core.c 2009-05-06 00:26:20 UTC (rev 9779)
@@ -2729,7 +2729,8 @@
struct _RCEC* next;
UWord rc;
UWord rcX; /* used for crosschecking */
- UWord frames[1 + N_FRAMES]; /* first word is hash of all the rest */
+ UWord frames_hash; /* hash of all the frames */
+ UWord frames[N_FRAMES];
}
RCEC;
@@ -2741,11 +2742,11 @@
Word i;
tl_assert(ec1 && ec1->magic == RCEC_MAGIC);
tl_assert(ec2 && ec2->magic == RCEC_MAGIC);
- if (ec1->frames[0] < ec2->frames[0]) return -1;
- if (ec1->frames[0] > ec2->frames[0]) return 1;
- for (i = 1; i < 1 + N_FRAMES; i++) {
+ if (ec1->frames_hash < ec2->frames_hash) return -1;
+ if (ec1->frames_hash > ec2->frames_hash) return 1;
+ for (i = 0; i < N_FRAMES; i++) {
if (ec1->frames[i] < ec2->frames[i]) return -1;
- if (ec1->frames[i] > ec2->frames[i]) return 1;
+ if (ec1->frames[i] > ec2->frames[i]) return 1;
}
return 0;
}
@@ -2841,7 +2842,7 @@
/* Search the hash table to see if we already have it. */
stats__ctxt_tab_qs++;
- hent = example->frames[0] % N_RCEC_TAB;
+ hent = example->frames_hash % N_RCEC_TAB;
copy = contextTab[hent];
while (1) {
if (!copy) break;
@@ -2886,13 +2887,13 @@
example.magic = RCEC_MAGIC;
example.rc = 0;
example.rcX = 0;
- main_get_stacktrace( thr, &example.frames[1], N_FRAMES );
+ main_get_stacktrace( thr, &example.frames[0], N_FRAMES );
hash = 0;
- for (i = 1; i < 1 + N_FRAMES; i++) {
+ for (i = 0; i < N_FRAMES; i++) {
hash ^= example.frames[i];
hash = ROLW(hash, 19);
}
- example.frames[0] = hash;
+ example.frames_hash = hash;
return ctxt__find_or_add( &example );
}
@@ -3189,7 +3190,7 @@
tl_assert(cand_rcec->magic == RCEC_MAGIC);
tl_assert(cand_szB >= 1);
*resEC = VG_(make_ExeContext_from_StackTrace)(
- &cand_rcec->frames[1],
+ &cand_rcec->frames[0],
min_UInt(N_FRAMES, VG_(clo_backtrace_size))
);
*resThr = cand_thr;
|