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-08 20:40:09
|
> What about
>
> --leak-resolution=low|med|high precision of stack traces in leak check [high]
For me this is quite clear.
Another alternative would be to use the word differentiation
(because the printed stacks will be precise but not differentiated)
i.e.
--leak-resolution=low|med|high differentiation of stack traces in leak check [high]
Philippe
|
|
From: Naveen K. <g_n...@ya...> - 2009-05-08 18:42:43
|
I dont have the resources to be able to compile it directly on the target right now so I cannot compare the behaviour with this release. Any other suggestions. I ran gdb and this is what I got
-bash-2.05b# gdb /mnt/package/usr/local/valgrind/bin/valgrind
GNU gdb 6.3 (MontaVista 6.3-20.0.79.0601984 2006-11-15)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-montavista-linux"...BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 1634559347 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 1852112942 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 4 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 16 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 2 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 12 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 12 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 8 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 4 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 262144 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 1634559347 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 1852112942 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 4 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 16 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 2 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: no group info for section
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 12 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 12 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 8 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 4 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 262144 >= 0 for section `'
BFD: /mnt/package/usr/local/valgrind/bin/valgrind: invalid string offset 65536 >= 0 for section `.shstrtab'
(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) r
Starting program: /mnt/package/usr/local/valgrind/bin/valgrind
Program received signal SIGSEGV, Segmentation fault.
0x3000a230 in ?? ()
(gdb) bt
#0 0x3000a230 in ?? ()
#1 0x30028004 in ?? ()
#2 0x30003918 in ?? ()
#3 0x3000faa4 in ?? ()
#4 0x30004a94 in ?? ()
#5 0x30004ed4 in ?? ()
#6 0x30010d8c in ?? ()
warning: Previous frame inner to this frame (corrupt stack?)
(gdb)
----- Original Message ----
From: Bart Van Assche <bar...@gm...>
To: Naveen Kumar <g_n...@ya...>
Cc: val...@li...
Sent: Friday, May 8, 2009 1:46:59 PM
Subject: Re: [Valgrind-developers] cross compiling valgrind
On Fri, May 8, 2009 at 3:14 PM, Naveen Kumar <g_n...@ya...> wrote:
> I am trying to run valgrind on my target platform(PPC/440) after cross compiling it and its gives a seg fault. I ran strace but it doesnt give any meaningful info as it faults after the very first execve call. I am guessing this has something to do with the load address of valgrind. Is there any way I can debug this a bit more ?? My configure options are as follows
>
> ./configure --prefix=/usr/local/valgrind --host=powerpc-montavista-linux --build=i386-redhat-linux AR=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ar CC=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-gcc CXX=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-g++ LD=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ld RANLIB=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ranlib LDFLAGS="-L/opt/montavista/cge/devkit/ppc/440/target/usr/lib"
>
> The build itself looks fine and I dont see any build errors or anything amiss. On another note I had long back compiled valgrind directly on target and it had executed fine that time. I am just curious to see why the cross compiling method does not work.
Does Valgrind 3.4.1 work fine when compiled on the target instead of
cross-compiling it ? I'm wondering whether you hit an issue in the
cross-compilation environment.
Bart.
|
|
From: Bart V. A. <bar...@gm...> - 2009-05-08 17:47:02
|
On Fri, May 8, 2009 at 3:14 PM, Naveen Kumar <g_n...@ya...> wrote: > I am trying to run valgrind on my target platform(PPC/440) after cross compiling it and its gives a seg fault. I ran strace but it doesnt give any meaningful info as it faults after the very first execve call. I am guessing this has something to do with the load address of valgrind. Is there any way I can debug this a bit more ?? My configure options are as follows > > ./configure --prefix=/usr/local/valgrind --host=powerpc-montavista-linux --build=i386-redhat-linux AR=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ar CC=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-gcc CXX=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-g++ LD=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ld RANLIB=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ranlib LDFLAGS="-L/opt/montavista/cge/devkit/ppc/440/target/usr/lib" > > The build itself looks fine and I dont see any build errors or anything amiss. On another note I had long back compiled valgrind directly on target and it had executed fine that time. I am just curious to see why the cross compiling method does not work. Does Valgrind 3.4.1 work fine when compiled on the target instead of cross-compiling it ? I'm wondering whether you hit an issue in the cross-compilation environment. Bart. |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-08 17:30:54
|
Nightly build on ocean32 ( Ubuntu 9.04, Intel x86-64 (32-bit only) ) started at 2009-05-09 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-09 03:17:14.000000000 +1000
+++ stack_switch.stderr.out 2009-05-09 03:28:47.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-09 03:17:24.000000000 +1000
+++ origin1-yes.stderr.out 2009-05-09 03:29:05.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-09 03:17:24.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-09 03:29:10.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-09 03:17:24.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-09 03:29:10.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-09 03:17:24.000000000 +1000
+++ origin5-bz2.stderr.out 2009-05-09 03:29:10.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-09 03:19:13.000000000 +1000
+++ mremap2.stdout.out 2009-05-09 03:30:17.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-09 03:19:13.000000000 +1000
+++ mremap2.stdout.out 2009-05-09 03:30:17.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-09 03:19:13.000000000 +1000
+++ mremap2.stdout.out 2009-05-09 03:30:17.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-09 03:19:25.000000000 +1000
+++ shell.stderr.out 2009-05-09 03:30:33.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-09 03:19:25.000000000 +1000
+++ shell.stderr.out 2009-05-09 03:30:33.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-09 03:19:25.000000000 +1000
+++ shell.stdout.out 2009-05-09 03:30:33.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-09 03:19:25.000000000 +1000
+++ shell_valid1.stderr.out 2009-05-09 03:30:33.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-09 03:19:25.000000000 +1000
+++ shell_valid2.stderr.out 2009-05-09 03:30:33.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-09 03:19:25.000000000 +1000
+++ shell_valid3.stderr.out 2009-05-09 03:30:33.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-08 16:32:18
|
Nightly build on ocean ( Ubuntu 9.04, Intel x86-64 ) started at 2009-05-09 02:00:01 EST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 485 tests, 0 stderr failures, 2 stdout failures, 0 post failures == drd/tests/pth_detached_sem (stdout) none/tests/linux/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 485 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat May 9 02:12:43 2009 --- new.short Sat May 9 02:32:13 2009 *************** *** 8,10 **** ! == 485 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) --- 8,11 ---- ! == 485 tests, 0 stderr failures, 2 stdout failures, 0 post failures == ! drd/tests/pth_detached_sem (stdout) none/tests/linux/mremap2 (stdout) ================================================= ./valgrind/drd/tests/pth_detached_sem.stdout.diff ================================================= --- pth_detached_sem.stdout.exp 2009-05-09 02:17:49.000000000 +1000 +++ pth_detached_sem.stdout.out 2009-05-09 02:27:48.000000000 +1000 @@ -1 +1 @@ -.................... +........... ================================================= ./valgrind/none/tests/linux/mremap2.stdout.diff ================================================= --- mremap2.stdout.exp 2009-05-09 02:16:52.000000000 +1000 +++ mremap2.stdout.out 2009-05-09 02:31:41.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-09 02:16:52.000000000 +1000 +++ mremap2.stdout.out 2009-05-09 02:31:41.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-09 02:16:52.000000000 +1000 +++ mremap2.stdout.out 2009-05-09 02:31:41.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: Naveen K. <g_n...@ya...> - 2009-05-08 16:07:44
|
-bash-2.05b# valgrind
Segmentation fault
-bash-2.05b# valgrind -v -d
Segmentation fault
-bash-2.05b# strace valgrind
execve("/mnt/package/usr/local/valgrind/bin/valgrind", ["/mnt/package/usr/local/valgrind/"...], [/* 14 vars */]) = 0
uname({sys="Linux", node="msat", ...}) = 0
brk(0) = 0x10015000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30018000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
----- Original Message ----
From: Bart Van Assche <bar...@gm...>
To: Naveen Kumar <g_n...@ya...>
Sent: Friday, May 8, 2009 11:30:56 AM
Subject: Re: [Valgrind-developers] cross compiling valgrind
On Fri, May 8, 2009 at 5:24 PM, Naveen Kumar <g_n...@ya...> wrote:
> I am using 3.4.1.
Which output do you get when you enable the -v and -d options, e.g.
for the command "valgrind -v -d --tool=none /bin/date" ?
Bart.
|
|
From: Vince W. <vi...@cs...> - 2009-05-08 16:02:44
|
On Fri, 8 May 2009, Nicholas Nethercote wrote: > Hopefully that'll work. I'm not sure about the linking step... but > the various variables with LDFLAGS in their names should control that. I found a workaround. If I keep using gcc for compiling/linking but add the following options: AM_CCASFLAGS += -ffreestanding LDFLAGS += -nostartfiles -nodefaultlibs Then gcc can build the assembly without any overhead. Thanks for the help Vince |
|
From: Naveen K. <g_n...@ya...> - 2009-05-08 15:25:02
|
I am using 3.4.1.
----- Original Message ----
From: Bart Van Assche <bar...@gm...>
To: Naveen Kumar <g_n...@ya...>
Cc: val...@li...
Sent: Friday, May 8, 2009 9:28:32 AM
Subject: Re: [Valgrind-developers] cross compiling valgrind
On Fri, May 8, 2009 at 3:14 PM, Naveen Kumar <g_n...@ya...> wrote:
> I am trying to run valgrind on my target platform(PPC/440) after cross compiling it and its gives a seg fault. I ran strace but it doesnt give any meaningful info as it faults after the very first execve call. I am guessing this has something to do with the load address of valgrind. Is there any way I can debug this a bit more ?? My configure options are as follows
>
> ./configure --prefix=/usr/local/valgrind --host=powerpc-montavista-linux --build=i386-redhat-linux AR=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ar CC=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-gcc CXX=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-g++ LD=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ld RANLIB=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ranlib LDFLAGS="-L/opt/montavista/cge/devkit/ppc/440/target/usr/lib"
>
> The build itself looks fine and I dont see any build errors or anything amiss. On another note I had long back compiled valgrind directly on target and it had executed fine that time. I am just curious to see why the cross compiling method does not work.
Which Valgrind version are you using ? This issue should have been
fixed in Valgrind 3.4.0.
Bart.
|
|
From: Bart V. A. <bar...@gm...> - 2009-05-08 13:28:44
|
On Fri, May 8, 2009 at 3:14 PM, Naveen Kumar <g_n...@ya...> wrote: > I am trying to run valgrind on my target platform(PPC/440) after cross compiling it and its gives a seg fault. I ran strace but it doesnt give any meaningful info as it faults after the very first execve call. I am guessing this has something to do with the load address of valgrind. Is there any way I can debug this a bit more ?? My configure options are as follows > > ./configure --prefix=/usr/local/valgrind --host=powerpc-montavista-linux --build=i386-redhat-linux AR=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ar CC=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-gcc CXX=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-g++ LD=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ld RANLIB=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ranlib LDFLAGS="-L/opt/montavista/cge/devkit/ppc/440/target/usr/lib" > > The build itself looks fine and I dont see any build errors or anything amiss. On another note I had long back compiled valgrind directly on target and it had executed fine that time. I am just curious to see why the cross compiling method does not work. Which Valgrind version are you using ? This issue should have been fixed in Valgrind 3.4.0. Bart. |
|
From: Naveen K. <g_n...@ya...> - 2009-05-08 13:15:00
|
Hi
I am trying to run valgrind on my target platform(PPC/440) after cross compiling it and its gives a seg fault. I ran strace but it doesnt give any meaningful info as it faults after the very first execve call. I am guessing this has something to do with the load address of valgrind. Is there any way I can debug this a bit more ?? My configure options are as follows
./configure --prefix=/usr/local/valgrind --host=powerpc-montavista-linux --build=i386-redhat-linux AR=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ar CC=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-gcc CXX=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-g++ LD=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ld RANLIB=/opt/montavista/cge/devkit/ppc/440/bin/ppc_440-ranlib LDFLAGS="-L/opt/montavista/cge/devkit/ppc/440/target/usr/lib"
The build itself looks fine and I dont see any build errors or anything amiss. On another note I had long back compiled valgrind directly on target and it had executed fine that time. I am just curious to see why the cross compiling method does not work.
Naveen
|
|
From: <sv...@va...> - 2009-05-08 11:53:45
|
Author: sewardj Date: 2009-05-08 12:53:38 +0100 (Fri, 08 May 2009) New Revision: 9801 Log: Make a copy of trunk r9800, to be used for tidying up and extensions to the (overgrown and crufty) message-output mechanisms. Added: branches/MESSAGING_TIDYUP/ Copied: branches/MESSAGING_TIDYUP (from rev 9800, trunk) Property changes on: branches/MESSAGING_TIDYUP ___________________________________________________________________ Name: svn:ignore + acinclude.m4 aclocal.m4 autom4te-*.cache autom4te.cache bin cachegrind cachegrind.out.* compile config.guess config.h* config.log config.status config.sub configure default.supp glibc-2.X.supp depcomp include .in_place install-sh lib Makefile Makefile.in missing mkinstalldirs share stamp-h* svn-commit.tmp svn-commit.2.tmp valgrind valgrind.pc valgrind.spec valt_load_address*.lds vg_annotate vg_cachegen Name: svn:externals + VEX svn://svn.valgrind.org/vex/trunk Name: svn:mergeinfo + |
|
From: Filipe C. <fi...@gm...> - 2009-05-08 07:46:56
|
Hi, Valgrind won't call tool functions for it's own system calls, only for the process client... Doesn't the --trace-syscalls=yes option make what you want? Or do you want to expand on it afterwards? Regards, Filipe sahannum wrote: > Thanks in advance for reading through this. > > I've read through the documentation (with particular focus on the "How to > build a tool" section), read through some of the papers, and spent a lot of > time fishing through the comments in the headers and Memcheck, as well as > the source code to Flayer. > (http://www.usenix.org/events/woot07/tech/full_papers/drewry/drewry_html/ ) > > My short-term goal here is to mimic the functionality of strace and list the > system calls that a target process makes during run-time. For my first step > I used VG_(needs_syscall_wrapper) and wrote the post_syscall function to > simply print something each time it's called (just a "hello" and a counter, > basically). What I found was that strace run on date reports me 51 system > calls, and my little valgrind tool reports 141 system calls...which implies > that valgrind is calling my function both for date's system calls and its > own system calls (or at least its own system calls, perhaps at the exclusion > of date?)...I'm not sure. > > My questions for you all: > - How can I get a pointer to the system call that has triggered the wrapper > functions? Ideally, how might I get the name of that system call? > - How can I tell whether the system call was in relation to Valgrind or the > target process? > > If anyone can either point me to example source, a paper, or anything that > might get me looking in the right places, I would be very grateful. As it > stands I am trying to reverse engineer what I'm looking for digging through > Flayer and Memcheck; my answers may lie there, but I have yet to find them. > > Thanks again, in advance. |
|
From: <sv...@va...> - 2009-05-08 06:51:51
|
Author: njn
Date: 2009-05-08 07:51:39 +0100 (Fri, 08 May 2009)
New Revision: 9800
Log:
Add "GrP" or "DDD" to all the Darwin-specific "fixme" comments, so they're
easy to find.
Modified:
branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S
branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
branches/DARWIN/coregrind/m_ume/macho.c
branches/DARWIN/coregrind/pub_core_threadstate.h
branches/DARWIN/coregrind/vg_preloaded.c
Modified: branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -745,18 +745,18 @@
static vki_malloc_zone_t vg_default_zone = {
NULL, // reserved
NULL, // reserved
- NULL, // fixme malloc_size
+ NULL, // GrP fixme malloc_size
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_malloc),
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_calloc),
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_valloc),
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_free),
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_realloc),
- NULL, // fixme destroy
+ NULL, // GrP fixme destroy
"ValgrindMallocZone",
NULL, // batch_malloc
NULL, // batch_free
- NULL, // fixme introspect
- 2, // version (fixme 3?)
+ NULL, // GrP fixme introspect
+ 2, // version (GrP fixme 3?)
// DDD: this field exists in Mac OS 10.6, but not 10.5.
#if 0
(void*)VG_REPLACE_FUNCTION_ZU(VG_Z_LIBC_SONAME, malloc_zone_memalign)
Modified: branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S 2009-05-08 06:51:39 UTC (rev 9800)
@@ -97,13 +97,13 @@
/* Set the signal mask which should be current during the syscall. */
/* GrP fixme signals
- JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
+ DDD: JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
movq $__NR_rt_sigprocmask, %rax // syscall #
movq $VKI_SIG_SETMASK, %rdi // how
movq -24(%rbp), %rsi // sysmask
movq -32(%rbp), %rdx // postmask
movq -40(%rbp), %r10 // sigsetSzB in r10 not rcx
- fixme return address
+ DDD: fixme return address
syscall
jnc 7f // sigprocmask failed
@@ -160,7 +160,7 @@
L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall
is complete and we needn't worry about it. */
/* GrP fixme signals
- JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
+ DDD: JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
PUSH_di_si_dx_cx_8
movq $__NR_rt_sigprocmask, %rax // syscall #
@@ -168,7 +168,7 @@
movq %rcx, %rsi // postmask
xorq %rdx, %rdx // NULL
movq %r8, %r10 // sigsetSzB
- fixme return address
+ DDD: fixme return address
syscall
POP_di_si_dx_cx_8
@@ -183,7 +183,7 @@
/* GrP fixme signals
L_$0_7: // failure: return 0x8000 | error code
- fixme return value
+ DDD: fixme return value
movq %rbp, %rsp
popq %rbp
ret
Modified: branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S 2009-05-08 06:51:39 UTC (rev 9800)
@@ -133,7 +133,7 @@
or was interrupted and the kernel was restarting it. */
L_$0_2:
.if $0 == UNIX
- int $$0x80 /* UNIX (fixme should be sysenter?) */
+ int $$0x80 /* UNIX (GrP fixme should be sysenter?) */
.elseif $0 == MACH
int $$0x81
.elseif $0 == MDEP
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -81,7 +81,7 @@
mach->__r13 = vex->guest_R13;
mach->__r14 = vex->guest_R14;
mach->__r15 = vex->guest_R15;
- /* fixme
+ /* GrP fixme
mach->__cs = vex->guest_CS;
mach->__fs = vex->guest_FS;
mach->__gs = vex->guest_GS;
@@ -144,7 +144,7 @@
vex->guest_R13 = mach->__r13;
vex->guest_R14 = mach->__r14;
vex->guest_R15 = mach->__r15;
- /* fixme
+ /* GrP fixme
vex->guest_CS = mach->__cs;
vex->guest_FS = mach->__fs;
vex->guest_GS = mach->__gs;
@@ -430,19 +430,19 @@
tst->client_stack_highest_word = stack+stacksize;
tst->client_stack_szB = stacksize;
- // fixme scheduler lock?!
+ // GrP fixme scheduler lock?!
// pthread structure
ML_(notify_aspacem_and_tool_of_mmap)
(stack+stacksize, pthread_structsize,
VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_PRIVATE, -1, 0);
// stack contents
- // fixme uninitialized!
+ // GrP fixme uninitialized!
ML_(notify_aspacem_and_tool_of_mmap)
(stack, stacksize,
VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_PRIVATE, -1, 0);
// guard page
- // fixme ban_mem_stack!
+ // GrP fixme ban_mem_stack!
ML_(notify_aspacem_and_tool_of_mmap)
(stack-VKI_PAGE_SIZE, VKI_PAGE_SIZE,
0, VKI_MAP_PRIVATE, -1, 0);
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -256,7 +256,7 @@
tst->status = VgTs_Empty;
// GrP fixme race here! new thread may claim this V thread stack
// before we get out here!
- // fixme use bsdthread_terminate for safe cleanup?
+ // GrP fixme use bsdthread_terminate for safe cleanup?
mach_msg(&msg, MACH_SEND_MSG|MACH_MSG_OPTION_NONE,
sizeof(msg), 0, 0, MACH_MSG_TIMEOUT_NONE, 0);
@@ -1466,8 +1466,8 @@
switch (ARG1) {
case VKI_WQOPS_QUEUE_ADD:
case VKI_WQOPS_QUEUE_REMOVE:
- // fixme need anything here?
- // fixme may block?
+ // GrP fixme need anything here?
+ // GrP fixme may block?
break;
case VKI_WQOPS_THREAD_RETURN: {
@@ -1483,7 +1483,7 @@
// to a strange address.
ThreadState *tst = VG_(get_ThreadState)(tid);
tst->os_state.wq_jmpbuf_valid = True;
- *flags |= SfMayBlock; // fixme true?
+ *flags |= SfMayBlock; // GrP fixme true?
break;
}
@@ -1893,12 +1893,12 @@
PRE(sys_accessx)
{
- // fixme difficult
+ // GrP fixme difficult
}
POST(sys_accessx)
{
- // fixme
+ // GrP fixme
}
PRE(sys_chflags)
@@ -1907,7 +1907,7 @@
PRE_REG_READ2(int, "chflags", const char *,path, unsigned int,flags);
PRE_MEM_RASCIIZ("chflags(path)", ARG1);
- // fixme sanity-check flags value?
+ // GrP fixme sanity-check flags value?
}
PRE(sys_fchflags)
@@ -1915,7 +1915,7 @@
PRINT("sys_fchflags ( %ld, %lu )", ARG1, ARG2);
PRE_REG_READ2(int, "fchflags", int,fd, unsigned int,flags);
- // fixme sanity-check flags value?
+ // GrP fixme sanity-check flags value?
}
POST(sys_stat64)
@@ -2997,7 +2997,7 @@
case VKI_A_GETFSIZE:
case VKI_A_GETCOND:
// kernel writes data..data+length
- // fixme be precise about what gets written
+ // GrP fixme be precise about what gets written
PRE_MEM_WRITE("auditon(data)", ARG2, ARG3);
break;
@@ -3006,7 +3006,7 @@
case VKI_A_GETPINFO:
case VKI_A_GETPINFO_ADDR:
// kernel reads and writes data..data+length
- // fixme be precise about what gets read and written
+ // GrP fixme be precise about what gets read and written
PRE_MEM_READ("auditon(data)", ARG2, ARG3);
PRE_MEM_WRITE("auditon(data)", ARG2, ARG3);
break;
@@ -3048,7 +3048,7 @@
case VKI_A_GETFSIZE:
case VKI_A_GETCOND:
// kernel writes data..data+length
- // fixme be precise about what gets written
+ // GrP fixme be precise about what gets written
POST_MEM_WRITE(ARG2, ARG3);
break;
@@ -3057,7 +3057,7 @@
case VKI_A_GETPINFO:
case VKI_A_GETPINFO_ADDR:
// kernel reads and writes data..data+length
- // fixme be precise about what gets read and written
+ // GrP fixme be precise about what gets read and written
POST_MEM_WRITE(ARG2, ARG3);
break;
@@ -3149,7 +3149,7 @@
VG_(printf)("]");
}
- // fixme intercept KERN_PROCARGS and KERN_PROC_PID for our pid
+ // GrP fixme intercept KERN_PROCARGS and KERN_PROC_PID for our pid
// (executable path and arguments and environment
{
@@ -3701,7 +3701,7 @@
name_for_port(req->notify_port.name));
}
- // fixme only do this on success
+ // GrP fixme only do this on success
assign_port_name(req->notify_port.name, "host_notify-%p");
}
@@ -4087,7 +4087,7 @@
POST(mach_port_request_notification)
{
- // fixme port tracker? not sure
+ // GrP fixme port tracker? not sure
}
@@ -4114,14 +4114,14 @@
AFTER = POST_FN(mach_port_insert_right);
if (MACH_REMOTE == mach_task_self()) {
- // fixme import_complex_message handles everything?
+ // GrP fixme import_complex_message handles everything?
// what about export_complex_message for MOVE variants?
} else {
VG_(printf)("UNKNOWN mach_port_insert_right into remote task!\n");
- // fixme also may remove rights from this task?
+ // GrP fixme also may remove rights from this task?
}
- // fixme port tracker?
+ // GrP fixme port tracker?
}
POST(mach_port_insert_right)
@@ -4200,7 +4200,7 @@
AFTER = POST_FN(mach_port_insert_member);
- // fixme port tracker?
+ // GrP fixme port tracker?
}
POST(mach_port_insert_member)
@@ -5106,7 +5106,7 @@
name_for_port(MACH_REMOTE),
req->address, req->control, req->state);
- // fixme verify address?
+ // GrP fixme verify address?
AFTER = POST_FN(vm_purgable_control);
}
@@ -5149,7 +5149,7 @@
name_for_port(MACH_REMOTE),
(unsigned long long)req->address, req->control, req->state);
- // fixme verify address?
+ // GrP fixme verify address?
AFTER = POST_FN(mach_vm_purgable_control);
}
@@ -5382,7 +5382,7 @@
if (!reply->RetCode) {
// no V-visible side effects
- // fixme except maybe fork/exec
+ // GrP fixme except maybe fork/exec
} else {
PRINT("mig return %d", reply->RetCode);
}
@@ -5547,7 +5547,7 @@
PRINT("got region at 0x%llx, size %llu, depth %u, count %u",
reply->address, reply->size,
reply->nesting_depth, reply->infoCnt);
- // fixme mark info contents beyond infoCnt as bogus
+ // GrP fixme mark info contents beyond infoCnt as bogus
} else {
PRINT("mig return %d", reply->RetCode);
}
@@ -5715,8 +5715,8 @@
semaphore_destroy(mach_task_self(), tst->os_state.child_go);
semaphore_destroy(mach_task_self(), tst->os_state.child_done);
- // fixme semaphore destroy needed when thread creation fails
- // fixme probably other cleanup too
+ // GrP fixme semaphore destroy needed when thread creation fails
+ // GrP fixme probably other cleanup too
// DDD: I'm not at all sure this is the right spot for this. It probably
// should be in pthread_hijack instead, just before the call to
@@ -5737,7 +5737,7 @@
mach_port_t,"kport", mach_port_t,"joinsem");
// Free memory and signal semaphore.
- // fixme errors?
+ // GrP fixme errors?
if (ARG4) semaphore_signal((semaphore_t)ARG4);
if (ARG1 && ARG2) {
ML_(notify_aspacem_and_tool_of_munmap)(ARG1, ARG2);
@@ -5866,7 +5866,7 @@
POST(thread_info)
{
- // fixme mark unused parts of thread_info_out as uninitialized?
+ // GrP fixme mark unused parts of thread_info_out as uninitialized?
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -537,7 +537,7 @@
// syscall = Unix, 32-bit result
// OR Mach, 32-bit result
if (canonical->sysno >= 0) {
- // fixme hack I386_SYSCALL_NUMBER_MASK
+ // GrP fixme hack I386_SYSCALL_NUMBER_MASK
canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(canonical->sysno
& 0xffff);
} else {
@@ -935,7 +935,7 @@
OFFSET_x86_EDX, sizeof(UInt) );
LibVEX_GuestX86_put_eflag_c( sres._mode==SysRes_UNIX_ERR ? 1 : 0,
gst );
- // fixme sets defined for entire eflags, not just bit c
+ // GrP fixme sets defined for entire eflags, not just bit c
// DDD: this breaks exp-ptrcheck.
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
offsetof(VexGuestX86State, guest_CC_DEP1), sizeof(UInt) );
@@ -968,7 +968,7 @@
OFFSET_amd64_RDX, sizeof(ULong) );
LibVEX_GuestAMD64_put_rflag_c( sres._mode==SysRes_UNIX_ERR ? 1 : 0,
gst );
- // fixme sets defined for entire rflags, not just bit c
+ // GrP fixme sets defined for entire rflags, not just bit c
// DDD: this breaks exp-ptrcheck.
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
offsetof(VexGuestAMD64State, guest_CC_DEP1), sizeof(ULong) );
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -459,19 +459,19 @@
tst->client_stack_highest_word = stack+stacksize;
tst->client_stack_szB = stacksize;
- // fixme scheduler lock?!
+ // GrP fixme scheduler lock?!
// pthread structure
ML_(notify_aspacem_and_tool_of_mmap)
(stack+stacksize, pthread_structsize,
VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_PRIVATE, -1, 0);
// stack contents
- // fixme uninitialized!
+ // GrP fixme uninitialized!
ML_(notify_aspacem_and_tool_of_mmap)
(stack, stacksize,
VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_PRIVATE, -1, 0);
// guard page
- // fixme ban_mem_stack!
+ // GrP fixme ban_mem_stack!
ML_(notify_aspacem_and_tool_of_mmap)
(stack-VKI_PAGE_SIZE, VKI_PAGE_SIZE,
0, VKI_MAP_PRIVATE, -1, 0);
Modified: branches/DARWIN/coregrind/m_ume/macho.c
===================================================================
--- branches/DARWIN/coregrind/m_ume/macho.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/m_ume/macho.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -204,7 +204,7 @@
}
// Get desired memory protection
- // fixme need maxprot too
+ // GrP fixme need maxprot too
prot = (((segcmd->initprot & VM_PROT_READ) ? VKI_PROT_READ : 0) |
((segcmd->initprot & VM_PROT_WRITE) ? VKI_PROT_WRITE : 0) |
((segcmd->initprot & VM_PROT_EXECUTE) ? VKI_PROT_EXEC : 0));
Modified: branches/DARWIN/coregrind/pub_core_threadstate.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_threadstate.h 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/pub_core_threadstate.h 2009-05-08 06:51:39 UTC (rev 9800)
@@ -167,7 +167,7 @@
// Workqueue re-entry
// (setjmp in PRE(workq_ops), longjmp in wqthread_hijack)
- // JRS fixme: this comment is no longer correct; wq_jmpbuf is
+ // DDD: JRS fixme: this comment is no longer correct; wq_jmpbuf is
// never used, and there is no such setjmp or longjmp pair.
// I guess we could leave wq_jmpbuf_valid in place though, since
// it does allow for an assertion in ML_(wqthread_continue_NORETURN).
Modified: branches/DARWIN/coregrind/vg_preloaded.c
===================================================================
--- branches/DARWIN/coregrind/vg_preloaded.c 2009-05-08 06:40:58 UTC (rev 9799)
+++ branches/DARWIN/coregrind/vg_preloaded.c 2009-05-08 06:51:39 UTC (rev 9800)
@@ -52,7 +52,7 @@
------------------------------------------------------------------ */
#if !defined(VGO_darwin)
-// GrP fixme
+// GrP GrP fixme
void VG_NOTIFY_ON_LOAD(freeres)( void );
void VG_NOTIFY_ON_LOAD(freeres)( void )
@@ -94,7 +94,7 @@
#include <string.h>
#include <crt_externs.h>
-// fixme copied from m_libcproc
+// GrP fixme copied from m_libcproc
static void env_unsetenv ( Char **env, const Char *varname )
{
Char **from;
@@ -151,7 +151,7 @@
void VG_REPLACE_FUNCTION_ZU(libSystemZdZaZddylib, arc4random_addrandom)(unsigned char *dat, int datlen)
{
// do nothing
- // fixme ought to check [dat..dat+datlen) is defined
+ // GrP fixme ought to check [dat..dat+datlen) is defined
// but don't care if it's initialized
}
|
|
From: <sv...@va...> - 2009-05-08 06:41:03
|
Author: njn
Date: 2009-05-08 07:40:58 +0100 (Fri, 08 May 2009)
New Revision: 9799
Log:
Almost fix a layering violation in aspacem; just have to decide what to do
about VG_(sync_mappings) and parse_procselfmaps().
Also converted some 4-space indents to 3-space.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-08 01:49:13 UTC (rev 9798)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-05-08 06:40:58 UTC (rev 9799)
@@ -3329,15 +3329,33 @@
extern void ML_(notify_aspacem_and_tool_of_mmap)
( Addr a, SizeT len, UInt prot, UInt flags, Int fd, Off64T offset );
extern void ML_(notify_aspacem_and_tool_of_munmap) ( Addr a, SizeT len );
-static const HChar *sync_mapping_when;
-static const HChar *sync_mapping_where;
+
+typedef
+ struct {
+ Bool is_added; // Added or removed seg?
+ Addr start;
+ SizeT end;
+ UInt prot; // Not used for removed segs.
+ Off64T offset; // Not used for removed segs.
+ }
+ ChangedSeg;
+
+// I haven't seen more than 1 segment be added or removed in a single calls to
+// VG_(sync_mappings). So 20 seems generous. However, if it needs to be made
+// larger, we know that it'll never need to be larger than 'segnames_used', so
+// an array of that size could be dynamically allocated in VG_(sync_mappings).
+// --njn
+#define CHANGED_SEGS_SIZE 20
+static ChangedSeg changed_segs[CHANGED_SEGS_SIZE];
+static Int changed_segs_used;
+
static void add_mapping_callback(Addr addr, SizeT len, UInt prot,
ULong dev, ULong ino, Off64T offset,
const UChar *filename)
{
// derived from sync_check_mapping_callback()
- Int iLo, iHi, i;
+ Int iLo, iHi, i;
if (len == 0) return;
@@ -3355,45 +3373,48 @@
UInt seg_prot;
if (nsegments[i].kind == SkAnonV || nsegments[i].kind == SkFileV) {
- /* Ignore V regions */
- continue;
+ /* Ignore V regions */
+ continue;
}
else if (nsegments[i].kind == SkFree || nsegments[i].kind == SkResvn) {
/* Add mapping for SkResvn regions */
- if (VG_(clo_trace_syscalls))
- VG_(debugLog)(0,"aspacem","\nadded region %p..%p at %s (%s)",
- (void*)addr, (void*)(addr+len),
- sync_mapping_where,
- sync_mapping_when);
- ML_(notify_aspacem_and_tool_of_mmap)
- (addr, len, prot, VKI_MAP_PRIVATE, 0, offset);
- return;
- }
- else if (nsegments[i].kind == SkAnonC || nsegments[i].kind == SkFileC
- || nsegments[i].kind == SkShmC) {
- /* Check permissions on client regions */
- // fixme
- seg_prot = 0;
- if (nsegments[i].hasR) seg_prot |= VKI_PROT_READ;
- if (nsegments[i].hasW) seg_prot |= VKI_PROT_WRITE;
-# if defined(VGA_x86)
- // fixme sloppyXcheck
- // darwin: kernel X ignored and spuriously changes? (vm_copy)
- seg_prot |= (prot & VKI_PROT_EXEC);
-# else
- if (nsegments[i].hasX) seg_prot |= VKI_PROT_EXEC;
-# endif
- if (seg_prot != prot) {
- if (VG_(clo_trace_syscalls))
- VG_(debugLog)(0,"aspacem","\nregion %p..%p permission "
- "mismatch (kernel %x, V %x)",
- (void*)nsegments[i].start,
- (void*)(nsegments[i].end+1), prot, seg_prot);
- }
+ ChangedSeg* cs = &changed_segs[changed_segs_used];
+ aspacem_assert(changed_segs_used < CHANGED_SEGS_SIZE);
+ cs->is_added = True;
+ cs->start = addr;
+ cs->end = addr + len - 1;
+ cs->prot = prot;
+ cs->offset = offset;
+ changed_segs_used++;
+ return;
+
+ } else if (nsegments[i].kind == SkAnonC ||
+ nsegments[i].kind == SkFileC ||
+ nsegments[i].kind == SkShmC)
+ {
+ /* Check permissions on client regions */
+ // GrP fixme
+ seg_prot = 0;
+ if (nsegments[i].hasR) seg_prot |= VKI_PROT_READ;
+ if (nsegments[i].hasW) seg_prot |= VKI_PROT_WRITE;
+# if defined(VGA_x86)
+ // GrP fixme sloppyXcheck
+ // darwin: kernel X ignored and spuriously changes? (vm_copy)
+ seg_prot |= (prot & VKI_PROT_EXEC);
+# else
+ if (nsegments[i].hasX) seg_prot |= VKI_PROT_EXEC;
+# endif
+ if (seg_prot != prot) {
+ if (VG_(clo_trace_syscalls))
+ VG_(debugLog)(0,"aspacem","\nregion %p..%p permission "
+ "mismatch (kernel %x, V %x)",
+ (void*)nsegments[i].start,
+ (void*)(nsegments[i].end+1), prot, seg_prot);
+ }
+
+ } else {
+ aspacem_assert(0);
}
- else {
- aspacem_assert(0);
- }
}
}
@@ -3412,20 +3433,18 @@
iLo = find_nsegment_idx( addr );
iHi = find_nsegment_idx( addr + len - 1 );
- /* NSegments iLo .. iHi inclusive should agree with the presented
- data. */
+ /* NSegments iLo .. iHi inclusive should agree with the presented data. */
for (i = iLo; i <= iHi; i++) {
if (nsegments[i].kind != SkFree && nsegments[i].kind != SkResvn) {
// V has a mapping, kernel doesn't
- if (VG_(clo_trace_syscalls))
- VG_(debugLog)(0,"aspacem","\nremoved region 0x%010llx..0x%010llx"
- " at %s (%s)",
- (ULong)nsegments[i].start,
- (ULong)(nsegments[i].end+1),
- sync_mapping_where,
- sync_mapping_when);
- ML_(notify_aspacem_and_tool_of_munmap)
- (nsegments[i].start, 1+(nsegments[i].end-nsegments[i].start));
+ ChangedSeg* cs = &changed_segs[changed_segs_used];
+ aspacem_assert(changed_segs_used < CHANGED_SEGS_SIZE);
+ cs->is_added = False;
+ cs->start = nsegments[i].start;
+ cs->end = nsegments[i].end;
+ cs->prot = 0;
+ cs->offset = 0;
+ changed_segs_used++;
return;
}
}
@@ -3434,18 +3453,44 @@
void VG_(sync_mappings)(const HChar *when, const HChar *where, Int num)
{
+ Int i;
static UInt stats_synccalls = 1;
- sync_mapping_when = when ?: "?";
- sync_mapping_where = where ?: "?";
- parse_procselfmaps(&add_mapping_callback, &remove_mapping_callback);
+ aspacem_assert(when && where);
+
if (0)
VG_(debugLog)(0,"aspacem",
"[%u,%u] VG_(sync_mappings)(%s, %s, %d)\n",
stats_synccalls++, stats_machcalls, when, where, num
);
+
+ changed_segs_used = 0;
+
+ // Get the list of segs that need to be added/removed.
+ parse_procselfmaps(&add_mapping_callback, &remove_mapping_callback);
+
+ // Now add/remove them.
+ for (i = 0; i < changed_segs_used; i++) {
+ ChangedSeg* cs = &changed_segs[i];
+ Char* action;
+ if (cs->is_added) {
+ ML_(notify_aspacem_and_tool_of_mmap)(
+ cs->start, cs->end - cs->start + 1,
+ cs->prot, VKI_MAP_PRIVATE, 0, cs->offset);
+ action = "added";
+
+ } else {
+ ML_(notify_aspacem_and_tool_of_munmap)(
+ cs->start, cs->end - cs->start + 1);
+ action = "removed";
+ }
+ if (VG_(clo_trace_syscalls)) {
+ VG_(debugLog)(0, "aspacem",
+ "\n%s region 0x%010lx..0x%010lx at %s (%s)",
+ action, cs->start, cs->end + 1, where, when);
+ }
+ }
}
-
#endif
/*--------------------------------------------------------------------*/
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-08 04:43:51
|
On Fri, May 8, 2009 at 2:05 PM, Vince Weaver <vi...@cs...> wrote: > Hello > > The tests I have are pure assembly, and need to be assembled by the > assembler, not by gcc. This is because the bbv plugin depends on exact > instruction counts, and different C compilers run a differing amount of > code before getting to main(). So to have consistent results on different > machines I need to skip the compiler. > > In the Makefile.am file I can set > CCAS = as > To have the assembler called instead of gcc. Unfortunately though a lot > of flags get passed to the assembler that it is unable to ignore. You get > something like the following, which doesn't work: > as -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../include > -I../../../coregrind -I../../../include -I../../../VEX/pub -DVGA_x86=1 > -DVGO_linux=1 -DVGP_x86_linux=1 -Wno-long-long -MT million.o -MD -MP -MF > .deps/million.Tpo -c -o million.o million.S > > I'd really just like it called as > as -o million.o million.S > > A similar problem happens with linking. I'd rather just something like > ld -o million million.o > > Is it possible to do this with the current automake setup in Valgrind? I assume you've got a recent automake, something like 1.10. Try changing the name from million.S to million.s -- newer automakes consider an asm file with a .S extension as "preprocessed", and so pass the CPPFLAGS in. (Older ones don't do this, AFAIK.) Also make sure that the AM_CCASFLAGS/CCASFLAGS don't have the AM_CPPFLAGS/CPPFLAGS included in them. (The defaults for these for tool tests are in Makefile.tool-tests.am.) Hopefully that'll work. I'm not sure about the linking step... but the various variables with LDFLAGS in their names should control that. Nick |
|
From: Vince W. <vi...@cs...> - 2009-05-08 04:05:56
|
Hello
After a long delay I am trying to get my exp-bbv (SimPoint basic block
vector plugin) suitable for review.
I'm having some trouble with automake and the tests I have.
The tests I have are pure assembly, and need to be assembled by the
assembler, not by gcc. This is because the bbv plugin depends on exact
instruction counts, and different C compilers run a differing amount of
code before getting to main(). So to have consistent results on different
machines I need to skip the compiler.
In the Makefile.am file I can set
CCAS = as
To have the assembler called instead of gcc. Unfortunately though a lot
of flags get passed to the assembler that it is unable to ignore. You get
something like the following, which doesn't work:
as -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../include
-I../../../coregrind -I../../../include -I../../../VEX/pub -DVGA_x86=1
-DVGO_linux=1 -DVGP_x86_linux=1 -Wno-long-long -MT million.o -MD -MP -MF
.deps/million.Tpo -c -o million.o million.S
I'd really just like it called as
as -o million.o million.S
A similar problem happens with linking. I'd rather just something like
ld -o million million.o
Is it possible to do this with the current automake setup in Valgrind?
Thanks
Vince
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-08 03:42:42
|
On Fri, May 8, 2009 at 1:21 PM, sahannum <sah...@gm...> wrote: > > My short-term goal here is to mimic the functionality of strace and list the > system calls that a target process makes during run-time. For my first step > I used VG_(needs_syscall_wrapper) and wrote the post_syscall function to > simply print something each time it's called (just a "hello" and a counter, > basically). What I found was that strace run on date reports me 51 system > calls, and my little valgrind tool reports 141 system calls...which implies > that valgrind is calling my function both for date's system calls and its > own system calls (or at least its own system calls, perhaps at the exclusion > of date?)...I'm not sure. post_syscall should only be called for the client program's system calls. I don't know why you're getting the 51 vs 141. > My questions for you all: > - How can I get a pointer to the system call that has triggered the wrapper > functions? Ideally, how might I get the name of that system call? Every syscall has a number. The number is one of the parameters to the syscall, you have to know, for the platform you're on, which syscall number maps to which syscall. > - How can I tell whether the system call was in relation to Valgrind or the > target process? As above, they should just belong to the target process. If you run "strace -f valgrind date" you'll get many more than 141 syscalls. You should also look at the implementation of the --trace-syscalls option and coregrind/m_syswrap/syswrap-*, which has all the core's syscalls wrappers. Nick |
|
From: sahannum <sah...@gm...> - 2009-05-08 03:21:19
|
Thanks in advance for reading through this. I've read through the documentation (with particular focus on the "How to build a tool" section), read through some of the papers, and spent a lot of time fishing through the comments in the headers and Memcheck, as well as the source code to Flayer. (http://www.usenix.org/events/woot07/tech/full_papers/drewry/drewry_html/ ) My short-term goal here is to mimic the functionality of strace and list the system calls that a target process makes during run-time. For my first step I used VG_(needs_syscall_wrapper) and wrote the post_syscall function to simply print something each time it's called (just a "hello" and a counter, basically). What I found was that strace run on date reports me 51 system calls, and my little valgrind tool reports 141 system calls...which implies that valgrind is calling my function both for date's system calls and its own system calls (or at least its own system calls, perhaps at the exclusion of date?)...I'm not sure. My questions for you all: - How can I get a pointer to the system call that has triggered the wrapper functions? Ideally, how might I get the name of that system call? - How can I tell whether the system call was in relation to Valgrind or the target process? If anyone can either point me to example source, a paper, or anything that might get me looking in the right places, I would be very grateful. As it stands I am trying to reverse engineer what I'm looking for digging through Flayer and Memcheck; my answers may lie there, but I have yet to find them. Thanks again, in advance. -- View this message in context: http://www.nabble.com/Is-there-a-way-to-identify-enumerate-system-calls--tp23439397p23439397.html Sent from the Valgrind - Dev mailing list archive at Nabble.com. |
|
From: Tom H. <th...@cy...> - 2009-05-08 02:44:44
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-05-08 03:05:06 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: <sv...@va...> - 2009-05-08 02:39:26
|
Author: njn
Date: 2009-05-08 02:49:13 +0100 (Fri, 08 May 2009)
New Revision: 9798
Log:
Minor wibbles.
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-08 01:47:06 UTC (rev 9797)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-08 01:49:13 UTC (rev 9798)
@@ -73,10 +73,6 @@
typedef uint64_t mig_addr_t;
-// DDD: fixme from aspacemgr-linux.c
-extern void VG_(sync_mappings)(const HChar *when, const HChar *where, Int num);
-
-
// Saved ports
static mach_port_t vg_host_port = 0;
static mach_port_t vg_task_port = 0;
@@ -6263,43 +6259,6 @@
mach_msg: base handlers
------------------------------------------------------------------ */
-POST(mach_msg)
-{
- mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
- mach_msg_option_t option = (mach_msg_option_t)ARG2;
-
- if (option & MACH_RCV_MSG) {
- if (RES != 0) {
- // error during send or receive
- // GrP fixme need to clean up port rights?
- } else {
- mach_msg_trailer_t *mt =
- (mach_msg_trailer_t *)((Addr)mh + round_msg(mh->msgh_size));
-
- // Assume the entire received message and trailer is initialized
- // GrP fixme would being more specific catch any bugs?
- POST_MEM_WRITE((Addr)mh,
- round_msg(mh->msgh_size) + mt->msgh_trailer_size);
-
- if (mh->msgh_bits & MACH_MSGH_BITS_COMPLEX) {
- // Update memory map for out-of-line message data
- import_complex_message(tid, mh);
- }
- }
- }
-
- // Call handler chosen by PRE(mach_msg)
- if (AFTER) {
- (*AFTER)(tid, arrghs, status);
- }
-}
-
-
-POST(mach_msg_unhandled)
-{
- VG_(sync_mappings)("after", "mach_msg_receive", 0);
-}
-
PRE(mach_msg)
{
mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
@@ -6352,7 +6311,6 @@
PRE_MEM_WRITE("mach_msg(receive buffer)", (Addr)mh, rcv_size);
}
-
// Call a PRE handler. The PRE handler may set an AFTER handler.
if (!(option & MACH_SEND_MSG)) {
@@ -6399,7 +6357,44 @@
}
}
+POST(mach_msg)
+{
+ mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
+ mach_msg_option_t option = (mach_msg_option_t)ARG2;
+ if (option & MACH_RCV_MSG) {
+ if (RES != 0) {
+ // error during send or receive
+ // GrP fixme need to clean up port rights?
+ } else {
+ mach_msg_trailer_t *mt =
+ (mach_msg_trailer_t *)((Addr)mh + round_msg(mh->msgh_size));
+
+ // Assume the entire received message and trailer is initialized
+ // GrP fixme would being more specific catch any bugs?
+ POST_MEM_WRITE((Addr)mh,
+ round_msg(mh->msgh_size) + mt->msgh_trailer_size);
+
+ if (mh->msgh_bits & MACH_MSGH_BITS_COMPLEX) {
+ // Update memory map for out-of-line message data
+ import_complex_message(tid, mh);
+ }
+ }
+ }
+
+ // Call handler chosen by PRE(mach_msg)
+ if (AFTER) {
+ (*AFTER)(tid, arrghs, status);
+ }
+}
+
+
+POST(mach_msg_unhandled)
+{
+ VG_(sync_mappings)("after", "mach_msg_unhandled", 0);
+}
+
+
/* ---------------------------------------------------------------------
other Mach traps
------------------------------------------------------------------ */
|
|
From: Tom H. <th...@cy...> - 2009-05-08 02:27:59
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-05-08 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-08 02:24:15
|
Author: njn
Date: 2009-05-08 02:47:06 +0100 (Fri, 08 May 2009)
New Revision: 9797
Log:
Merged r9796 (create m_aspacehl) from the trunk.
Added:
branches/DARWIN/coregrind/m_aspacehl.c
branches/DARWIN/coregrind/pub_core_aspacehl.h
branches/DARWIN/include/pub_tool_aspacehl.h
Modified:
branches/DARWIN/coregrind/Makefile.am
branches/DARWIN/coregrind/m_coredump/coredump-elf.c
branches/DARWIN/coregrind/m_main.c
branches/DARWIN/include/Makefile.am
branches/DARWIN/memcheck/mc_leakcheck.c
Modified: branches/DARWIN/coregrind/Makefile.am
===================================================================
--- branches/DARWIN/coregrind/Makefile.am 2009-05-08 00:39:31 UTC (rev 9796)
+++ branches/DARWIN/coregrind/Makefile.am 2009-05-08 01:47:06 UTC (rev 9797)
@@ -291,6 +291,7 @@
m_vkiscnums.c \
m_wordfm.c \
m_xarray.c \
+ m_aspacehl.c \
m_aspacemgr/aspacemgr-common.c \
m_debuginfo/misc.c \
m_debuginfo/d3basics.c \
Copied: branches/DARWIN/coregrind/m_aspacehl.c (from rev 9796, trunk/coregrind/m_aspacehl.c)
===================================================================
--- branches/DARWIN/coregrind/m_aspacehl.c (rev 0)
+++ branches/DARWIN/coregrind/m_aspacehl.c 2009-05-08 01:47:06 UTC (rev 9797)
@@ -0,0 +1,71 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Services layered on top of m_aspacemgr. m_aspacehl.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2009 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#include "pub_core_basics.h"
+#include "pub_core_aspacemgr.h"
+#include "pub_core_mallocfree.h"
+
+#include "pub_core_aspacehl.h"
+
+// Extract from aspacem a vector of the current segment start
+// addresses. The vector is dynamically allocated and should be freed
+// by the caller when done. REQUIRES m_mallocfree to be running.
+// Writes the number of addresses required into *n_acquired.
+Addr* VG_(get_segment_starts) ( /*OUT*/Int* n_acquired )
+{
+ Addr* starts;
+ Int n_starts, r = 0;
+
+ n_starts = 1;
+ while (True) {
+ starts = VG_(malloc)( "main.gss.1", n_starts * sizeof(Addr) );
+ if (starts == NULL)
+ break;
+ r = VG_(am_get_segment_starts)( starts, n_starts );
+ if (r >= 0)
+ break;
+ VG_(free)(starts);
+ n_starts *= 2;
+ }
+
+ if (starts == NULL) {
+ *n_acquired = 0;
+ return NULL;
+ }
+
+ *n_acquired = r;
+ return starts;
+}
+
+
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/coregrind/m_coredump/coredump-elf.c
===================================================================
--- branches/DARWIN/coregrind/m_coredump/coredump-elf.c 2009-05-08 00:39:31 UTC (rev 9796)
+++ branches/DARWIN/coregrind/m_coredump/coredump-elf.c 2009-05-08 01:47:06 UTC (rev 9797)
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_aspacehl.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
#include "pub_core_machine.h"
@@ -65,39 +66,6 @@
#error VG_WORDSIZE needs to ==4 or ==8
#endif
-/* TODO: GIVE THIS A PROPER HOME
- TODO: MERGE THIS WITH DUPLICATES IN m_main.c and mc_leakcheck.c
- Extract from aspacem a vector of the current segment start
- addresses. The vector is dynamically allocated and should be freed
- by the caller when done. REQUIRES m_mallocfree to be running.
- Writes the number of addresses required into *n_acquired. */
-
-static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
-{
- Addr* starts;
- Int n_starts, r = 0;
-
- n_starts = 1;
- while (True) {
- starts = VG_(malloc)( "coredump-elf.gss.1", n_starts * sizeof(Addr) );
- if (starts == NULL)
- break;
- r = VG_(am_get_segment_starts)( starts, n_starts );
- if (r >= 0)
- break;
- VG_(free)(starts);
- n_starts *= 2;
- }
-
- if (starts == NULL) {
- *n_acquired = 0;
- return NULL;
- }
-
- *n_acquired = r;
- return starts;
-}
-
/* If true, then this Segment may be mentioned in the core */
static Bool may_dump(const NSegment *seg)
{
@@ -342,7 +310,7 @@
}
/* Get the segments */
- seg_starts = get_seg_starts(&n_seg_starts);
+ seg_starts = VG_(get_segment_starts)(&n_seg_starts);
/* First, count how many memory segments to dump */
num_phdrs = 1; /* start with notes */
Modified: branches/DARWIN/coregrind/m_main.c
===================================================================
--- branches/DARWIN/coregrind/m_main.c 2009-05-08 00:39:31 UTC (rev 9796)
+++ branches/DARWIN/coregrind/m_main.c 2009-05-08 01:47:06 UTC (rev 9797)
@@ -35,6 +35,7 @@
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
#include "pub_core_aspacemgr.h"
+#include "pub_core_aspacehl.h"
#include "pub_core_commandline.h"
#include "pub_core_debuglog.h"
#include "pub_core_errormgr.h"
@@ -1134,40 +1135,6 @@
/* --- end of Forwards decls to do with shutdown --- */
-/* TODO: GIVE THIS A PROPER HOME
- TODO: MERGE THIS WITH DUPLICATE IN mc_leakcheck.c and coredump-elf.c.
- Extract from aspacem a vector of the current segment start
- addresses. The vector is dynamically allocated and should be freed
- by the caller when done. REQUIRES m_mallocfree to be running.
- Writes the number of addresses required into *n_acquired. */
-
-static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
-{
- Addr* starts;
- Int n_starts, r = 0;
-
- n_starts = 1;
- while (True) {
- starts = VG_(malloc)( "main.gss.1", n_starts * sizeof(Addr) );
- if (starts == NULL)
- break;
- r = VG_(am_get_segment_starts)( starts, n_starts );
- if (r >= 0)
- break;
- VG_(free)(starts);
- n_starts *= 2;
- }
-
- if (starts == NULL) {
- *n_acquired = 0;
- return NULL;
- }
-
- *n_acquired = r;
- return starts;
-}
-
-
/* By the time we get to valgrind_main, the_iicii should already have
been filled in with any important details as required by whatever
OS we have been built for.
@@ -1778,7 +1745,7 @@
Int n_seg_starts;
Addr_n_ULong anu;
- seg_starts = get_seg_starts( &n_seg_starts );
+ seg_starts = VG_(get_segment_starts)( &n_seg_starts );
vg_assert(seg_starts && n_seg_starts >= 0);
/* show them all to the debug info reader. allow_SkFileV has to
@@ -1835,7 +1802,7 @@
# elif defined(VGO_darwin)
{ Addr* seg_starts;
Int n_seg_starts;
- seg_starts = get_seg_starts( &n_seg_starts );
+ seg_starts = VG_(get_segment_starts)( &n_seg_starts );
vg_assert(seg_starts && n_seg_starts >= 0);
/* show them all to the debug info reader.
@@ -1904,7 +1871,7 @@
tl_assert(VG_(running_tid) == VG_INVALID_THREADID);
VG_(running_tid) = tid_main;
- seg_starts = get_seg_starts( &n_seg_starts );
+ seg_starts = VG_(get_segment_starts)( &n_seg_starts );
vg_assert(seg_starts && n_seg_starts >= 0);
/* show interesting ones to the tool */
Copied: branches/DARWIN/coregrind/pub_core_aspacehl.h (from rev 9796, trunk/coregrind/pub_core_aspacehl.h)
===================================================================
--- branches/DARWIN/coregrind/pub_core_aspacehl.h (rev 0)
+++ branches/DARWIN/coregrind/pub_core_aspacehl.h 2009-05-08 01:47:06 UTC (rev 9797)
@@ -0,0 +1,46 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Services layered on top of m_aspacemgr. pub_core_aspacehl.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2009-2009 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_CORE_ASPACEHL_H
+#define __PUB_CORE_ASPACEHL_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module contains services that would be in m_aspacemgr,
+// except that they use dynamic memory management or something similar
+// that we don't allow in m_aspacemgr. The "hl" is short for "high level".
+//--------------------------------------------------------------------
+
+#include "pub_tool_aspacehl.h"
+
+#endif // __PUB_CORE_ASPACEHL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/include/Makefile.am
===================================================================
--- branches/DARWIN/include/Makefile.am 2009-05-08 00:39:31 UTC (rev 9796)
+++ branches/DARWIN/include/Makefile.am 2009-05-08 01:47:06 UTC (rev 9797)
@@ -6,6 +6,7 @@
incinc_HEADERS = \
pub_tool_basics.h \
pub_tool_basics_asm.h \
+ pub_tool_aspacehl.h \
pub_tool_aspacemgr.h \
pub_tool_clientstate.h \
pub_tool_clreq.h \
Copied: branches/DARWIN/include/pub_tool_aspacehl.h (from rev 9796, trunk/include/pub_tool_aspacehl.h)
===================================================================
--- branches/DARWIN/include/pub_tool_aspacehl.h (rev 0)
+++ branches/DARWIN/include/pub_tool_aspacehl.h 2009-05-08 01:47:06 UTC (rev 9797)
@@ -0,0 +1,44 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Services layered on top of m_aspacemgr. pub_tool_aspacehl.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2009-2009 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_TOOL_ASPACEHL_H
+#define __PUB_TOOL_ASPACEHL_H
+
+// Extract from aspacem a vector of the current segment start
+// addresses. The vector is dynamically allocated and should be freed
+// by the caller when done. REQUIRES m_mallocfree to be running.
+// Writes the number of addresses required into *n_acquired.
+extern Addr* VG_(get_segment_starts) ( /*OUT*/Int* n_acquired );
+
+#endif // __PUB_TOOL_ASPACEHL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/memcheck/mc_leakcheck.c
===================================================================
--- branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-08 00:39:31 UTC (rev 9796)
+++ branches/DARWIN/memcheck/mc_leakcheck.c 2009-05-08 01:47:06 UTC (rev 9797)
@@ -30,6 +30,7 @@
#include "pub_tool_basics.h"
#include "pub_tool_vki.h"
+#include "pub_tool_aspacehl.h"
#include "pub_tool_aspacemgr.h"
#include "pub_tool_execontext.h"
#include "pub_tool_hashtable.h"
@@ -467,40 +468,6 @@
SizeT MC_(blocks_suppressed) = 0;
-/* TODO: GIVE THIS A PROPER HOME
- TODO: MERGE THIS WITH DUPLICATE IN m_main.c and coredump-elf.c.
- Extract from aspacem a vector of the current segment start
- addresses. The vector is dynamically allocated and should be freed
- by the caller when done. REQUIRES m_mallocfree to be running.
- Writes the number of addresses required into *n_acquired. */
-
-static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
-{
- Addr* starts;
- Int n_starts, r = 0;
-
- n_starts = 1;
- while (True) {
- starts = VG_(malloc)( "mc.gss.1", n_starts * sizeof(Addr) );
- if (starts == NULL)
- break;
- r = VG_(am_get_segment_starts)( starts, n_starts );
- if (r >= 0)
- break;
- VG_(free)(starts);
- n_starts *= 2;
- }
-
- if (starts == NULL) {
- *n_acquired = 0;
- return NULL;
- }
-
- *n_acquired = r;
- return starts;
-}
-
-
// Determines if a pointer is to a chunk. Returns the chunk number et al
// via call-by-reference.
static Bool
@@ -1008,7 +975,7 @@
// pointed to.
{
Int n_seg_starts;
- Addr* seg_starts = get_seg_starts( &n_seg_starts );
+ Addr* seg_starts = VG_(get_segment_starts)( &n_seg_starts );
tl_assert(seg_starts && n_seg_starts > 0);
|
|
From: <sv...@va...> - 2009-05-08 00:39:38
|
Author: njn
Date: 2009-05-08 01:39:31 +0100 (Fri, 08 May 2009)
New Revision: 9796
Log:
Created a new module, m_aspacehl. Factored out three(!) copies of
get_seg_starts() into it.
Added:
trunk/coregrind/m_aspacehl.c
trunk/coregrind/pub_core_aspacehl.h
trunk/include/pub_tool_aspacehl.h
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/m_coredump/coredump-elf.c
trunk/coregrind/m_main.c
trunk/include/Makefile.am
trunk/memcheck/mc_leakcheck.c
Modified: trunk/coregrind/Makefile.am
===================================================================
--- trunk/coregrind/Makefile.am 2009-05-07 23:52:11 UTC (rev 9795)
+++ trunk/coregrind/Makefile.am 2009-05-08 00:39:31 UTC (rev 9796)
@@ -102,6 +102,7 @@
noinst_HEADERS = \
+ pub_core_aspacehl.h \
pub_core_aspacemgr.h \
pub_core_basics.h \
pub_core_basics_asm.h \
@@ -221,6 +222,7 @@
m_vkiscnums.c \
m_wordfm.c \
m_xarray.c \
+ m_aspacehl.c \
m_aspacemgr/aspacemgr-common.c \
m_debuginfo/misc.c \
m_debuginfo/d3basics.c \
Added: trunk/coregrind/m_aspacehl.c
===================================================================
--- trunk/coregrind/m_aspacehl.c (rev 0)
+++ trunk/coregrind/m_aspacehl.c 2009-05-08 00:39:31 UTC (rev 9796)
@@ -0,0 +1,71 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Services layered on top of m_aspacemgr. m_aspacehl.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2009 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#include "pub_core_basics.h"
+#include "pub_core_aspacemgr.h"
+#include "pub_core_mallocfree.h"
+
+#include "pub_core_aspacehl.h"
+
+// Extract from aspacem a vector of the current segment start
+// addresses. The vector is dynamically allocated and should be freed
+// by the caller when done. REQUIRES m_mallocfree to be running.
+// Writes the number of addresses required into *n_acquired.
+Addr* VG_(get_segment_starts) ( /*OUT*/Int* n_acquired )
+{
+ Addr* starts;
+ Int n_starts, r = 0;
+
+ n_starts = 1;
+ while (True) {
+ starts = VG_(malloc)( "main.gss.1", n_starts * sizeof(Addr) );
+ if (starts == NULL)
+ break;
+ r = VG_(am_get_segment_starts)( starts, n_starts );
+ if (r >= 0)
+ break;
+ VG_(free)(starts);
+ n_starts *= 2;
+ }
+
+ if (starts == NULL) {
+ *n_acquired = 0;
+ return NULL;
+ }
+
+ *n_acquired = r;
+ return starts;
+}
+
+
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_coredump/coredump-elf.c
===================================================================
--- trunk/coregrind/m_coredump/coredump-elf.c 2009-05-07 23:52:11 UTC (rev 9795)
+++ trunk/coregrind/m_coredump/coredump-elf.c 2009-05-08 00:39:31 UTC (rev 9796)
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_aspacehl.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
#include "pub_core_machine.h"
@@ -65,39 +66,6 @@
#error VG_WORDSIZE needs to ==4 or ==8
#endif
-/* TODO: GIVE THIS A PROPER HOME
- TODO: MERGE THIS WITH DUPLICATES IN m_main.c and mc_leakcheck.c
- Extract from aspacem a vector of the current segment start
- addresses. The vector is dynamically allocated and should be freed
- by the caller when done. REQUIRES m_mallocfree to be running.
- Writes the number of addresses required into *n_acquired. */
-
-static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
-{
- Addr* starts;
- Int n_starts, r = 0;
-
- n_starts = 1;
- while (True) {
- starts = VG_(malloc)( "coredump-elf.gss.1", n_starts * sizeof(Addr) );
- if (starts == NULL)
- break;
- r = VG_(am_get_segment_starts)( starts, n_starts );
- if (r >= 0)
- break;
- VG_(free)(starts);
- n_starts *= 2;
- }
-
- if (starts == NULL) {
- *n_acquired = 0;
- return NULL;
- }
-
- *n_acquired = r;
- return starts;
-}
-
/* If true, then this Segment may be mentioned in the core */
static Bool may_dump(const NSegment *seg)
{
@@ -342,7 +310,7 @@
}
/* Get the segments */
- seg_starts = get_seg_starts(&n_seg_starts);
+ seg_starts = VG_(get_segment_starts)(&n_seg_starts);
/* First, count how many memory segments to dump */
num_phdrs = 1; /* start with notes */
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2009-05-07 23:52:11 UTC (rev 9795)
+++ trunk/coregrind/m_main.c 2009-05-08 00:39:31 UTC (rev 9796)
@@ -35,6 +35,7 @@
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
#include "pub_core_aspacemgr.h"
+#include "pub_core_aspacehl.h"
#include "pub_core_commandline.h"
#include "pub_core_debuglog.h"
#include "pub_core_errormgr.h"
@@ -1122,40 +1123,6 @@
/* --- end of Forwards decls to do with shutdown --- */
-/* TODO: GIVE THIS A PROPER HOME
- TODO: MERGE THIS WITH DUPLICATE IN mc_leakcheck.c and coredump-elf.c.
- Extract from aspacem a vector of the current segment start
- addresses. The vector is dynamically allocated and should be freed
- by the caller when done. REQUIRES m_mallocfree to be running.
- Writes the number of addresses required into *n_acquired. */
-
-static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
-{
- Addr* starts;
- Int n_starts, r = 0;
-
- n_starts = 1;
- while (True) {
- starts = VG_(malloc)( "main.gss.1", n_starts * sizeof(Addr) );
- if (starts == NULL)
- break;
- r = VG_(am_get_segment_starts)( starts, n_starts );
- if (r >= 0)
- break;
- VG_(free)(starts);
- n_starts *= 2;
- }
-
- if (starts == NULL) {
- *n_acquired = 0;
- return NULL;
- }
-
- *n_acquired = r;
- return starts;
-}
-
-
/* By the time we get to valgrind_main, the_iicii should already have
been filled in with any important details as required by whatever
OS we have been built for.
@@ -1730,7 +1697,7 @@
Int n_seg_starts;
Addr_n_ULong anu;
- seg_starts = get_seg_starts( &n_seg_starts );
+ seg_starts = VG_(get_segment_starts)( &n_seg_starts );
vg_assert(seg_starts && n_seg_starts >= 0);
/* show them all to the debug info reader. allow_SkFileV has to
@@ -1842,7 +1809,7 @@
tl_assert(VG_(running_tid) == VG_INVALID_THREADID);
VG_(running_tid) = tid_main;
- seg_starts = get_seg_starts( &n_seg_starts );
+ seg_starts = VG_(get_segment_starts)( &n_seg_starts );
vg_assert(seg_starts && n_seg_starts >= 0);
/* show interesting ones to the tool */
Added: trunk/coregrind/pub_core_aspacehl.h
===================================================================
--- trunk/coregrind/pub_core_aspacehl.h (rev 0)
+++ trunk/coregrind/pub_core_aspacehl.h 2009-05-08 00:39:31 UTC (rev 9796)
@@ -0,0 +1,46 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Services layered on top of m_aspacemgr. pub_core_aspacehl.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2009-2009 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_CORE_ASPACEHL_H
+#define __PUB_CORE_ASPACEHL_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module contains services that would be in m_aspacemgr,
+// except that they use dynamic memory management or something similar
+// that we don't allow in m_aspacemgr. The "hl" is short for "high level".
+//--------------------------------------------------------------------
+
+#include "pub_tool_aspacehl.h"
+
+#endif // __PUB_CORE_ASPACEHL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/include/Makefile.am
===================================================================
--- trunk/include/Makefile.am 2009-05-07 23:52:11 UTC (rev 9795)
+++ trunk/include/Makefile.am 2009-05-08 00:39:31 UTC (rev 9796)
@@ -6,6 +6,7 @@
incinc_HEADERS = \
pub_tool_basics.h \
pub_tool_basics_asm.h \
+ pub_tool_aspacehl.h \
pub_tool_aspacemgr.h \
pub_tool_clientstate.h \
pub_tool_clreq.h \
Added: trunk/include/pub_tool_aspacehl.h
===================================================================
--- trunk/include/pub_tool_aspacehl.h (rev 0)
+++ trunk/include/pub_tool_aspacehl.h 2009-05-08 00:39:31 UTC (rev 9796)
@@ -0,0 +1,44 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Services layered on top of m_aspacemgr. pub_tool_aspacehl.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2009-2009 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_TOOL_ASPACEHL_H
+#define __PUB_TOOL_ASPACEHL_H
+
+// Extract from aspacem a vector of the current segment start
+// addresses. The vector is dynamically allocated and should be freed
+// by the caller when done. REQUIRES m_mallocfree to be running.
+// Writes the number of addresses required into *n_acquired.
+extern Addr* VG_(get_segment_starts) ( /*OUT*/Int* n_acquired );
+
+#endif // __PUB_TOOL_ASPACEHL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/memcheck/mc_leakcheck.c
===================================================================
--- trunk/memcheck/mc_leakcheck.c 2009-05-07 23:52:11 UTC (rev 9795)
+++ trunk/memcheck/mc_leakcheck.c 2009-05-08 00:39:31 UTC (rev 9796)
@@ -30,6 +30,7 @@
#include "pub_tool_basics.h"
#include "pub_tool_vki.h"
+#include "pub_tool_aspacehl.h"
#include "pub_tool_aspacemgr.h"
#include "pub_tool_execontext.h"
#include "pub_tool_hashtable.h"
@@ -467,40 +468,6 @@
SizeT MC_(blocks_suppressed) = 0;
-/* TODO: GIVE THIS A PROPER HOME
- TODO: MERGE THIS WITH DUPLICATE IN m_main.c and coredump-elf.c.
- Extract from aspacem a vector of the current segment start
- addresses. The vector is dynamically allocated and should be freed
- by the caller when done. REQUIRES m_mallocfree to be running.
- Writes the number of addresses required into *n_acquired. */
-
-static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
-{
- Addr* starts;
- Int n_starts, r = 0;
-
- n_starts = 1;
- while (True) {
- starts = VG_(malloc)( "mc.gss.1", n_starts * sizeof(Addr) );
- if (starts == NULL)
- break;
- r = VG_(am_get_segment_starts)( starts, n_starts );
- if (r >= 0)
- break;
- VG_(free)(starts);
- n_starts *= 2;
- }
-
- if (starts == NULL) {
- *n_acquired = 0;
- return NULL;
- }
-
- *n_acquired = r;
- return starts;
-}
-
-
// Determines if a pointer is to a chunk. Returns the chunk number et al
// via call-by-reference.
static Bool
@@ -1007,7 +974,7 @@
// pointed to.
{
Int n_seg_starts;
- Addr* seg_starts = get_seg_starts( &n_seg_starts );
+ Addr* seg_starts = VG_(get_segment_starts)( &n_seg_starts );
tl_assert(seg_starts && n_seg_starts > 0);
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-08 00:16:13
|
On Fri, May 8, 2009 at 9:12 AM, Greg Parker <gp...@ap...> wrote: > On May 7, 2009, at 4:02 PM, Nicholas Nethercote wrote: >> >> Maybe we need a --workaround-gcc43-bugs option just like we have >> --workaround-gcc296-bugs. Sigh. >> >> (The latter option doesn't seem necessary any more since Valgrind >> refuses to build with anything less than gcc 3.0.0.) > > That option works around bugs compiled into the client code. So the question > isn't "does Valgrind build with 2.9.6" but rather "can Valgrind run client > code built with 2.9.6". Oh, yes. My mistake. Thanks. N |