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
(12) |
2
(11) |
3
(8) |
|
4
(9) |
5
(10) |
6
(18) |
7
(8) |
8
(12) |
9
(23) |
10
(14) |
|
11
(15) |
12
(31) |
13
(45) |
14
(28) |
15
(20) |
16
(16) |
17
(9) |
|
18
(18) |
19
(26) |
20
(49) |
21
(14) |
22
(18) |
23
(24) |
24
(28) |
|
25
(39) |
26
(17) |
27
(27) |
28
(27) |
29
(14) |
30
(44) |
|
|
From: Ethan Tira-T. <ej...@an...> - 2005-09-21 22:16:05
|
My project involves control software for a robot. In order to describe
the problems I'm seeing when using valgrind, first allow me to give some
detail on how my code works, and why it does what it does.
----------------- Environment -----------------
We have a body of code written for the Sony Aibo, which we have ported
to linux in order to run in simulation, and hopefully, eventually also
control linux-based robots.
This software has a realtime process for motor control ("Motion"), and a
non-realtime process which handles higher level decision making and
sensor processing which might take extended processing ("Main"). These
two processes communicate through shared memory regions and semaphores.
In addition, there is a simulation process which emulates the system of
the Aibo, so it loads camera and sensor frames from disk (perhaps
network later) and sends them to the "Main" process, just as it would on
the real Aibo. Currently, each of these message queues involves a
thread on the loading side, and another thread on the receiving side
(which I might change to streamline performance, but that's a different
story)
Each of these processes is created via a fork, so the original parent
becomes "Main", its child becomes "Motion", and the grandchild becomes
"Simulator".
During initialization, before any forks occur, atexit() and signal() are
called to register callbacks to intercept shutdown. These callbacks
check to see if any shared memory regions or semaphore sets are still in
use, and unlink them if they are. (otherwise they will persist past
process destruction, leaking system resources -- a bad idea IMHO, but
this is linux's problem)
At shutdown, we first call pthread_cancel on the message queue threads,
and then wait for them to complete with pthread_join. Then once the
message queues are torn down, the individual processes are torn down.
----------------- Problems -----------------
1) When running in valgrind, when the threads exit, they appear to be
calling the function registered with atexit(). When running outside of
valgrind, these threads do not call the exit callback. (this causes
trouble for me because when the threads call the callback, there are
still shared memory regions, and so this causes the callback to run
around unlinking them before we're actually done with them.)
2) pthread_setcancelstate() seems to be ignored, or at least there's
*something* I don't quite understand going on there. My asserts go a
little crazy telling me whenever they set it, the previous value isn't
what it should have been. I use setcancelstate to turn off thread
canceling whenever the thread is in a mutex so that it won't be killed
while a mutex is held, causing a deadlock down the road.
3) When I exit, I run into some kind of deadlock condition, from which
my only recourse is to ctrl-C it, which tries to run my signal handler
(similar to the exit handler, attempts to unload shared memory regions
and semaphore sets), but then I get a particularly nasty crash with
seemingly infinite screens of garbage output (that doesn't ever happen
running normally)
- I wouldn't really care that much, but the root problem is that the
abnormal shutdown causes stuff to be leaked which normally wouldn't, and
hides stuff which might've been leaking.
----------------- Attempted workarounds -----------------
If I comment out my atexit() registration, then the threads seem to exit
well enough without triggering the "emergency shutdown" code, but then I
still run into trouble with deadlock and the ensuing crash with ctrl-C
-- perhaps an issue with the cancel state. But it's hard to see where
my processes are being hung up at because I can't figure out how to
attach gdb to the process in order to get a backtrace when it's blocking
on a semaphore.
thanks!
-ethan
|
|
From: <sv...@va...> - 2005-09-21 12:01:46
|
Author: tom
Date: 2005-09-21 13:01:37 +0100 (Wed, 21 Sep 2005)
New Revision: 4719
Log:
Rework the address space sanity checker to check gaps between kernel
mappings as well as the mappings themselves and to not require there
to be exactly one valgrind segment for kernel gap/mapping.
Modified:
branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c
branches/ASPACEM/coregrind/m_aspacemgr/read_procselfmaps.c
branches/ASPACEM/coregrind/pub_core_aspacemgr.h
Modified: branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c 2005-09-21 10:16:4=
9 UTC (rev 4718)
+++ branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c 2005-09-21 12:01:3=
7 UTC (rev 4719)
@@ -809,49 +809,77 @@
static Int sync_check_i =3D 0;
static Bool sync_check_ok =3D False;
=20
-static void sync_check_callback ( Addr addr, SizeT len, UInt prot,
- UInt dev, UInt ino, ULong offset,=20
- const UChar* filename )
+static void sync_check_mapping_callback ( Addr addr, SizeT len, UInt pro=
t,
+ UInt dev, UInt ino, ULong offs=
et,=20
+ const UChar* filename )
{
- Bool same;
-
/* If a problem has already been detected, don't continue comparing
segments, so as to avoid flooding the output with error
messages. */
if (!sync_check_ok)
return;
=20
- /* Advance sync_check_i to the first possible nsegment entry which
- could map the kernel's offering. It will have been left at the
- previous match. We are prepared to skip any sequence of free
- and reservation segments, but everything else must match the
- kernel's segments. */
- sync_check_i++;
+ /* The start of this kernel mapping should fall within the
+ current segment.*/
+ if (addr < nsegments[sync_check_i].start ||
+ addr > nsegments[sync_check_i].end) {
+ sync_check_ok =3D False;
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_mapping_callback: segment mismatch: V's =
seg:\n");
+ show_nsegment_full( 0, &nsegments[sync_check_i] );
+ goto show_kern_seg;
+ }
=20
- while (sync_check_i < nsegments_used
- && (nsegments[sync_check_i].kind =3D=3D SkFree
- || nsegments[sync_check_i].kind =3D=3D SkResvn))
+ /* Check that any segments that fall within this mapping
+ have attributes which match the mapping. */
+ while (sync_check_i < nsegments_used &&
+ nsegments[sync_check_i].start < addr+len &&
+ nsegments[sync_check_i].end >=3D addr ) {
+ Bool same;
+ =20
+ /* compare the kernel's offering against ours. */
+ same =3D nsegments[sync_check_i].kind =3D=3D SkAnonC
+ || nsegments[sync_check_i].kind =3D=3D SkAnonV
+ || nsegments[sync_check_i].kind =3D=3D SkFileC
+ || nsegments[sync_check_i].kind =3D=3D SkFileV;
+ same =3D same
+ && nsegments[sync_check_i].dev =3D=3D dev
+ && nsegments[sync_check_i].ino =3D=3D ino
+ && nsegments[sync_check_i].start-nsegments[sync_check_i].of=
fset =3D=3D addr-offset;
+ if (!same) {
+ sync_check_ok =3D False;
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_mapping_callback: segment mismatch: V=
's seg:\n");
+ show_nsegment_full( 0, &nsegments[sync_check_i] );
+ goto show_kern_seg;
+ }
+
sync_check_i++;
+ }
=20
- aspacem_assert(sync_check_i >=3D 0 && sync_check_i <=3D nsegments_use=
d);
-
- if (sync_check_i =3D=3D nsegments_used) {
+ /* The end of this kernel mapping should fall within the
+ previous segment.*/
+ if (addr+len-1 < nsegments[sync_check_i-1].start ||
+ addr+len-1 > nsegments[sync_check_i-1].end) {
sync_check_ok =3D False;
- VG_(debugLog)(0,"aspacem","sync_check_callback: out of segments\n"=
);
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_mapping_callback: segment mismatch: V's =
seg:\n");
+ show_nsegment_full( 0, &nsegments[sync_check_i-1] );
goto show_kern_seg;
}
=20
- /* compare the kernel's offering against ours. */
- same =3D nsegments[sync_check_i].start =3D=3D addr
- && nsegments[sync_check_i].end =3D=3D addr+len-1
- && nsegments[sync_check_i].dev =3D=3D dev
- && nsegments[sync_check_i].ino =3D=3D ino
- && nsegments[sync_check_i].offset =3D=3D offset;
- if (!same) {
+ /* If this mapping ended in the middle of a segment then reduce
+ sync_check_i by one so that we continue from that segment with
+ the next mapping or gap. */
+ if (addr+len-1 < nsegments[sync_check_i-1].end)
+ sync_check_i--;
+
+ /* If we've run out of segments and there is still part of a
+ mapping unaccounted for then fail. */
+ if (sync_check_i =3D=3D nsegments_used &&
+ addr+len-1 > nsegments[sync_check_i-1].end) {
sync_check_ok =3D False;
- VG_(debugLog)(0,"aspacem",
- "sync_check_callback: segment mismatch: V's seg:\n=
");
- show_nsegment_full( 0, &nsegments[sync_check_i] );
+ VG_(debugLog)(0,"aspacem","sync_check_mapping_callback: out of seg=
ments\n");
goto show_kern_seg;
}
=20
@@ -860,7 +888,7 @@
=20
show_kern_seg:
VG_(debugLog)(0,"aspacem",
- "sync_check_callback: segment mismatch: kernel's seg:=
\n");
+ "sync_check_mapping_callback: segment mismatch: kerne=
l's seg:\n");
VG_(debugLog)(0,"aspacem",=20
"start=3D0x%llx end=3D0x%llx dev=3D%u ino=3D%u offset=
=3D%lld\n",
(ULong)addr, ((ULong)addr) + ((ULong)len) - 1,
@@ -868,13 +896,95 @@
return;
}
=20
+static void sync_check_gap_callback ( Addr addr, SizeT len )
+{
+ /* If a problem has already been detected, don't continue comparing
+ segments, so as to avoid flooding the output with error
+ messages. */
+ if (!sync_check_ok)
+ return;
+
+ if (addr+len-1 > nsegments[nsegments_used-1].end)
+ len =3D nsegments[nsegments_used-1].end-addr+1;
+
+ /* The start of this kernel mapping should fall within the
+ current segment.*/
+ if (addr < nsegments[sync_check_i].start ||
+ addr > nsegments[sync_check_i].end) {
+ sync_check_ok =3D False;
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_gap_callback: segment mismatch: V's seg:=
\n");
+ show_nsegment_full( 0, &nsegments[sync_check_i] );
+ goto show_kern_gap;
+ }
+
+ /* Check that any segments that fall within this gap
+ have attributes which match the mapping. */
+ while (sync_check_i < nsegments_used &&
+ nsegments[sync_check_i].start <=3D addr+len-1 &&
+ nsegments[sync_check_i].end >=3D addr ) {
+ Bool same;
+
+ /* compare the kernel's offering against ours. */
+ same =3D nsegments[sync_check_i].kind =3D=3D SkFree
+ || nsegments[sync_check_i].kind =3D=3D SkResvn;
+ if (!same) {
+ sync_check_ok =3D False;
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_gap_callback: segment mismatch: V's s=
eg:\n");
+ show_nsegment_full( 0, &nsegments[sync_check_i] );
+ goto show_kern_gap;
+ }
+
+ sync_check_i++;
+ }
+
+ /* The end of this kernel mapping should fall within the
+ previous segment.*/
+ if (addr+len-1 < nsegments[sync_check_i-1].start ||
+ addr+len-1 > nsegments[sync_check_i-1].end) {
+ sync_check_ok =3D False;
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_gap_callback: segment mismatch: V's seg:=
\n");
+ show_nsegment_full( 0, &nsegments[sync_check_i-1] );
+ goto show_kern_gap;
+ }
+
+ /* If this gap ended in the middle of a segment then reduce
+ sync_check_i by one so that we continue from that segment with
+ the next mapping or gap. */
+ if (addr+len-1 < nsegments[sync_check_i-1].end)=20
+ sync_check_i--;
+
+ /* If we've run out of segments and there is still part of a
+ gap unaccounted for then fail. */
+ if (sync_check_i =3D=3D nsegments_used &&
+ addr+len-1 > nsegments[sync_check_i-1].end) {
+ sync_check_ok =3D False;
+ VG_(debugLog)(0,"aspacem","sync_check_gap_callback: out of segment=
s\n");
+ goto show_kern_gap;
+ }
+
+ /* Looks harmless. Keep going. */
+ return;
+
+ show_kern_gap:
+ VG_(debugLog)(0,"aspacem",
+ "sync_check_gap_callback: segment mismatch: kernel's =
gap:\n");
+ VG_(debugLog)(0,"aspacem",=20
+ "start=3D0x%llx end=3D0x%llx\n",
+ (ULong)addr, ((ULong)addr) + ((ULong)len) - 1 );
+ return;
+}
+
static Bool do_sync_check ( HChar* fn, HChar* file, Int line )
{
- sync_check_i =3D -1;
+ sync_check_i =3D 0;
sync_check_ok =3D True;
if (0)
VG_(debugLog)(0,"aspacem", "do_sync_check %s:%d\n", file,line);
- VG_(parse_procselfmaps)( sync_check_callback );
+ VG_(parse_procselfmaps)( sync_check_mapping_callback,
+ sync_check_gap_callback );
if (!sync_check_ok) {
VG_(debugLog)(0,"aspacem",=20
"sync check at %s:%d (%s): FAILED\n",
@@ -1369,7 +1479,7 @@
VG_(am_show_nsegments)(2, "Initial layout");
=20
VG_(debugLog)(2, "aspacem", "Reading /proc/self/maps\n");
- VG_(parse_procselfmaps) ( read_maps_callback );
+ VG_(parse_procselfmaps) ( read_maps_callback, NULL );
=20
VG_(am_show_nsegments)(2, "With contents of /proc/self/maps");
=20
Modified: branches/ASPACEM/coregrind/m_aspacemgr/read_procselfmaps.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_aspacemgr/read_procselfmaps.c 2005-09-21=
10:16:49 UTC (rev 4718)
+++ branches/ASPACEM/coregrind/m_aspacemgr/read_procselfmaps.c 2005-09-21=
12:01:37 UTC (rev 4719)
@@ -44,6 +44,9 @@
/* Records length of /proc/self/maps read into procmap_buf. */
static Int buf_n_tot;
=20
+/* Minimum and maximum addresses */
+#define Addr_MIN ((Addr)0)
+#define Addr_MAX ((Addr)(-1ULL))
=20
/* Helper fns. */
=20
@@ -148,11 +151,12 @@
*/
void VG_(parse_procselfmaps) (
void (*record_mapping)( Addr addr, SizeT len, UInt prot,
- UInt dev, UInt ino, ULong foff, const UChar* filename )
+ UInt dev, UInt ino, ULong foff, const UChar* filename ),
+ void (*record_gap)( Addr addr, SizeT len )
)
{
Int i, j, i_eol;
- Addr start, endPlusOne;
+ Addr start, endPlusOne, gapStart;
UChar* filename;
UChar rr, ww, xx, pp, ch, tmp;
UInt ino, prot;
@@ -167,6 +171,7 @@
=20
/* Ok, it's safely aboard. Parse the entries. */
i =3D 0;
+ gapStart =3D Addr_MIN;
while (True) {
if (i >=3D buf_n_tot) break;
=20
@@ -265,6 +270,9 @@
if (ww =3D=3D 'w') prot |=3D VKI_PROT_WRITE;
if (xx =3D=3D 'x') prot |=3D VKI_PROT_EXEC;
=20
+ if (record_gap && gapStart < start)
+ (*record_gap) ( gapStart, start-gapStart );
+
(*record_mapping) ( start, endPlusOne-start,=20
prot, maj * 256 + min, ino,
foffset, filename );
@@ -274,7 +282,11 @@
}
=20
i =3D i_eol + 1;
+ gapStart =3D endPlusOne;
}
+
+ if (record_gap && gapStart < Addr_MAX)
+ (*record_gap) ( gapStart, Addr_MAX - gapStart + 1 );
}
=20
/*--------------------------------------------------------------------*/
Modified: branches/ASPACEM/coregrind/pub_core_aspacemgr.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/pub_core_aspacemgr.h 2005-09-21 10:16:49 U=
TC (rev 4718)
+++ branches/ASPACEM/coregrind/pub_core_aspacemgr.h 2005-09-21 12:01:37 U=
TC (rev 4719)
@@ -46,7 +46,8 @@
void VG_(parse_procselfmaps) (
void (*record_mapping)( Addr addr, SizeT len, UInt prot,
UInt dev, UInt ino, ULong foff,
- const UChar *filename ) );
+ const UChar *filename ),
+ void (*record_gap)( Addr addr, SizeT len ) );
=20
//--------------------------------------------------------------
// Definition of address-space segments
|
|
From: <sv...@va...> - 2005-09-21 10:16:57
|
Author: sewardj Date: 2005-09-21 11:16:49 +0100 (Wed, 21 Sep 2005) New Revision: 4718 Log: Create a new module: m_clientstate. This holds various pieces of data to do with the state of the user-space simulation, that have never really had satisfactory homes before, and so had been sofa-surfing in various other modules. Start off by importing a bunch of stuff which had been hanging out in m_aspacemgr. Added: branches/ASPACEM/coregrind/m_clientstate.c branches/ASPACEM/coregrind/pub_core_clientstate.h Modified: branches/ASPACEM/coregrind/Makefile.am branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c branches/ASPACEM/coregrind/m_main.c branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.c branches/ASPACEM/coregrind/pub_core_aspacemgr.h Modified: branches/ASPACEM/coregrind/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/Makefile.am 2005-09-21 09:44:22 UTC (rev 4= 717) +++ branches/ASPACEM/coregrind/Makefile.am 2005-09-21 10:16:49 UTC (rev 4= 718) @@ -35,6 +35,7 @@ coregrind.h \ pub_core_aspacemgr.h \ pub_core_basics.h \ + pub_core_clientstate.h \ pub_core_commandline.h \ pub_core_cpuid.h \ pub_core_debuginfo.h \ @@ -92,6 +93,7 @@ libcoregrind_singles_a_SOURCES =3D \ m_commandline.c \ m_cpuid.S \ + m_clientstate.c \ m_debugger.c \ m_debuglog.c \ m_errormgr.c \ Modified: branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c 2005-09-21 09:44:2= 2 UTC (rev 4717) +++ branches/ASPACEM/coregrind/m_aspacemgr/aspacemgr.c 2005-09-21 10:16:4= 9 UTC (rev 4718) @@ -55,28 +55,6 @@ =20 /*-----------------------------------------------------------------*/ /*--- ---*/ -/*--- Basic globals about the address space. ---*/ -/*--- ---*/ -/*-----------------------------------------------------------------*/ - -// FIXME: these are nothing to do with the address space manager -// and should be moved elsewhere. - -/* Client address space, lowest to highest (see top of ume.c) */ -Addr VG_(client_base); /* client address space limits */ -Addr VG_(client_end); - -Addr VG_(clstk_base); -Addr VG_(clstk_end); -UWord VG_(clstk_id); - -Addr VG_(brk_base) =3D 0; /* start of brk */ -Addr VG_(brk_limit) =3D 0; /* current brk */ - - - -/*-----------------------------------------------------------------*/ -/*--- ---*/ /*--- The Address Space Manager's state. ---*/ /*--- ---*/ /*-----------------------------------------------------------------*/ Added: branches/ASPACEM/coregrind/m_clientstate.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_clientstate.c 2005-09-21 09:44:22 UTC (r= ev 4717) +++ branches/ASPACEM/coregrind/m_clientstate.c 2005-09-21 10:16:49 UTC (r= ev 4718) @@ -0,0 +1,58 @@ + +/*--------------------------------------------------------------------*/ +/*--- A home for miscellaneous bits of information which pertain ---*/ +/*--- to the client's state. ---*/ +/*--- m_clientstate.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2000-2005 Julian Seward=20 + 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_clientstate.h" + +/*-----------------------------------------------------------------*/ +/*--- ---*/ +/*--- Basic globals about the address space. ---*/ +/*--- ---*/ +/*-----------------------------------------------------------------*/ + +// TODO: get rid of as many of these as possible. + +/* Client address space, lowest to highest (see top of ume.c) */ +Addr VG_(client_base); /* client address space limits */ +Addr VG_(client_end); + +Addr VG_(clstk_base); +Addr VG_(clstk_end); +UWord VG_(clstk_id); + +Addr VG_(brk_base) =3D 0; /* start of brk */ +Addr VG_(brk_limit) =3D 0; /* current brk */ + + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ Modified: branches/ASPACEM/coregrind/m_main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_main.c 2005-09-21 09:44:22 UTC (rev 4717= ) +++ branches/ASPACEM/coregrind/m_main.c 2005-09-21 10:16:49 UTC (rev 4718= ) @@ -32,6 +32,7 @@ =20 #include "pub_core_basics.h" #include "pub_core_threadstate.h" +#include "pub_core_clientstate.h" #include "pub_core_aspacemgr.h" #include "pub_core_commandline.h" #include "pub_core_debuglog.h" Modified: branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.c 2005-09-21 09:= 44:22 UTC (rev 4717) +++ branches/ASPACEM/coregrind/m_syswrap/syswrap-generic.c 2005-09-21 10:= 16:49 UTC (rev 4718) @@ -32,6 +32,7 @@ #include "pub_core_threadstate.h" #include "pub_core_debuginfo.h" // VG_(di_notify_*) #include "pub_core_aspacemgr.h" +#include "pub_core_clientstate.h" // VG_(brk_base), VG_(brk_limit) #include "pub_core_debuglog.h" #include "pub_core_errormgr.h" #include "pub_core_libcbase.h" Modified: branches/ASPACEM/coregrind/pub_core_aspacemgr.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/pub_core_aspacemgr.h 2005-09-21 09:44:22 U= TC (rev 4717) +++ branches/ASPACEM/coregrind/pub_core_aspacemgr.h 2005-09-21 10:16:49 U= TC (rev 4718) @@ -41,17 +41,6 @@ =20 #include "pub_tool_aspacemgr.h" =20 -// Address space globals -extern Addr VG_(client_base); // client address space limits -extern Addr VG_(client_end); - -extern Addr VG_(clstk_base); // client stack range -extern Addr VG_(clstk_end); -extern UWord VG_(clstk_id); // client stack id - -extern Addr VG_(brk_base); // start of brk -extern Addr VG_(brk_limit); // current brk - /* Parses /proc/self/maps, calling `record_mapping' for each entry. */ extern=20 void VG_(parse_procselfmaps) ( Added: branches/ASPACEM/coregrind/pub_core_clientstate.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/pub_core_clientstate.h 2005-09-21 09:44:22= UTC (rev 4717) +++ branches/ASPACEM/coregrind/pub_core_clientstate.h 2005-09-21 10:16:49= UTC (rev 4718) @@ -0,0 +1,56 @@ + +/*--------------------------------------------------------------------*/ +/*--- Misc client state info pub_core_clientstate.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2000-2005 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_CLIENTSTATE_H +#define __PUB_CORE_CLIENTSTATE_H + +//-------------------------------------------------------------------- +// PURPOSE: This module holds various bits of client state which don't +// live comfortably anywhere else. Note that the ThreadStates for the +// client don't live here; they instead live in m_threadstate.h. +//-------------------------------------------------------------------- + +// Address space globals +extern Addr VG_(client_base); // client address space limits +extern Addr VG_(client_end); + +extern Addr VG_(clstk_base); // client stack range +extern Addr VG_(clstk_end); +extern UWord VG_(clstk_id); // client stack id + +extern Addr VG_(brk_base); // start of brk +extern Addr VG_(brk_limit); // current brk + + +#endif // __PUB_CORE_CLIENTSTATE_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ |
|
From: <sv...@va...> - 2005-09-21 09:44:24
|
Author: sewardj Date: 2005-09-21 10:44:22 +0100 (Wed, 21 Sep 2005) New Revision: 4717 Log: Delete m_libmman. All mmap-related requests now have to go via m_aspacemgr instead. Removed: branches/ASPACEM/coregrind/m_libcmman.c branches/ASPACEM/coregrind/pub_core_libcmman.h branches/ASPACEM/include/pub_tool_libcmman.h Modified: branches/ASPACEM/coregrind/Makefile.am branches/ASPACEM/coregrind/m_debuginfo/symtab.c branches/ASPACEM/coregrind/m_debuginfo/symtypes.c branches/ASPACEM/coregrind/m_main.c branches/ASPACEM/coregrind/m_mallocfree.c branches/ASPACEM/coregrind/m_signals.c branches/ASPACEM/include/Makefile.am branches/ASPACEM/massif/ms_main.c Modified: branches/ASPACEM/coregrind/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/Makefile.am 2005-09-21 09:25:40 UTC (rev 4= 716) +++ branches/ASPACEM/coregrind/Makefile.am 2005-09-21 09:44:22 UTC (rev 4= 717) @@ -49,7 +49,6 @@ pub_core_libcbase.h \ pub_core_libcassert.h \ pub_core_libcfile.h \ - pub_core_libcmman.h \ pub_core_libcprint.h \ pub_core_libcproc.h \ pub_core_libcsignal.h \ @@ -101,7 +100,6 @@ m_libcbase.c \ m_libcassert.c \ m_libcfile.c \ - m_libcmman.c \ m_libcprint.c \ m_libcproc.c \ m_libcsignal.c \ Modified: branches/ASPACEM/coregrind/m_debuginfo/symtab.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_debuginfo/symtab.c 2005-09-21 09:25:40 U= TC (rev 4716) +++ branches/ASPACEM/coregrind/m_debuginfo/symtab.c 2005-09-21 09:44:22 U= TC (rev 4717) @@ -36,7 +36,6 @@ #include "pub_core_libcbase.h" #include "pub_core_libcassert.h" #include "pub_core_libcfile.h" -#include "pub_core_libcmman.h" #include "pub_core_libcprint.h" #include "pub_core_machine.h" #include "pub_core_mallocfree.h" Modified: branches/ASPACEM/coregrind/m_debuginfo/symtypes.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_debuginfo/symtypes.c 2005-09-21 09:25:40= UTC (rev 4716) +++ branches/ASPACEM/coregrind/m_debuginfo/symtypes.c 2005-09-21 09:44:22= UTC (rev 4717) @@ -33,7 +33,6 @@ #include "pub_core_debuglog.h" // For VG_(debugLog_vprintf) #include "pub_core_libcbase.h" #include "pub_core_libcassert.h" -#include "pub_core_libcmman.h" #include "pub_core_libcprint.h" #include "pub_core_libcsignal.h" #include "pub_core_machine.h" Deleted: branches/ASPACEM/coregrind/m_libcmman.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_libcmman.c 2005-09-21 09:25:40 UTC (rev = 4716) +++ branches/ASPACEM/coregrind/m_libcmman.c 2005-09-21 09:44:22 UTC (rev = 4717) @@ -1,36 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- Memory management libc stuff. m_libcmman.c ---*/ -/*--------------------------------------------------------------------*/ -=20 -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 Julian Seward=20 - 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. -*/ - - - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ - Modified: branches/ASPACEM/coregrind/m_main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_main.c 2005-09-21 09:25:40 UTC (rev 4716= ) +++ branches/ASPACEM/coregrind/m_main.c 2005-09-21 09:44:22 UTC (rev 4717= ) @@ -40,7 +40,6 @@ #include "pub_core_libcbase.h" #include "pub_core_libcassert.h" #include "pub_core_libcfile.h" -#include "pub_core_libcmman.h" #include "pub_core_libcprint.h" #include "pub_core_libcproc.h" #include "pub_core_libcsignal.h" Modified: branches/ASPACEM/coregrind/m_mallocfree.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_mallocfree.c 2005-09-21 09:25:40 UTC (re= v 4716) +++ branches/ASPACEM/coregrind/m_mallocfree.c 2005-09-21 09:44:22 UTC (re= v 4717) @@ -34,7 +34,6 @@ #include "pub_core_libcbase.h" #include "pub_core_aspacemgr.h" #include "pub_core_libcassert.h" -#include "pub_core_libcmman.h" #include "pub_core_libcprint.h" #include "pub_core_mallocfree.h" #include "pub_core_options.h" Modified: branches/ASPACEM/coregrind/m_signals.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/m_signals.c 2005-09-21 09:25:40 UTC (rev 4= 716) +++ branches/ASPACEM/coregrind/m_signals.c 2005-09-21 09:44:22 UTC (rev 4= 717) @@ -87,7 +87,6 @@ #include "pub_core_errormgr.h" #include "pub_core_libcbase.h" #include "pub_core_libcassert.h" -#include "pub_core_libcmman.h" #include "pub_core_libcprint.h" #include "pub_core_libcproc.h" #include "pub_core_libcsignal.h" Deleted: branches/ASPACEM/coregrind/pub_core_libcmman.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/coregrind/pub_core_libcmman.h 2005-09-21 09:25:40 UT= C (rev 4716) +++ branches/ASPACEM/coregrind/pub_core_libcmman.h 2005-09-21 09:44:22 UT= C (rev 4717) @@ -1,45 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- Memory management libc stuff. pub_core_libcmman.h ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 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_LIBCMMAN_H -#define __PUB_CORE_LIBCMMAN_H - -//-------------------------------------------------------------------- -// PURPOSE: This module contains libc code related to low-level -// memory management, ie. mmap and friends. -//-------------------------------------------------------------------- - -#include "pub_tool_libcmman.h" - -#endif // __PUB_CORE_LIBCMMAN_H - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ Modified: branches/ASPACEM/include/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/include/Makefile.am 2005-09-21 09:25:40 UTC (rev 471= 6) +++ branches/ASPACEM/include/Makefile.am 2005-09-21 09:44:22 UTC (rev 471= 7) @@ -13,7 +13,6 @@ pub_tool_libcbase.h \ pub_tool_libcassert.h \ pub_tool_libcfile.h \ - pub_tool_libcmman.h \ pub_tool_libcprint.h \ pub_tool_libcproc.h \ pub_tool_libcsignal.h \ Deleted: branches/ASPACEM/include/pub_tool_libcmman.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/include/pub_tool_libcmman.h 2005-09-21 09:25:40 UTC = (rev 4716) +++ branches/ASPACEM/include/pub_tool_libcmman.h 2005-09-21 09:44:22 UTC = (rev 4717) @@ -1,38 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- Memory management libc stuff. pub_tool_libcmman.h ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 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_LIBCMMAN_H -#define __PUB_TOOL_LIBCMMAN_H - -#endif // __PUB_TOOL_LIBCMMAN_H - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ Modified: branches/ASPACEM/massif/ms_main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/ASPACEM/massif/ms_main.c 2005-09-21 09:25:40 UTC (rev 4716) +++ branches/ASPACEM/massif/ms_main.c 2005-09-21 09:44:22 UTC (rev 4717) @@ -41,7 +41,6 @@ #include "pub_tool_libcbase.h" #include "pub_tool_libcassert.h" #include "pub_tool_libcfile.h" -#include "pub_tool_libcmman.h" #include "pub_tool_libcprint.h" #include "pub_tool_libcproc.h" #include "pub_tool_machine.h" |
|
From: <sv...@va...> - 2005-09-21 09:25:48
|
Author: sewardj
Date: 2005-09-21 10:25:40 +0100 (Wed, 21 Sep 2005)
New Revision: 4716
Log:
Comment wibbles.
Modified:
branches/ASPACEM/coregrind/m_main.c
Modified: branches/ASPACEM/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_main.c 2005-09-21 04:44:28 UTC (rev 4715=
)
+++ branches/ASPACEM/coregrind/m_main.c 2005-09-21 09:25:40 UTC (rev 4716=
)
@@ -1909,9 +1909,14 @@
struct vki_rlimit zero =3D { 0, 0 };
=20
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ //
// Nb: startup is complex. Prerequisites are shown at every step.
+ // *** Be very careful when messing with the order ***
//
- // *** Be very careful when messing with the order ***
+ // The first order of business is to get debug logging, the address
+ // space manager and the dynamic memory manager up and running.
+ // Once that's done, we can relax a bit.
+ //
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
/* This is needed to make VG_(getenv) usable early. */
@@ -1993,25 +1998,23 @@
}
VG_(debugLog)(1, "main", "Dynamic memory manager is running\n");
=20
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ //
+ // Dynamic memory management is now available.
+ //
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
//--------------------------------------------------------------
// Extract the stage1 name from the environment.
VG_(debugLog)(1, "main", "Getting stage1's name\n");
name_of_stage1 =3D VG_(getenv)(VALGRINDSTAGE1);
if (name_of_stage1 =3D=3D NULL) {
- VG_(printf)("valgrind: You cannot run the tool binary directly.\n"=
);
+ VG_(printf)("valgrind: You cannot run '%s' directly.\n", argv[0]);
VG_(printf)("valgrind: You should use $prefix/bin/valgrind.\n");
VG_(exit)(1);
}
=20
- //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
- // Command line argument handling order:
- // * If --help/--help-debug are present, show usage message=20
- // (including the tool-specific usage)
- // * (If no --tool option given, default to Memcheck)
- // * Then, if client is missing, abort with error msg
- // * Then, if any cmdline args are bad, abort with error msg
- //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-
+ //--------------------------------------------------------------
// Get the current process datasize rlimit, and set it to zero.
// This prevents any internal uses of brk() from having any effect.
// We remember the old value so we can restore it on exec, so that
@@ -2045,6 +2048,15 @@
VG_(libdir) =3D cp;
}
=20
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ // Command line argument handling order:
+ // * If --help/--help-debug are present, show usage message=20
+ // (including the tool-specific usage)
+ // * (If no --tool option given, default to Memcheck)
+ // * Then, if client is missing, abort with error msg
+ // * Then, if any cmdline args are bad, abort with error msg
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
//--------------------------------------------------------------
// Get valgrind args + client args (inc. from VALGRIND_OPTS/.valgrind=
rc).
// Pre-process the command line.
|
|
From: <sv...@va...> - 2005-09-21 04:44:33
|
Author: sewardj
Date: 2005-09-21 05:44:28 +0100 (Wed, 21 Sep 2005)
New Revision: 4715
Log:
Comment-only change.
Modified:
branches/ASPACEM/coregrind/m_main.c
Modified: branches/ASPACEM/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_main.c 2005-09-20 23:09:00 UTC (rev 4714=
)
+++ branches/ASPACEM/coregrind/m_main.c 2005-09-21 04:44:28 UTC (rev 4715=
)
@@ -1883,55 +1883,12 @@
}
=20
=20
-/*
- This code decides on the layout of the client and Valgrind address
- spaces, loads valgrind.so and the tool.so into the valgrind part,
- loads the client executable (and the dynamic linker, if necessary)
- into the client part, and calls into Valgrind proper.
-
- The code is careful not to allow spurious mappings to appear in the
- wrong parts of the address space. In particular, to make sure
- dlopen puts things in the right place, it will pad out the forbidden
- chunks of address space so that dlopen is forced to put things where
- we want them.
-
- The memory map it creates is:
-
- client_base +-------------------------+
- | client address space |
- : :
- : :
- | client stack |
- client_end +-------------------------+
- | redzone |
- shadow_base +-------------------------+
- | |
- : shadow memory for tools :
- | (may be 0 sized) |
- shadow_end +-------------------------+
- valgrind_base +-------------------------+
- | kickstart executable |
- | valgrind heap vvvvvvvvv| (barely used)
- - -
- | valgrind .so files |
- | and mappings |
- - -
- | valgrind stack ^^^^^^^^^|
- valgrind_last +-------------------------+
- : kernel :
-
- Nb: Before we can do general allocations with VG_(arena_malloc)() and
- VG_(mmap)(), we need to build the segment skip-list, so we know where
- we can put things. However, building that structure requires
- allocating memory. So we need to a bootstrapping process. It's done
- by making VG_(arena_malloc)() have a special static superblock that's
- used for the first 1MB's worth of allocations. This is enough to
- build the segment skip-list.
-*/
-
-
/* When main() is entered, we should be on the following stack, not
- the one the kernel gave us. */
+ the one the kernel gave us. We will run on this stack until
+ simulation of the root thread is started, at which point a transfer
+ is made to a dynamically allocated stack. This is for the sake of
+ uniform overflow detection for all Valgrind threads. */
+
VgStack VG_(the_root_stack);
=20
=20
@@ -1955,12 +1912,6 @@
// Nb: startup is complex. Prerequisites are shown at every step.
//
// *** Be very careful when messing with the order ***
- //
- // TODO (JRS 9 Aug 05):=20
- // - there's circular dependencies with VG_(getenv).
- // TODO: review and clarify all issues to do with
- // environment variables.
- // =20
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
/* This is needed to make VG_(getenv) usable early. */
|
|
From: <js...@ac...> - 2005-09-21 02:57:14
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-09-21 03:30:00 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 185 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: <js...@ac...> - 2005-09-21 02:45:50
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2005-09-21 04:40:00 CEST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 158 tests, 17 stderr failures, 1 stdout failure ================= memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/fprw (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/dlclose (stdout) cachegrind/tests/dlclose (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/fdleak_ipv4 (stderr) |
|
From: Tom H. <to...@co...> - 2005-09-21 02:41:11
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-09-21 03:30:03 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 == 187 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-09-21 02:28:45
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-09-21 03:15:04 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 186 tests, 14 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/yield (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 == 186 tests, 14 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Sep 21 03:22:17 2005 --- new.short Wed Sep 21 03:28:40 2005 *************** *** 8,10 **** ! == 186 tests, 14 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 186 tests, 14 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) *************** *** 23,24 **** --- 23,25 ---- none/tests/x86/int (stderr) + none/tests/x86/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-09-21 02:26:08
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-09-21 03:10:11 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 186 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 186 tests, 2 stderr failures, 1 stdout failure ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/yield (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Sep 21 03:19:44 2005 --- new.short Wed Sep 21 03:26:01 2005 *************** *** 8,13 **** ! == 186 tests, 2 stderr failures, 1 stdout failure ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) - none/tests/x86/yield (stdout) --- 8,12 ---- ! == 186 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-09-21 02:21:37
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2005-09-21 03:10:11 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 == 164 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) |
|
From: Tom H. <th...@cy...> - 2005-09-21 02:19:49
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2005-09-21 03:05:07 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 == 164 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) |
|
From: Tom H. <th...@cy...> - 2005-09-21 02:15:50
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-09-21 03:00:03 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 == 164 tests, 7 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) |