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
(21) |
2
(18) |
3
(19) |
4
(17) |
|
5
(6) |
6
(5) |
7
(9) |
8
(21) |
9
(16) |
10
(21) |
11
(22) |
|
12
(19) |
13
(19) |
14
(8) |
15
(16) |
16
(17) |
17
(16) |
18
(33) |
|
19
(33) |
20
(34) |
21
(32) |
22
(26) |
23
(23) |
24
(16) |
25
(21) |
|
26
(19) |
27
(7) |
28
(29) |
29
(27) |
30
(55) |
|
|
|
From: Tom H. <th...@cy...> - 2005-06-03 02:30:30
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-06-03 03:25:02 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 == 175 tests, 19 stderr failures, 13 stdout failures ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/pth_atfork1 (stdout) corecheck/tests/pth_atfork1 (stderr) corecheck/tests/pth_cancel1 (stdout) corecheck/tests/pth_cancel1 (stderr) corecheck/tests/pth_cancel2 (stderr) corecheck/tests/pth_cvsimple (stdout) corecheck/tests/pth_cvsimple (stderr) corecheck/tests/pth_exit (stderr) corecheck/tests/pth_once (stdout) corecheck/tests/pth_once (stderr) corecheck/tests/res_search (stdout) corecheck/tests/res_search (stderr) corecheck/tests/threadederrno (stdout) corecheck/tests/threadederrno (stderr) none/tests/faultstatus (stderr) none/tests/manythreads (stdout) none/tests/manythreads (stderr) none/tests/pth_blockedsig (stdout) none/tests/pth_blockedsig (stderr) none/tests/pth_stackalign (stdout) none/tests/pth_stackalign (stderr) none/tests/thread-exits (stdout) none/tests/thread-exits (stderr) none/tests/threaded-fork (stdout) none/tests/threaded-fork (stderr) none/tests/tls (stdout) none/tests/tls (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) none/tests/yield (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-03 02:25:41
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-06-03 03:20:02 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 == 174 tests, 4 stderr failures, 1 stdout failure ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) |
|
From: Julian S. <js...@ac...> - 2005-06-03 02:24:45
|
> If everyone's OK with this, I'll add some documentation, more tests and > commit it to the 2.4 tree and 3.0 tree over the weekend. Looks ok, but .. - I'd prefer to stick with the simple linked list until you have performance data showing it to be a problem - Putting it in m_aspacemgr is troublesome because it uses VG_(arena_malloc) and therefore exacerbates the existing circular dependency between m_aspacemgr and m_mallocfree. Moves are afoot to break that cycle, and this would set it back. What would be helpful is if you could add a comment to the additions to m_aspacemgr giving an overview of what the code actually does. - Could you add documentation to the XML sources describing the new client reqs? It occurs to me the first two points might be solved by getting rid of the linked list and dynamic allocation of struct _Stack, and instead having a fixed sized statically allocated array, which, if you kept it in order, could give you O(log N) searching. J |
|
From: Tom H. <th...@cy...> - 2005-06-03 02:21:10
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-06-03 03:15:02 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 == 174 tests, 13 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (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/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-06-03 02:19:15
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-06-03 03:10:03 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 == 155 tests, 15 stderr failures, 2 stdout failures ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-06-03 02:05:15
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-06-03 03:00:02 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 == 155 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |
|
From: Julian S. <js...@ac...> - 2005-06-03 02:04:43
|
> On Monday 17 January 2005 10:37, Tom Hughes wrote: > > Sev Binello <se...@bn...> wrote: > > A while back I posted the message below indicating that Valgrind > > was not producing the > > full path for source code built with gcc 3.2.3 > > [...] > > There was a long discussion about this before when somebody wanted > the full path and consensus seemed to be against it except perhaps > as an option. Tom -- where is this discussion? I'd like to re-read it, but I can't find it. J |
|
From: Nicholas N. <nj...@cs...> - 2005-06-02 21:31:07
|
On Thu, 2 Jun 2005, Jeremy Fitzhardinge wrote: >> I have a patch that lets you use the regular skip-list as an interval >> skip-list, with just minor changes to the API. It's from a while ago, >> though. > > A skiplist can represent non-overlapping intervals, but an interval > skiplist is a related but significantly more complex datastructure which > stores overlapping intervals and allows efficient stab queries (ie, all > intervals which overlap a point). Oh, yep, you're right. > I'm just being pedantic. A skiplist containing intervals (like the > Segment list in 2.4) will do the job. The 2.4 skiplist doesn't do intervals nicely, because you have to do the skiplist lookup and then another check "is this in the interval?" afterwards. My patch made this case nicer. N |
|
From: Jeremy F. <je...@go...> - 2005-06-02 21:25:27
|
Robert Walsh wrote:
>You mean that one that already comes with Valgrind?
>
Nick said:
> I have a patch that lets you use the regular skip-list as an interval
> skip-list, with just minor changes to the API. It's from a while ago,
> though.
A skiplist can represent non-overlapping intervals, but an interval
skiplist is a related but significantly more complex datastructure which
stores overlapping intervals and allows efficient stab queries (ie, all
intervals which overlap a point).
I'm just being pedantic. A skiplist containing intervals (like the
Segment list in 2.4) will do the job.
J
|
|
From: Nicholas N. <nj...@cs...> - 2005-06-02 20:56:53
|
On Thu, 2 Jun 2005, Jeremy Fitzhardinge wrote: > (It's just a regular skip-list, not an interval skip-list.) I have a patch that lets you use the regular skip-list as an interval skip-list, with just minor changes to the API. It's from a while ago, though. N |
|
From: Robert W. <rj...@du...> - 2005-06-02 20:29:38
|
> > * It could probably be made a bit more efficient by using an > > interval skip-list to store the registered stack data instead of > > a simple linked-list. After I see the performance impact, I'll > > decide about this. > > > > > (It's just a regular skip-list, not an interval skip-list.) You mean that one that already comes with Valgrind? |
|
From: Jeremy F. <je...@go...> - 2005-06-02 20:27:12
|
Robert Walsh wrote:
>Still to do:
>
> * Document usage.
> * Measure performance impact.
> * Write tests for VALGRIND_STACK_DELETE and VALGRIND_STACK_CHANGE.
> * It could probably be made a bit more efficient by using an
> interval skip-list to store the registered stack data instead of
> a simple linked-list. After I see the performance impact, I'll
> decide about this.
>
>
(It's just a regular skip-list, not an interval skip-list.)
J
|
|
From: Robert W. <rj...@du...> - 2005-06-02 17:55:14
|
> Re performance, I wouldn't think it would make much difference to program= s=20 > that don't use stack switching, since it only affects code that doesn't=20 > get run terribly often. It would be good to confirm that with numbers,=20 > though. Right. That's why I didn't spend a huge amount of time optimizing it. If everyone's OK with this, I'll add some documentation, more tests and commit it to the 2.4 tree and 3.0 tree over the weekend. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: Nicholas N. <nj...@cs...> - 2005-06-02 16:15:40
|
On Wed, 1 Jun 2005, Robert Walsh wrote: > I've updated my stack changing patch (and rearranged my web page a > little.) > > Still to do: > > * Document usage. > * Measure performance impact. > * Write tests for VALGRIND_STACK_DELETE and VALGRIND_STACK_CHANGE. > * It could probably be made a bit more efficient by using an > interval skip-list to store the registered stack data instead of > a simple linked-list. After I see the performance impact, I'll > decide about this. I like this. It's a good approach to a problem we've had for a long time. --max-stackframe is also good but this seems necessary for the harder cases. It's a pretty clean addition too, which is good. Re performance, I wouldn't think it would make much difference to programs that don't use stack switching, since it only affects code that doesn't get run terribly often. It would be good to confirm that with numbers, though. N |
|
From: Robert W. <rj...@du...> - 2005-06-02 06:33:41
|
Hi all, I've updated my stack changing patch (and rearranged my web page a little.) http://www.durables.org/~rjwalsh/software/valgrind/ New in this version: * Added a version of the patch for Valgrind 3.0. * Made some minor modifications to make the 2.4 version look more like the resulting 3.0 version. * Incorporated some feedback from Nick about names. The user requests are now called VALGRIND_STACK_REGISTER and VALGRIND_STACK_DEREGISTER (instead of VALGRIND_STACK_NEW and VALGRIND_STACK_DELETE.) Still to do: * Document usage. * Measure performance impact. * Write tests for VALGRIND_STACK_DELETE and VALGRIND_STACK_CHANGE. * It could probably be made a bit more efficient by using an interval skip-list to store the registered stack data instead of a simple linked-list. After I see the performance impact, I'll decide about this. If you missed what this is all about, here's what I said in my last email: The patch allows user-land thread packages (e.g. coroutines) to deal with stack changes gracefully. Currently, Valgrind notices when %esp changes and uses a heuristic to figure out if that possibly means a thread change, or just that something large was pushed onto the stack. It often gets it wrong, since the heuristic is basically: =20 if delta %esp > some value, then assume a thread change =20 The problem is, it's hard to know what a good "some value" is since it depends a lot of how your program is written. =20 The change I've made allows you to register a memory range as a stack with Valgrind. Valgrind spots when %esp changes and checks if it's changed to a different registered stack. If it has, then it assumes a thread change. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
Author: njn
Date: 2005-06-02 04:52:53 +0100 (Thu, 02 Jun 2005)
New Revision: 3839
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_debuginfo/symtab.c
trunk/coregrind/m_main.c
trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
trunk/coregrind/m_sigframe/sigframe-x86-linux.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
trunk/coregrind/m_syscalls/syscalls-linux.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
trunk/coregrind/m_syscalls/syscalls.c
trunk/coregrind/stage1.c
trunk/coregrind/ume.c
trunk/helgrind/hg_main.c
trunk/include/tool.h
trunk/memcheck/mac_leakcheck.c
Log:
Rename *ROUND* as VG_*ROUND* to be consistent with everything else. Also
make them tool-visible, so that Memcheck and Helgrind don't have to defin=
ed
their own versions!
Modified: trunk/coregrind/core.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
--- trunk/coregrind/core.h 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/coregrind/core.h 2005-06-02 03:52:53 UTC (rev 3839)
@@ -49,12 +49,6 @@
/* Max length of a text fragment used to construct error messages. */
#define VG_ERRTXT_LEN 4096
=20
-// 'a' -- the alignment -- must be a power of 2
-#define ROUNDDN(p, a) ((Addr)(p) & ~((Addr)(a)-1))
-#define ROUNDUP(p, a) ROUNDDN((p)+(a)-1, (a))
-#define PGROUNDDN(p) ROUNDDN(p, VKI_PAGE_SIZE)
-#define PGROUNDUP(p) ROUNDUP(p, VKI_PAGE_SIZE)
-
/* ---------------------------------------------------------------------
Environment variables
------------------------------------------------------------------ */
Modified: trunk/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
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-06-02 03:39:33 UTC (rev =
3838)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-06-02 03:52:53 UTC (rev =
3839)
@@ -583,7 +583,7 @@
if (len =3D=3D 0)
return;
=20
- len =3D PGROUNDUP(len);
+ len =3D VG_PGROUNDUP(len);
=20
if (debug)
VG_(printf)("unmap_range(%p, %lu)\n", addr, len);
@@ -705,7 +705,7 @@
=20
/* Everything must be page-aligned */
vg_assert(VG_IS_PAGE_ALIGNED(addr));
- len =3D PGROUNDUP(len);
+ len =3D VG_PGROUNDUP(len);
=20
/* Nuke/truncate any existing segment(s) covering [addr,addr+len) */
VG_(unmap_range)(addr, len);
@@ -816,7 +816,7 @@
=20
/* Everything must be page-aligned */
vg_assert(VG_IS_PAGE_ALIGNED(a));
- len =3D PGROUNDUP(len);
+ len =3D VG_PGROUNDUP(len);
=20
split_segment(a);
split_segment(a+len);
@@ -868,7 +868,7 @@
=20
/* Everything must be page-aligned */
vg_assert((addr & (VKI_PAGE_SIZE-1)) =3D=3D 0);
- len =3D PGROUNDUP(len);
+ len =3D VG_PGROUNDUP(len);
=20
len +=3D VKI_PAGE_SIZE * 2; /* leave redzone gaps before and after ma=
pping */
=20
@@ -1158,8 +1158,8 @@
if (size =3D=3D 0)
return True; /* isn't this a bit of a strange case? */
=20
- p =3D PGROUNDDN(p);
- size =3D PGROUNDUP(size);
+ p =3D VG_PGROUNDDN(p);
+ size =3D VG_PGROUNDUP(size);
vg_assert(VG_IS_PAGE_ALIGNED(p));
vg_assert(VG_IS_PAGE_ALIGNED(size));
=20
@@ -1184,7 +1184,7 @@
Addr VG_(get_memory_from_mmap_for_client)
(Addr addr, SizeT len, UInt prot, UInt sf_flags)
{
- len =3D PGROUNDUP(len);
+ len =3D VG_PGROUNDUP(len);
=20
tl_assert(!(sf_flags & SF_FIXED));
tl_assert(0 =3D=3D addr);
@@ -1259,15 +1259,15 @@
vg_assert(VG_(needs).shadow_memory);
vg_assert(VG_(tdict).track_init_shadow_page);
=20
- sz =3D PGROUNDUP(p+sz) - PGROUNDDN(p);
- p =3D PGROUNDDN(p);
+ sz =3D VG_PGROUNDUP(p+sz) - VG_PGROUNDDN(p);
+ p =3D VG_PGROUNDDN(p);
=20
VG_(mprotect)((void *)p, sz, VKI_PROT_READ|VKI_PROT_WRITE);
=20
if (call_init)=20
while(sz) {
/* ask the tool to initialize each page */
- VG_TRACK( init_shadow_page, PGROUNDDN(p) );
+ VG_TRACK( init_shadow_page, VG_PGROUNDDN(p) );
=20
p +=3D VKI_PAGE_SIZE;
sz -=3D VKI_PAGE_SIZE;
@@ -1285,7 +1285,7 @@
vg_assert(VG_(needs).shadow_memory);
vg_assert(!VG_(tdict).track_init_shadow_page);
=20
- size =3D PGROUNDUP(size);
+ size =3D VG_PGROUNDUP(size);
=20
if (shadow_alloc =3D=3D 0)
shadow_alloc =3D VG_(shadow_base);
Modified: trunk/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
--- trunk/coregrind/m_debuginfo/symtab.c 2005-06-02 03:39:33 UTC (rev 383=
8)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-06-02 03:52:53 UTC (rev 383=
9)
@@ -1654,7 +1654,7 @@
=20
/* Did we find a debuglink section? */
if (debuglink !=3D NULL) {
- UInt crc_offset =3D ROUNDUP(VG_(strlen)(debuglink)+1, 4);
+ UInt crc_offset =3D VG_ROUNDUP(VG_(strlen)(debuglink)+1, 4);
UInt crc;
=20
vg_assert(crc_offset + sizeof(UInt) <=3D debuglink_sz);
Modified: trunk/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
--- trunk/coregrind/m_main.c 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/coregrind/m_main.c 2005-06-02 03:52:53 UTC (rev 3839)
@@ -300,7 +300,7 @@
break;
=20
case AT_PHDR:
- VG_(valgrind_base) =3D PGROUNDDN(auxv->u.a_val);
+ VG_(valgrind_base) =3D VG_PGROUNDDN(auxv->u.a_val);
break;
}
=20
@@ -328,20 +328,20 @@
// VG_(valgrind_base) should have been set by scan_auxv, but if not,
// this is a workable approximation
if (VG_(valgrind_base) =3D=3D 0) {
- VG_(valgrind_base) =3D PGROUNDDN(&_start);
+ VG_(valgrind_base) =3D VG_PGROUNDDN(&_start);
}
=20
- VG_(valgrind_last) =3D ROUNDUP(argc_addr, 0x10000) - 1; // stack
+ VG_(valgrind_last) =3D VG_ROUNDUP(argc_addr, 0x10000) - 1; // stack
=20
// This gives the client the largest possible address space while
// taking into account the tool's shadow needs.
- client_size =3D ROUNDDN((VG_(valgrind_base)-REDZONE_SIZE) / (=
1.+ratio),
+ client_size =3D VG_ROUNDDN((VG_(valgrind_base)-REDZONE_SIZE) =
/ (1.+ratio),
CLIENT_SIZE_MULTIPLE);
VG_(client_base) =3D 0;
VG_(client_end) =3D VG_(client_base) + client_size;
/* where !FIXED mmap goes */
VG_(client_mapbase) =3D VG_(client_base) +
- PGROUNDDN((Addr)(client_size * CLIENT_HEAP_PROPORTION));
+ VG_PGROUNDDN((Addr)(client_size * CLIENT_HEAP_PROPORTION));
=20
VG_(shadow_base) =3D VG_(client_end) + REDZONE_SIZE;
VG_(shadow_end) =3D VG_(valgrind_base);
@@ -873,7 +873,7 @@
sizeof(char **)*envc + /* envp */
sizeof(char **) + /* terminal NULL */
auxsize + /* auxv */
- ROUNDUP(stringsize, sizeof(Word)) +/* strings (aligned) */
+ VG_ROUNDUP(stringsize, sizeof(Word)) +/* strings (aligned) */
VKI_PAGE_SIZE; /* page for trampoline code */
=20
if (0) VG_(printf)("stacksize =3D %d\n", stacksize);
@@ -885,13 +885,13 @@
=20
/* cl_esp is the client's stack pointer */
cl_esp =3D VG_(clstk_end) - stacksize;
- cl_esp =3D ROUNDDN(cl_esp, 16); /* make stack 16 byte aligned */
+ cl_esp =3D VG_ROUNDDN(cl_esp, 16); /* make stack 16 byte aligned */
=20
/* base of the string table (aligned) */
stringbase =3D strtab =3D (char *)(VG_(client_trampoline_code)=20
- - ROUNDUP(stringsize, sizeof(int)));
+ - VG_ROUNDUP(stringsize, sizeof(int)));
=20
- VG_(clstk_base) =3D PGROUNDDN(cl_esp);
+ VG_(clstk_base) =3D VG_PGROUNDDN(cl_esp);
=20
if (0)
printf("stringsize=3D%d auxsize=3D%d stacksize=3D%d\n"
@@ -903,7 +903,8 @@
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D alloc=
ate space =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
=20
/* allocate a stack - mmap enough space for the stack */
- res =3D mmap((void *)PGROUNDDN(cl_esp), VG_(clstk_end) - PGROUNDDN(cl=
_esp),
+ res =3D mmap((void *)VG_PGROUNDDN(cl_esp),=20
+ VG_(clstk_end) - VG_PGROUNDDN(cl_esp),
PROT_READ | PROT_WRITE | PROT_EXEC,=20
MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
vg_assert((void*)-1 !=3D res);=20
Modified: trunk/coregrind/m_sigframe/sigframe-amd64-linux.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
--- trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-06-02 03:39:33=
UTC (rev 3838)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-06-02 03:52:53=
UTC (rev 3839)
@@ -442,7 +442,7 @@
Int sigNo =3D siginfo->si_signo;
=20
rsp -=3D sizeof(*frame);
- rsp =3D ROUNDDN(rsp, 16);
+ rsp =3D VG_ROUNDDN(rsp, 16);
frame =3D (struct rt_sigframe *)rsp;
=20
if (!extend(tst, rsp, sizeof(*frame)))
Modified: trunk/coregrind/m_sigframe/sigframe-x86-linux.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
--- trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-06-02 03:39:33 U=
TC (rev 3838)
+++ trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-06-02 03:52:53 U=
TC (rev 3839)
@@ -465,7 +465,7 @@
vg_assert((flags & VKI_SA_SIGINFO) =3D=3D 0);
=20
esp -=3D sizeof(*frame);
- esp =3D ROUNDDN(esp, 16);
+ esp =3D VG_ROUNDDN(esp, 16);
frame =3D (struct sigframe *)esp;
=20
if (!extend(tst, esp, sizeof(*frame)))
@@ -512,7 +512,7 @@
vg_assert((flags & VKI_SA_SIGINFO) !=3D 0);
=20
esp -=3D sizeof(*frame);
- esp =3D ROUNDDN(esp, 16);
+ esp =3D VG_ROUNDDN(esp, 16);
frame =3D (struct rt_sigframe *)esp;
=20
if (!extend(tst, esp, sizeof(*frame)))
Modified: trunk/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
--- trunk/coregrind/m_signals.c 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/coregrind/m_signals.c 2005-06-02 03:52:53 UTC (rev 3839)
@@ -943,15 +943,15 @@
=20
static UInt note_size(const struct note *n)
{
- return sizeof(Elf32_Nhdr) + ROUNDUP(VG_(strlen)(n->name)+1, 4) + ROUN=
DUP(n->note.n_descsz, 4);
+ return sizeof(Elf32_Nhdr) + VG_ROUNDUP(VG_(strlen)(n->name)+1, 4) + V=
G_ROUNDUP(n->note.n_descsz, 4);
}
=20
static void add_note(struct note **list, const Char *name, UInt type, co=
nst void *data, UInt datasz)
{
Int namelen =3D VG_(strlen)(name)+1;
Int notelen =3D sizeof(struct note) +=20
- ROUNDUP(namelen, 4) +=20
- ROUNDUP(datasz, 4);
+ VG_ROUNDUP(namelen, 4) +=20
+ VG_ROUNDUP(datasz, 4);
struct note *n =3D VG_(arena_malloc)(VG_AR_CORE, notelen);
=20
VG_(memset)(n, 0, notelen);
@@ -964,7 +964,7 @@
n->note.n_descsz =3D datasz;
=20
VG_(memcpy)(n->name, name, namelen);
- VG_(memcpy)(n->name+ROUNDUP(namelen,4), data, datasz);
+ VG_(memcpy)(n->name+VG_ROUNDUP(namelen,4), data, datasz);
}
=20
static void write_note(Int fd, const struct note *n)
@@ -1147,7 +1147,7 @@
=20
off +=3D notesz;
=20
- off =3D PGROUNDUP(off);
+ off =3D VG_PGROUNDUP(off);
=20
for(seg =3D VG_(first_segment)(), idx =3D 1;
seg !=3D NULL;
@@ -1660,7 +1660,7 @@
vg_assert(seg->addr > addr);
=20
/* Create the mapping */
- base =3D PGROUNDDN(addr);
+ base =3D VG_PGROUNDDN(addr);
newsize =3D seg->addr - base;
=20
if (seg->len + newsize >=3D maxsize)
@@ -1810,11 +1810,11 @@
nothing mapped there (as opposed to a permissions fault),
then extend the stack segment.=20
*/
- Addr base =3D PGROUNDDN(esp - VGA_STACK_REDZONE_SZB);
+ Addr base =3D VG_PGROUNDDN(esp - VGA_STACK_REDZONE_SZB);
if (VG_(extend_stack)(base, VG_(threads)[tid].client_stack_szB)) {
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,=20
- " -> extended stack base to %p", PGROUNDDN(fault));
+ " -> extended stack base to %p", VG_PGROUNDDN(fault));
return; // extension succeeded, restart instruction
} else
VG_(message)(Vg_UserMsg, "Stack overflow in thread %d: can't grow s=
tack to %p",=20
@@ -1833,7 +1833,7 @@
static Int recursion =3D 0;
=20
if (recursion++ =3D=3D 0) {
- VG_(init_shadow_range)(PGROUNDDN(fault), VKI_PAGE_SIZE, True);
+ VG_(init_shadow_range)(VG_PGROUNDDN(fault), VKI_PAGE_SIZE, True);
recursion--;
return;
} else {
Modified: trunk/coregrind/m_syscalls/syscalls-amd64-linux.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
--- trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-02 03:39:33=
UTC (rev 3838)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-02 03:52:53=
UTC (rev 3839)
@@ -427,12 +427,12 @@
only go down to the start of the mmaped segment. */
seg =3D VG_(find_segment)((Addr)rsp);
if (seg) {
- ctst->client_stack_highest_word =3D (Addr)PGROUNDUP(rsp);
+ ctst->client_stack_highest_word =3D (Addr)VG_PGROUNDUP(rsp);
ctst->client_stack_szB =3D ctst->client_stack_highest_word - seg-=
>addr;
=20
if (debug)
VG_(printf)("tid %d: guessed client stack range %p-%p\n",
- ctid, seg->addr, PGROUNDUP(rsp));
+ ctid, seg->addr, VG_PGROUNDUP(rsp));
} else {
VG_(message)(Vg_UserMsg, "!? New thread %d starts with RSP(%p) unm=
apped\n",
ctid, rsp);
Modified: trunk/coregrind/m_syscalls/syscalls-linux.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
--- trunk/coregrind/m_syscalls/syscalls-linux.c 2005-06-02 03:39:33 UTC (=
rev 3838)
+++ trunk/coregrind/m_syscalls/syscalls-linux.c 2005-06-02 03:52:53 UTC (=
rev 3839)
@@ -596,8 +596,8 @@
unsigned, nr_events, vki_aio_context_t *, ctxp);
PRE_MEM_WRITE( "io_setup(ctxp)", ARG2, sizeof(vki_aio_context_t) );
=20
- size =3D PGROUNDUP(sizeof(struct vki_aio_ring) +
- ARG1*sizeof(struct vki_io_event));
+ size =3D VG_PGROUNDUP(sizeof(struct vki_aio_ring) +
+ ARG1*sizeof(struct vki_io_event));
addr =3D VG_(find_map_space)(0, size, True);
=20
if (addr =3D=3D 0) {
@@ -645,8 +645,8 @@
// If we are going to seg fault (due to a bogus ARG1) do it as late a=
s
// possible...
r =3D *(struct vki_aio_ring **)ARG1;
- size =3D PGROUNDUP(sizeof(struct vki_aio_ring) +=20
- r->nr*sizeof(struct vki_io_event));
+ size =3D VG_PGROUNDUP(sizeof(struct vki_aio_ring) +=20
+ r->nr*sizeof(struct vki_io_event));
=20
SET_RESULT( VG_(do_syscall1)(SYSNO, ARG1) );
=20
Modified: trunk/coregrind/m_syscalls/syscalls-x86-linux.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
--- trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-06-02 03:39:33 U=
TC (rev 3838)
+++ trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-06-02 03:52:53 U=
TC (rev 3839)
@@ -431,12 +431,12 @@
only go down to the start of the mmaped segment. */
seg =3D VG_(find_segment)((Addr)esp);
if (seg) {
- ctst->client_stack_highest_word =3D (Addr)PGROUNDUP(esp);
+ ctst->client_stack_highest_word =3D (Addr)VG_PGROUNDUP(esp);
ctst->client_stack_szB =3D ctst->client_stack_highest_word - seg-=
>addr;
=20
if (debug)
VG_(printf)("tid %d: guessed client stack range %p-%p\n",
- ctid, seg->addr, PGROUNDUP(esp));
+ ctid, seg->addr, VG_PGROUNDUP(esp));
} else {
VG_(message)(Vg_UserMsg, "!? New thread %d starts with ESP(%p) unm=
apped\n",
ctid, esp);
Modified: trunk/coregrind/m_syscalls/syscalls.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
--- trunk/coregrind/m_syscalls/syscalls.c 2005-06-02 03:39:33 UTC (rev 38=
38)
+++ trunk/coregrind/m_syscalls/syscalls.c 2005-06-02 03:52:53 UTC (rev 38=
39)
@@ -173,8 +173,8 @@
{
Addr ra;
=20
- ra =3D PGROUNDDN(*a);
- *len =3D PGROUNDUP(*a + *len) - ra;
+ ra =3D VG_PGROUNDDN(*a);
+ *len =3D VG_PGROUNDUP(*a + *len) - ra;
*a =3D ra;
}
=20
@@ -211,10 +211,10 @@
Addr ret;
Segment *seg, *next;
=20
- old_size =3D PGROUNDUP(old_size);
- new_size =3D PGROUNDUP(new_size);
+ old_size =3D VG_PGROUNDUP(old_size);
+ new_size =3D VG_PGROUNDUP(new_size);
=20
- if (PGROUNDDN(old_addr) !=3D old_addr)
+ if (VG_PGROUNDDN(old_addr) !=3D old_addr)
return -VKI_EINVAL;
=20
if (!VG_(valid_client_addr)(old_addr, old_size, tid, "mremap(old_addr=
)"))
@@ -225,7 +225,7 @@
flags &=3D ~(VKI_MREMAP_FIXED|VKI_MREMAP_MAYMOVE);
=20
if (flags & VKI_MREMAP_FIXED) {
- if (PGROUNDDN(new_addr) !=3D new_addr)
+ if (VG_PGROUNDDN(new_addr) !=3D new_addr)
return -VKI_EINVAL;
=20
if (!VG_(valid_client_addr)(new_addr, new_size, tid, "mremap(new_a=
ddr)"))
@@ -907,8 +907,8 @@
if (seg !=3D NULL && newbrk > seg->addr)
return VG_(brk_limit);
=20
- current =3D PGROUNDUP(VG_(brk_limit));
- newaddr =3D PGROUNDUP(newbrk);
+ current =3D VG_PGROUNDUP(VG_(brk_limit));
+ newaddr =3D VG_PGROUNDUP(newbrk);
if (newaddr !=3D current) {
=20
/* new brk in a new page - fix the mappings */
Modified: trunk/coregrind/stage1.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
--- trunk/coregrind/stage1.c 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/coregrind/stage1.c 2005-06-02 03:52:53 UTC (rev 3839)
@@ -265,15 +265,15 @@
extern char _end;
int *esp;
char buf[strlen(valgrind_lib) + sizeof(stage2) + 16];
- info.exe_end =3D PGROUNDDN(init_sp);
+ info.exe_end =3D VG_PGROUNDDN(init_sp);
#ifdef HAVE_PIE
- info.exe_base =3D ROUNDDN(info.exe_end - 0x02000000, 0x10000000);
- assert(info.exe_base >=3D PGROUNDUP(&_end));
+ info.exe_base =3D VG_ROUNDDN(info.exe_end - 0x02000000, 0x10000000);
+ assert(info.exe_base >=3D VG_PGROUNDUP(&_end));
info.map_base =3D info.exe_base + 0x01000000;
#else
// If this system doesn't have PIE (position-independent executables)=
,
// we have to choose a hardwired location for stage2.
- info.exe_base =3D PGROUNDUP(&_end);
+ info.exe_base =3D VG_PGROUNDUP(&_end);
info.map_base =3D KICKSTART_BASE + 0x01000000;
#endif
=20
Modified: trunk/coregrind/ume.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
--- trunk/coregrind/ume.c 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/coregrind/ume.c 2005-06-02 03:52:53 UTC (rev 3839)
@@ -251,22 +251,23 @@
// use ph->p_align -- part of stage2's memory gets trashed somehow=
.)
//
// The condition handles the case of a zero-length segment.
- if (PGROUNDUP(bss)-PGROUNDDN(addr) > 0) {
- res =3D mmap((char *)PGROUNDDN(addr), PGROUNDUP(bss)-PGROUNDDN(=
addr),
- prot, MAP_FIXED|MAP_PRIVATE, e->fd, PGROUNDDN(off));
- check_mmap(res, (char*)PGROUNDDN(addr),
- PGROUNDUP(bss)-PGROUNDDN(addr));
+ if (VG_PGROUNDUP(bss)-VG_PGROUNDDN(addr) > 0) {
+ res =3D mmap((char *)VG_PGROUNDDN(addr),
+ VG_PGROUNDUP(bss)-VG_PGROUNDDN(addr),
+ prot, MAP_FIXED|MAP_PRIVATE, e->fd, VG_PGROUNDDN(off=
));
+ check_mmap(res, (char*)VG_PGROUNDDN(addr),
+ VG_PGROUNDUP(bss)-VG_PGROUNDDN(addr));
}
=20
// if memsz > filesz, fill the remainder with zeroed pages
if (memsz > filesz) {
UInt bytes;
=20
- bytes =3D PGROUNDUP(brkaddr)-PGROUNDUP(bss);
+ bytes =3D VG_PGROUNDUP(brkaddr)-VG_PGROUNDUP(bss);
if (bytes > 0) {
- res =3D mmap((char *)PGROUNDUP(bss), bytes,
+ res =3D mmap((char *)VG_PGROUNDUP(bss), bytes,
prot, MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
- check_mmap(res, (char*)PGROUNDUP(bss), bytes);
+ check_mmap(res, (char*)VG_PGROUNDUP(bss), bytes);
}
=20
bytes =3D bss & (VKI_PAGE_SIZE - 1);
@@ -413,7 +414,7 @@
int flags =3D MAP_PRIVATE|MAP_ANONYMOUS;
=20
if (info->map_base !=3D 0) {
- base =3D (char *)ROUNDUP(info->map_base, interp_align);
+ base =3D (char *)VG_ROUNDUP(info->map_base, interp_align);
flags |=3D MAP_FIXED;
}
=20
Modified: trunk/helgrind/hg_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
--- trunk/helgrind/hg_main.c 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/helgrind/hg_main.c 2005-06-02 03:52:53 UTC (rev 3839)
@@ -77,12 +77,6 @@
/* Rotate an unsigned quantity left */
#define ROTL(x, n) (((x) << (n)) | ((x) >> ((sizeof(x)*8)-(n))))
=20
-/* round a up to the next multiple of N. N must be a power of 2 */
-#define ROUNDUP(a, N) ((a + N - 1) & ~(N-1))
-
-/* Round a down to the next multiple of N. N must be a power of 2 */
-#define ROUNDDN(a, N) ((a) & ~(N-1))
-
/*------------------------------------------------------------*/
/*--- Command line options ---*/
/*------------------------------------------------------------*/
@@ -1625,8 +1619,8 @@
* len/4+1 words. This works out which it is by aligning the block a=
nd
* seeing if the end byte is in the same word as it is for the unalig=
ned
* block; if not, it's the awkward case. */
- end =3D ROUNDUP(a + len, 4);
- a =3D ROUNDDN(a, 4);
+ end =3D VG_ROUNDUP(a + len, 4);
+ a =3D VG_ROUNDDN(a, 4);
=20
/* Do it ... */
switch (status) {
@@ -3049,8 +3043,8 @@
{
Addr end;
=20
- end =3D ROUNDUP(a+size, 4);
- a =3D ROUNDDN(a, 4);
+ end =3D VG_ROUNDUP(a+size, 4);
+ a =3D VG_ROUNDDN(a, 4);
=20
for ( ; a < end; a +=3D 4)
hg_mem_read_word(a, tid);
@@ -3154,8 +3148,8 @@
{
Addr end;
=20
- end =3D ROUNDUP(a+size, 4);
- a =3D ROUNDDN(a, 4);
+ end =3D VG_ROUNDUP(a+size, 4);
+ a =3D VG_ROUNDDN(a, 4);
=20
for ( ; a < end; a +=3D 4)
hg_mem_write_word(a, tid);
Modified: trunk/include/tool.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
--- trunk/include/tool.h 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/include/tool.h 2005-06-02 03:52:53 UTC (rev 3839)
@@ -57,6 +57,12 @@
/*=3D=3D=3D Useful macros =
=3D=3D=3D*/
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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
+// 'a' -- the alignment -- must be a power of 2
+#define VG_ROUNDDN(p, a) ((Addr)(p) & ~((Addr)(a)-1))
+#define VG_ROUNDUP(p, a) VG_ROUNDDN((p)+(a)-1, (a))
+#define VG_PGROUNDDN(p) VG_ROUNDDN(p, VKI_PAGE_SIZE)
+#define VG_PGROUNDUP(p) VG_ROUNDUP(p, VKI_PAGE_SIZE)
+
/* No, really. I _am_ that strange. */
#define OINK(nnn) VG_(message)(Vg_DebugMsg, "OINK %d",nnn)
=20
Modified: trunk/memcheck/mac_leakcheck.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
--- trunk/memcheck/mac_leakcheck.c 2005-06-02 03:39:33 UTC (rev 3838)
+++ trunk/memcheck/mac_leakcheck.c 2005-06-02 03:52:53 UTC (rev 3839)
@@ -38,11 +38,6 @@
#define VG_DEBUG_LEAKCHECK 0
#define VG_DEBUG_CLIQUE 0
=20
-#define ROUNDDN(p, a) ((Addr)(p) & ~((a)-1))
-#define ROUNDUP(p, a) ROUNDDN((p)+(a)-1, (a))
-#define PGROUNDDN(p) ROUNDDN(p, VKI_PAGE_SIZE)
-#define PGROUNDUP(p) ROUNDUP(p, VKI_PAGE_SIZE)
-
/*------------------------------------------------------------*/
/*--- Low-level address-space scanning, for the leak ---*/
/*--- detector. ---*/
@@ -371,8 +366,8 @@
cliques, and clique is the index of the current clique leader. */
static void _lc_scan_memory(Addr start, SizeT len, Int clique)
{
- Addr ptr =3D ROUNDUP(start, sizeof(Addr));
- Addr end =3D ROUNDDN(start+len, sizeof(Addr));
+ Addr ptr =3D VG_ROUNDUP(start, sizeof(Addr));
+ Addr end =3D VG_ROUNDDN(start+len, sizeof(Addr));
vki_sigset_t sigmask;
=20
if (VG_DEBUG_LEAKCHECK)
@@ -384,14 +379,14 @@
=20
if (!VG_(is_client_addr)(ptr) ||
!VG_(is_addressable)(ptr, sizeof(Addr), VKI_PROT_READ))
- ptr =3D PGROUNDUP(ptr+1); /* first page bad */
+ ptr =3D VG_PGROUNDUP(ptr+1); /* first page bad */
=20
while (ptr < end) {
Addr addr;
=20
/* Skip invalid chunks */
if (!(*lc_is_within_valid_secondary)(ptr)) {
- ptr =3D ROUNDUP(ptr+1, SECONDARY_SIZE);
+ ptr =3D VG_ROUNDUP(ptr+1, SECONDARY_SIZE);
continue;
}
=20
@@ -414,7 +409,7 @@
longjmped out of a signal handler. */
VG_(sigprocmask)(VKI_SIG_SETMASK, &sigmask, NULL);
=20
- ptr =3D PGROUNDUP(ptr+1); /* bad page - skip it */
+ ptr =3D VG_PGROUNDUP(ptr+1); /* bad page - skip it */
}
}
=20
|
|
From: Nicholas N. <nj...@cs...> - 2005-06-02 03:48:59
|
SVN commit 421064 by nethercote:
Made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need. As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any base-36 number containing the digits=20
'A'..'I'! (Eg. for "A" it would return 17 instead of 10!)
MERGED FROM 3.0 REPOSITORY
M +1 -1 coregrind/demangle/cp-demangle.c =20
M +9 -11 coregrind/vg_mylibc.c =20
M +2 -2 include/tool.h.base =20
--- trunk/valgrind/coregrind/demangle/cp-demangle.c #421063:421064
@@ -1408,7 +1408,7 @@
}
=20
if (base =3D=3D 36) {
- *value =3D VG_(atoll36) (36, dyn_string_buf (number));
+ *value =3D VG_(atoll36) (dyn_string_buf (number));
} else {
*value =3D VG_(atoll) (dyn_string_buf (number));
}
--- trunk/valgrind/coregrind/vg_mylibc.c #421063:421064
@@ -760,26 +760,23 @@
return n;
}
=20
-Long VG_(atoll36) ( UInt base, Char* str )
+Long VG_(atoll36) ( Char* str )
{
Bool neg =3D False;
Long n =3D 0;
- vg_assert(base >=3D 2 && base <=3D 36);
if (*str =3D=3D '-') { str++; neg =3D True; };
while (True) {
- if (*str >=3D '0'=20
- && *str <=3D (Char)('9' - (10 - base))) {
- n =3D base*n + (Long)(*str - '0');
+ Char c =3D *str;
+ if (c >=3D '0' && c <=3D (Char)'9') {
+ n =3D 36*n + (Long)(c - '0');
}
else=20
- if (base > 10 && *str >=3D 'A'=20
- && *str <=3D (Char)('Z' - (36 - base))) {
- n =3D base*n + (Long)((*str - 'A') + 10);
+ if (c >=3D 'A' && c <=3D (Char)'Z') {
+ n =3D 36*n + (Long)((c - 'A') + 10);
}
else=20
- if (base > 10 && *str >=3D 'a'=20
- && *str <=3D (Char)('z' - (36 - base))) {
- n =3D base*n + (Long)((*str - 'a') + 10);
+ if (c >=3D 'a' && c <=3D (Char)'z') {
+ n =3D 36*n + (Long)((c - 'a') + 10);
}
else {
break;
@@ -791,6 +788,7 @@
}
=20
=20
+
Char* VG_(strcat) ( Char* dest, const Char* src )
{
Char* dest_orig =3D dest;
--- trunk/valgrind/include/tool.h.base #421063:421064
@@ -382,8 +382,8 @@
/* Like atoll(), but converts a number of base 16 */
extern Long VG_(atoll16) ( Char* str );
=20
-/* Like atoll(), but converts a number of base 2..36 */
-extern Long VG_(atoll36) ( UInt base, Char* str );
+/* Like atoll(), but converts a number of base 36 */
+extern Long VG_(atoll36) ( Char* str );
=20
/* Like qsort(), but does shell-sort. The size=3D=3D1/2/4 cases are spe=
cialised. */
extern void VG_(ssort)( void* base, SizeT nmemb, SizeT size,
|
|
From: <sv...@va...> - 2005-06-02 03:39:39
|
Author: njn Date: 2005-06-02 04:39:33 +0100 (Thu, 02 Jun 2005) New Revision: 3838 Added: trunk/coregrind/m_libcbase.c trunk/coregrind/pub_core_libcbase.h trunk/include/pub_tool_libcbase.h Modified: trunk/cachegrind/amd64/cg_arch.c trunk/cachegrind/arm/cg_arch.c trunk/cachegrind/cg_main.c trunk/cachegrind/x86/cg_arch.c trunk/coregrind/Makefile.am trunk/coregrind/amd64/state.c trunk/coregrind/core.h trunk/coregrind/m_aspacemgr/aspacemgr.c trunk/coregrind/m_aspacemgr/read_procselfmaps.c trunk/coregrind/m_debuginfo/dwarf.c trunk/coregrind/m_debuginfo/stabs.c trunk/coregrind/m_debuginfo/symtab.c trunk/coregrind/m_debuginfo/symtypes.c trunk/coregrind/m_demangle/cp-demangle.c trunk/coregrind/m_demangle/cplus-dem.c trunk/coregrind/m_demangle/demangle.c trunk/coregrind/m_demangle/dyn-string.c trunk/coregrind/m_errormgr.c trunk/coregrind/m_main.c trunk/coregrind/m_mallocfree.c trunk/coregrind/m_redir.c trunk/coregrind/m_replacemalloc/replacemalloc_core.c trunk/coregrind/m_scheduler/scheduler.c trunk/coregrind/m_sigframe/sigframe-amd64-linux.c trunk/coregrind/m_sigframe/sigframe-x86-linux.c trunk/coregrind/m_signals.c trunk/coregrind/m_skiplist.c trunk/coregrind/m_stacktrace.c trunk/coregrind/m_syscalls/syscalls.c trunk/coregrind/m_translate.c trunk/coregrind/m_transtab.c trunk/coregrind/vg_mylibc.c trunk/coregrind/x86/state.c trunk/helgrind/hg_main.c trunk/include/Makefile.am trunk/include/tool.h trunk/massif/ms_main.c trunk/memcheck/mac_leakcheck.c trunk/memcheck/mac_malloc_wrappers.c trunk/memcheck/mac_shared.c trunk/memcheck/mc_main.c Log: Started modularising vg_mylibc. Put all the standalone stuff -- ie. not relying on any other modules -- in m_libcbase. Also converted the 'size' parameters to functions like VG_(memcpy) and VG_(strncpy) from Int to SizeT, as they should be. Also removed VG_(atoll16) and VG_(toupper), which weren't being used. Also made VG_(atoll36) less flexible -- it now only does base-36 numbers instead of any base in the range 2..36, since base-36 is the only one we need. As part of that, I fixed a horrible bug in it which caused it to return incorrect answers for any number containing the digits 'A'..'I'! (Eg. for "A; it would return 17 instead of 10!) Had to disable the assertions in VG_(string_match), since this module can= 't see vg_assert, which wasn't ideal but also isn't a disaster. Modified: trunk/cachegrind/amd64/cg_arch.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 --- trunk/cachegrind/amd64/cg_arch.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/cachegrind/amd64/cg_arch.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -30,6 +30,7 @@ =20 #include "tool.h" #include "cg_arch.h" +#include "pub_tool_libcbase.h" =20 // All CPUID info taken from sandpile.org/a32/cpuid.htm */ // Probably only works for Intel and AMD chips, and probably only for so= me of Modified: trunk/cachegrind/arm/cg_arch.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 --- trunk/cachegrind/arm/cg_arch.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/cachegrind/arm/cg_arch.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -30,6 +30,7 @@ =20 #include "tool.h" #include "cg_arch.h" +#include "pub_tool_libcbase.h" =20 void VGA_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c, Bool all_caches_clo_defined) Modified: trunk/cachegrind/cg_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 --- trunk/cachegrind/cg_main.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/cachegrind/cg_main.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -32,6 +32,7 @@ #include "tool.h" #include "pub_tool_debuginfo.h" #include "pub_tool_hashtable.h" +#include "pub_tool_libcbase.h" #include "pub_tool_mallocfree.h" #include "pub_tool_options.h" #include "pub_tool_profile.h" Modified: trunk/cachegrind/x86/cg_arch.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 --- trunk/cachegrind/x86/cg_arch.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/cachegrind/x86/cg_arch.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -29,6 +29,7 @@ */ =20 #include "tool.h" +#include "pub_tool_libcbase.h" #include "cg_arch.h" =20 // All CPUID info taken from sandpile.org/a32/cpuid.htm */ Modified: trunk/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 --- trunk/coregrind/Makefile.am 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/Makefile.am 2005-06-02 03:39:33 UTC (rev 3838) @@ -46,6 +46,7 @@ pub_core_errormgr.h \ pub_core_execontext.h \ pub_core_hashtable.h \ + pub_core_libcbase.h \ pub_core_main.h \ pub_core_mallocfree.h \ pub_core_options.h \ @@ -87,6 +88,7 @@ m_errormgr.c \ m_execontext.c \ m_hashtable.c \ + m_libcbase.c \ m_main.c \ m_mallocfree.c \ m_options.c \ Modified: trunk/coregrind/amd64/state.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 --- trunk/coregrind/amd64/state.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/amd64/state.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -29,6 +29,7 @@ */ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "pub_core_tooliface.h" #include <sys/ptrace.h> =20 Modified: trunk/coregrind/core.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 --- trunk/coregrind/core.h 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/core.h 2005-06-02 03:39:33 UTC (rev 3838) @@ -49,14 +49,12 @@ /* Max length of a text fragment used to construct error messages. */ #define VG_ERRTXT_LEN 4096 =20 -/* Useful macros */ -/* a - alignment - must be a power of 2 */ +// 'a' -- the alignment -- must be a power of 2 #define ROUNDDN(p, a) ((Addr)(p) & ~((Addr)(a)-1)) #define ROUNDUP(p, a) ROUNDDN((p)+(a)-1, (a)) #define PGROUNDDN(p) ROUNDDN(p, VKI_PAGE_SIZE) #define PGROUNDUP(p) ROUNDUP(p, VKI_PAGE_SIZE) =20 - /* --------------------------------------------------------------------- Environment variables ------------------------------------------------------------------ */ Modified: trunk/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 --- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-06-01 17:35:23 UTC (rev = 3837) +++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-06-02 03:39:33 UTC (rev = 3838) @@ -32,6 +32,7 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_syscalls.h" #include "pub_core_tooliface.h" Modified: trunk/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 --- trunk/coregrind/m_aspacemgr/read_procselfmaps.c 2005-06-01 17:35:23 U= TC (rev 3837) +++ trunk/coregrind/m_aspacemgr/read_procselfmaps.c 2005-06-02 03:39:33 U= TC (rev 3838) @@ -32,8 +32,8 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" =20 - /* Size of a smallish table used to read /proc/self/map entries. */ #define M_PROCMAP_BUF 50000 =20 Modified: trunk/coregrind/m_debuginfo/dwarf.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 --- trunk/coregrind/m_debuginfo/dwarf.c 2005-06-01 17:35:23 UTC (rev 3837= ) +++ trunk/coregrind/m_debuginfo/dwarf.c 2005-06-02 03:39:33 UTC (rev 3838= ) @@ -29,6 +29,7 @@ */ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "priv_symtab.h" =20 Modified: trunk/coregrind/m_debuginfo/stabs.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 --- trunk/coregrind/m_debuginfo/stabs.c 2005-06-01 17:35:23 UTC (rev 3837= ) +++ trunk/coregrind/m_debuginfo/stabs.c 2005-06-02 03:39:33 UTC (rev 3838= ) @@ -29,6 +29,7 @@ */ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "priv_symtab.h" =20 #include <a.out.h> /* stabs defns */ Modified: trunk/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 --- trunk/coregrind/m_debuginfo/symtab.c 2005-06-01 17:35:23 UTC (rev 383= 7) +++ trunk/coregrind/m_debuginfo/symtab.c 2005-06-02 03:39:33 UTC (rev 383= 8) @@ -32,6 +32,7 @@ #include "core.h" #include "pub_core_aspacemgr.h" #include "pub_core_demangle.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_profile.h" #include "pub_core_redir.h" Modified: trunk/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 --- trunk/coregrind/m_debuginfo/symtypes.c 2005-06-01 17:35:23 UTC (rev 3= 837) +++ trunk/coregrind/m_debuginfo/symtypes.c 2005-06-02 03:39:33 UTC (rev 3= 838) @@ -31,6 +31,7 @@ #include "core.h" #include "pub_core_debuginfo.h" #include "pub_core_debuglog.h" /* VG_(debugLog_vprintf) */ +#include "pub_core_libcbase.h" #include "pub_core_tooliface.h" #include "priv_symtypes.h" =20 Modified: trunk/coregrind/m_demangle/cp-demangle.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 --- trunk/coregrind/m_demangle/cp-demangle.c 2005-06-01 17:35:23 UTC (rev= 3837) +++ trunk/coregrind/m_demangle/cp-demangle.c 2005-06-02 03:39:33 UTC (rev= 3838) @@ -41,6 +41,7 @@ #endif*/ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "ansidecl.h" #include "dyn-string.h" #include "demangle.h" @@ -1408,7 +1409,7 @@ } =20 if (base =3D=3D 36) { - *value =3D VG_(atoll36) (36, dyn_string_buf (number)); + *value =3D VG_(atoll36) (dyn_string_buf (number)); } else { *value =3D VG_(atoll) (dyn_string_buf (number)); } Modified: trunk/coregrind/m_demangle/cplus-dem.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 --- trunk/coregrind/m_demangle/cplus-dem.c 2005-06-01 17:35:23 UTC (rev 3= 837) +++ trunk/coregrind/m_demangle/cplus-dem.c 2005-06-02 03:39:33 UTC (rev 3= 838) @@ -38,6 +38,7 @@ =20 #include "safe-ctype.h" #include "core.h" +#include "pub_core_libcbase.h" =20 /*#include <sys/types.h> #include <string.h> Modified: trunk/coregrind/m_demangle/demangle.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 --- trunk/coregrind/m_demangle/demangle.c 2005-06-01 17:35:23 UTC (rev 38= 37) +++ trunk/coregrind/m_demangle/demangle.c 2005-06-02 03:39:33 UTC (rev 38= 38) @@ -30,6 +30,7 @@ =20 #include "core.h" #include "pub_core_demangle.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_profile.h" #include "demangle.h" Modified: trunk/coregrind/m_demangle/dyn-string.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 --- trunk/coregrind/m_demangle/dyn-string.c 2005-06-01 17:35:23 UTC (rev = 3837) +++ trunk/coregrind/m_demangle/dyn-string.c 2005-06-02 03:39:33 UTC (rev = 3838) @@ -32,6 +32,7 @@ #endif*/ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "ansidecl.h" #include "dyn-string.h" =20 Modified: trunk/coregrind/m_errormgr.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 --- trunk/coregrind/m_errormgr.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_errormgr.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -32,6 +32,7 @@ #include "pub_core_debuginfo.h" #include "pub_core_errormgr.h" #include "pub_core_execontext.h" +#include "pub_core_libcbase.h" #include "pub_core_main.h" // for VG_(start_debugger)() #include "pub_core_options.h" #include "pub_core_stacktrace.h" Added: trunk/coregrind/m_libcbase.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 --- trunk/coregrind/m_libcbase.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_libcbase.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -0,0 +1,477 @@ + +/*--------------------------------------------------------------------*/ +/*--- Entirely standalone libc stuff. m_libcbase.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. +*/ + +#include "tool.h" // XXX: temporary, for NULL, VG_(), Char, etc +#include "pub_core_libcbase.h" + +/* --------------------------------------------------------------------- + Char functions. + ------------------------------------------------------------------ */ + +Bool VG_(isspace) ( Char c ) +{ + return (c =3D=3D ' ' || c =3D=3D '\n' || c =3D=3D '\t' ||=20 + c =3D=3D '\f' || c =3D=3D '\v' || c =3D=3D '\r'); +} + +Bool VG_(isdigit) ( Char c ) +{ + return (c >=3D '0' && c <=3D '9'); +} + +/* --------------------------------------------------------------------- + Converting strings to numbers + ------------------------------------------------------------------ */ + +Long VG_(atoll) ( Char* str ) +{ + Bool neg =3D False; + Long n =3D 0; + if (*str =3D=3D '-') { str++; neg =3D True; }; + while (*str >=3D '0' && *str <=3D '9') { + n =3D 10*n + (Long)(*str - '0'); + str++; + } + if (neg) n =3D -n; + return n; +} + +Long VG_(atoll36) ( Char* str ) +{ + Bool neg =3D False; + Long n =3D 0; + if (*str =3D=3D '-') { str++; neg =3D True; }; + while (True) { + Char c =3D *str; + if (c >=3D '0' && c <=3D (Char)'9') { + n =3D 36*n + (Long)(c - '0'); + } + else=20 + if (c >=3D 'A' && c <=3D (Char)'Z') { + n =3D 36*n + (Long)((c - 'A') + 10); + } + else=20 + if (c >=3D 'a' && c <=3D (Char)'z') { + n =3D 36*n + (Long)((c - 'a') + 10); + } + else { + break; + } + str++; + } + if (neg) n =3D -n; + return n; +} + +/* --------------------------------------------------------------------- + String functions + ------------------------------------------------------------------ */ + +Int VG_(strlen) ( const Char* str ) +{ + Int i =3D 0; + while (str[i] !=3D 0) i++; + return i; +} + +Char* VG_(strcat) ( Char* dest, const Char* src ) +{ + Char* dest_orig =3D dest; + while (*dest) dest++; + while (*src) *dest++ =3D *src++; + *dest =3D 0; + return dest_orig; +} + +Char* VG_(strncat) ( Char* dest, const Char* src, SizeT n ) +{ + Char* dest_orig =3D dest; + while (*dest) dest++; + while (*src && n > 0) { *dest++ =3D *src++; n--; } + *dest =3D 0; + return dest_orig; +} + +Char* VG_(strpbrk) ( const Char* s, const Char* accept ) +{ + const Char* a; + while (*s) { + a =3D accept; + while (*a) + if (*a++ =3D=3D *s) + return (Char *) s; + s++; + } + return NULL; +} + +Char* VG_(strcpy) ( Char* dest, const Char* src ) +{ + Char* dest_orig =3D dest; + while (*src) *dest++ =3D *src++; + *dest =3D 0; + return dest_orig; +} + +/* Copy bytes, not overrunning the end of dest and always ensuring + zero termination. */ +void VG_(strncpy_safely) ( Char* dest, const Char* src, SizeT ndest ) +{ + Int i =3D 0; + while (True) { + dest[i] =3D 0; + if (src[i] =3D=3D 0) return; + if (i >=3D ndest-1) return; + dest[i] =3D src[i]; + i++; + } +} + +Char* VG_(strncpy) ( Char* dest, const Char* src, SizeT ndest ) +{ + Int i =3D 0; + while (True) { + if (i >=3D ndest) return dest; /* reached limit */ + dest[i] =3D src[i]; + if (src[i++] =3D=3D 0) { + /* reached NUL; pad rest with zeroes as required */ + while (i < ndest) dest[i++] =3D 0; + return dest; + } + } +} + +Int VG_(strcmp) ( const Char* s1, const Char* s2 ) +{ + while (True) { + if (*s1 =3D=3D 0 && *s2 =3D=3D 0) return 0; + if (*s1 =3D=3D 0) return -1; + if (*s2 =3D=3D 0) return 1; + + if (*(UChar*)s1 < *(UChar*)s2) return -1; + if (*(UChar*)s1 > *(UChar*)s2) return 1; + + s1++; s2++; + } +} + +static Bool isterm ( Char c ) +{ + return ( VG_(isspace)(c) || 0 =3D=3D c ); +} + +Int VG_(strcmp_ws) ( const Char* s1, const Char* s2 ) +{ + while (True) { + if (isterm(*s1) && isterm(*s2)) return 0; + if (isterm(*s1)) return -1; + if (isterm(*s2)) return 1; + + if (*(UChar*)s1 < *(UChar*)s2) return -1; + if (*(UChar*)s1 > *(UChar*)s2) return 1; + + s1++; s2++; + } +} + +Int VG_(strncmp) ( const Char* s1, const Char* s2, SizeT nmax ) +{ + Int n =3D 0; + while (True) { + if (n >=3D nmax) return 0; + if (*s1 =3D=3D 0 && *s2 =3D=3D 0) return 0; + if (*s1 =3D=3D 0) return -1; + if (*s2 =3D=3D 0) return 1; + + if (*(UChar*)s1 < *(UChar*)s2) return -1; + if (*(UChar*)s1 > *(UChar*)s2) return 1; + + s1++; s2++; n++; + } +} + +Int VG_(strncmp_ws) ( const Char* s1, const Char* s2, SizeT nmax ) +{ + Int n =3D 0; + while (True) { + if (n >=3D nmax) return 0; + if (isterm(*s1) && isterm(*s2)) return 0; + if (isterm(*s1)) return -1; + if (isterm(*s2)) return 1; + + if (*(UChar*)s1 < *(UChar*)s2) return -1; + if (*(UChar*)s1 > *(UChar*)s2) return 1; + + s1++; s2++; n++; + } +} + +Char* VG_(strstr) ( const Char* haystack, Char* needle ) +{ + Int n;=20 + if (haystack =3D=3D NULL) + return NULL; + n =3D VG_(strlen)(needle); + while (True) { + if (haystack[0] =3D=3D 0)=20 + return NULL; + if (VG_(strncmp)(haystack, needle, n) =3D=3D 0)=20 + return (Char*)haystack; + haystack++; + } +} + +Char* VG_(strchr) ( const Char* s, Char c ) +{ + while (True) { + if (*s =3D=3D c) return (Char*)s; + if (*s =3D=3D 0) return NULL; + s++; + } +} + +Char* VG_(strrchr) ( const Char* s, Char c ) +{ + Int n =3D VG_(strlen)(s); + while (--n > 0) { + if (s[n] =3D=3D c) return (Char*)s + n; + } + return NULL; +} + +/* --------------------------------------------------------------------- + A simple string matching routine, purloined from Hugs98. + '*' matches any sequence of zero or more characters + '?' matches any single character exactly=20 + '\c' matches the character c only (ignoring special chars) + c matches the character c only + ------------------------------------------------------------------ */ + +/* Keep track of recursion depth. */ +static Int recDepth; + +// Nb: vg_assert disabled because we can't use it from this module... +static Bool string_match_wrk ( const Char* pat, const Char* str ) +{ + //vg_assert(recDepth >=3D 0 && recDepth < 500); + recDepth++; + for (;;) { + switch (*pat) { + case '\0':recDepth--; + return (*str=3D=3D'\0'); + case '*': do { + if (string_match_wrk(pat+1,str)) { + recDepth--; + return True; + } + } while (*str++); + recDepth--; + return False; + case '?': if (*str++=3D=3D'\0') { + recDepth--; + return False; + } + pat++; + break; + case '\\':if (*++pat =3D=3D '\0') { + recDepth--; + return False; /* spurious trailing \ in pattern */ + } + /* falls through to ... */ + default : if (*pat++ !=3D *str++) { + recDepth--; + return False; + } + break; + } + } +} + +Bool VG_(string_match) ( const Char* pat, const Char* str ) +{ + Bool b; + recDepth =3D 0; + b =3D string_match_wrk ( pat, str ); + //vg_assert(recDepth =3D=3D 0); + /* + VG_(printf)("%s %s %s\n", + b?"TRUE ":"FALSE", pat, str); + */ + return b; +} + + +/* --------------------------------------------------------------------- + mem* functions + ------------------------------------------------------------------ */ + +void* VG_(memcpy) ( void *dest, const void *src, SizeT sz ) +{ + const Char *s =3D (const Char *)src; + Char *d =3D (Char *)dest; + + while (sz--) + *d++ =3D *s++; + + return dest; +} + +void* VG_(memset) ( void *dest, Int c, SizeT sz ) +{ + Char *d =3D (Char *)dest; + + while (sz--) + *d++ =3D c; + + return dest; +} + +Int VG_(memcmp) ( const void* s1, const void* s2, SizeT n ) +{ + Int res; + UChar a0; + UChar b0; + + while (n !=3D 0) { + a0 =3D ((UChar *) s1)[0]; + b0 =3D ((UChar *) s2)[0]; + s1 +=3D 1; + s2 +=3D 1; + res =3D a0 - b0; + if (res !=3D 0) + return res; + n -=3D 1; + } + return 0; +} + +/* --------------------------------------------------------------------- + Misc useful functions + ------------------------------------------------------------------ */ + +Int VG_(log2) ( Int x )=20 +{ + Int i; + /* Any more than 32 and we overflow anyway... */ + for (i =3D 0; i < 32; i++) { + if (1 << i =3D=3D x) return i; + } + return -1; +} + + +// Generic shell sort. Like stdlib.h's qsort(). +void VG_(ssort)( void* base, SizeT nmemb, SizeT size, + Int (*compar)(void*, void*) ) +{ + Int incs[14] =3D { 1, 4, 13, 40, 121, 364, 1093, 3280, + 9841, 29524, 88573, 265720, + 797161, 2391484 }; + Int lo =3D 0; + Int hi =3D nmemb-1; + Int i, j, h, bigN, hp; + + bigN =3D hi - lo + 1; if (bigN < 2) return; + hp =3D 0; while (hp < 14 && incs[hp] < bigN) hp++; hp--; + + #define SORT \ + for ( ; hp >=3D 0; hp--) { \ + h =3D incs[hp]; \ + for (i =3D lo + h; i <=3D hi; i++) { \ + ASSIGN(v,0, a,i); \ + j =3D i; \ + while (COMPAR(a,(j-h), v,0) > 0) { \ + ASSIGN(a,j, a,(j-h)); \ + j =3D j - h; \ + if (j <=3D (lo + h - 1)) break; \ + } \ + ASSIGN(a,j, v,0); \ + } \ + } + + // Specialised cases + if (sizeof(ULong) =3D=3D size) { + + #define ASSIGN(dst, dsti, src, srci) \ + (dst)[(dsti)] =3D (src)[(srci)]; =20 + =20 + #define COMPAR(dst, dsti, src, srci) \ + compar( (void*)(& (dst)[(dsti)]), (void*)(& (src)[(srci)]) ) + + ULong* a =3D (ULong*)base; + ULong v[1]; + + SORT; + + } else if (sizeof(UInt) =3D=3D size) { + + UInt* a =3D (UInt*)base; + UInt v[1]; + + SORT; + + } else if (sizeof(UShort) =3D=3D size) { + UShort* a =3D (UShort*)base; + UShort v[1]; + + SORT; + + } else if (sizeof(UChar) =3D=3D size) { + UChar* a =3D (UChar*)base; + UChar v[1]; + + SORT; + + #undef ASSIGN + #undef COMPAR + + // General case + } else { + char* a =3D base; + char v[size]; // will be at least 'size' bytes + + #define ASSIGN(dst, dsti, src, srci) \ + VG_(memcpy)( &dst[size*(dsti)], &src[size*(srci)], size ); + + #define COMPAR(dst, dsti, src, srci) \ + compar( &dst[size*(dsti)], &src[size*(srci)] ) + + SORT; + + #undef ASSIGN + #undef COMPAR + } + #undef SORT +} + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ + Modified: trunk/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 --- trunk/coregrind/m_main.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_main.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -36,6 +36,7 @@ #include "pub_core_debuglog.h" #include "pub_core_errormgr.h" #include "pub_core_execontext.h" +#include "pub_core_libcbase.h" #include "pub_core_main.h" #include "pub_core_options.h" #include "pub_core_profile.h" Modified: trunk/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 --- trunk/coregrind/m_mallocfree.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_mallocfree.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -32,6 +32,7 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_profile.h" #include "valgrind.h" Modified: trunk/coregrind/m_redir.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 --- trunk/coregrind/m_redir.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_redir.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -32,6 +32,7 @@ #include "core.h" =20 #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_skiplist.h" #include "pub_core_options.h" #include "pub_core_redir.h" Modified: trunk/coregrind/m_replacemalloc/replacemalloc_core.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 --- trunk/coregrind/m_replacemalloc/replacemalloc_core.c 2005-06-01 17:35= :23 UTC (rev 3837) +++ trunk/coregrind/m_replacemalloc/replacemalloc_core.c 2005-06-02 03:39= :33 UTC (rev 3838) @@ -29,6 +29,7 @@ */ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_replacemalloc.h" =20 Modified: trunk/coregrind/m_scheduler/scheduler.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 --- trunk/coregrind/m_scheduler/scheduler.c 2005-06-01 17:35:23 UTC (rev = 3837) +++ trunk/coregrind/m_scheduler/scheduler.c 2005-06-02 03:39:33 UTC (rev = 3838) @@ -63,6 +63,7 @@ #include "pub_core_aspacemgr.h" #include "pub_core_dispatch.h" #include "pub_core_errormgr.h" +#include "pub_core_libcbase.h" #include "pub_core_main.h" #include "pub_core_options.h" #include "pub_core_profile.h" Modified: trunk/coregrind/m_sigframe/sigframe-amd64-linux.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 --- trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-06-01 17:35:23= UTC (rev 3837) +++ trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-06-02 03:39:33= UTC (rev 3838) @@ -31,6 +31,7 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_sigframe.h" #include "pub_core_signals.h" Modified: trunk/coregrind/m_sigframe/sigframe-x86-linux.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 --- trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-06-01 17:35:23 U= TC (rev 3837) +++ trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-06-02 03:39:33 U= TC (rev 3838) @@ -31,6 +31,7 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" /* find_segment */ +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_sigframe.h" #include "pub_core_signals.h" Modified: trunk/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 --- trunk/coregrind/m_signals.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_signals.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -83,6 +83,7 @@ =20 #include "pub_core_aspacemgr.h" #include "pub_core_errormgr.h" +#include "pub_core_libcbase.h" #include "pub_core_main.h" #include "pub_core_options.h" #include "pub_core_signals.h" Modified: trunk/coregrind/m_skiplist.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 --- trunk/coregrind/m_skiplist.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_skiplist.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -87,6 +87,7 @@ */ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "pub_core_skiplist.h" =20 #include <stdlib.h> Modified: trunk/coregrind/m_stacktrace.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 --- trunk/coregrind/m_stacktrace.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_stacktrace.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -30,6 +30,7 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_profile.h" #include "pub_core_stacktrace.h" Modified: trunk/coregrind/m_syscalls/syscalls.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 --- trunk/coregrind/m_syscalls/syscalls.c 2005-06-01 17:35:23 UTC (rev 38= 37) +++ trunk/coregrind/m_syscalls/syscalls.c 2005-06-02 03:39:33 UTC (rev 38= 38) @@ -31,6 +31,7 @@ #include "core.h" #include "pub_core_debuglog.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_main.h" #include "pub_core_profile.h" #include "pub_core_stacktrace.h" Modified: trunk/coregrind/m_translate.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 --- trunk/coregrind/m_translate.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_translate.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -31,6 +31,7 @@ =20 #include "core.h" #include "pub_core_aspacemgr.h" +#include "pub_core_libcbase.h" #include "pub_core_main.h" // for VG_(bbs_done) #include "pub_core_options.h" #include "pub_core_profile.h" Modified: trunk/coregrind/m_transtab.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 --- trunk/coregrind/m_transtab.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/m_transtab.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -31,6 +31,7 @@ =20 #include "core.h" #include "pub_core_debuginfo.h" +#include "pub_core_libcbase.h" #include "pub_core_options.h" #include "pub_core_tooliface.h" // XXX: this module should not depend on m_translate! Added: trunk/coregrind/pub_core_libcbase.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 --- trunk/coregrind/pub_core_libcbase.h 2005-06-01 17:35:23 UTC (rev 3837= ) +++ trunk/coregrind/pub_core_libcbase.h 2005-06-02 03:39:33 UTC (rev 3838= ) @@ -0,0 +1,46 @@ + +/*--------------------------------------------------------------------*/ +/*--- Standalone libc stuff. pub_core_libcbase.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_LIBCBASE_H +#define __PUB_CORE_LIBCBASE_H + +//-------------------------------------------------------------------- +// PURPOSE: This module contains all the libc code that is entirely +// standalone (other than the VG_() macro and some types defined=20 +// elsewhere): string functions, char functions, and a few other things= . +//-------------------------------------------------------------------- + +#include "pub_tool_libcbase.h" + +#endif // __PUB_CORE_LIBCBASE_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ Modified: trunk/coregrind/vg_mylibc.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 --- trunk/coregrind/vg_mylibc.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/vg_mylibc.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -33,6 +33,7 @@ #include "core.h" #include "pub_core_aspacemgr.h" #include "pub_core_debuglog.h" /* VG_(debugLog_vprintf) */ +#include "pub_core_libcbase.h" #include "pub_core_main.h" #include "pub_core_options.h" #include "pub_core_stacktrace.h" @@ -508,334 +509,10 @@ return ret; } =20 - /* --------------------------------------------------------------------- - Misc str* functions. + strdup() ------------------------------------------------------------------ */ =20 -Bool VG_(isspace) ( Char c ) -{ - return (c =3D=3D ' ' || c =3D=3D '\n' || c =3D=3D '\t' ||=20 - c =3D=3D '\f' || c =3D=3D '\v' || c =3D=3D '\r'); -} - -Bool VG_(isdigit) ( Char c ) -{ - return (c >=3D '0' && c <=3D '9'); -} - -Int VG_(strlen) ( const Char* str ) -{ - Int i =3D 0; - while (str[i] !=3D 0) i++; - return i; -} - - -Long VG_(atoll) ( Char* str ) -{ - Bool neg =3D False; - Long n =3D 0; - if (*str =3D=3D '-') { str++; neg =3D True; }; - while (*str >=3D '0' && *str <=3D '9') { - n =3D 10*n + (Long)(*str - '0'); - str++; - } - if (neg) n =3D -n; - return n; -} - - -Long VG_(atoll16) ( Char* str ) -{ - Bool neg =3D False; - Long n =3D 0; - if (*str =3D=3D '-') { str++; neg =3D True; }; - while (True) { - if (*str >=3D '0' && *str <=3D '9') { - n =3D 16*n + (Long)(*str - '0'); - } - else=20 - if (*str >=3D 'A' && *str <=3D 'F') { - n =3D 16*n + (Long)((*str - 'A') + 10); - } - else=20 - if (*str >=3D 'a' && *str <=3D 'f') { - n =3D 16*n + (Long)((*str - 'a') + 10); - } - else { - break; - } - str++; - } - if (neg) n =3D -n; - return n; -} - -Long VG_(atoll36) ( UInt base, Char* str ) -{ - Bool neg =3D False; - Long n =3D 0; - vg_assert(base >=3D 2 && base <=3D 36); - if (*str =3D=3D '-') { str++; neg =3D True; }; - while (True) { - if (*str >=3D '0'=20 - && *str <=3D (Char)('9' - (10 - base))) { - n =3D base*n + (Long)(*str - '0'); - } - else=20 - if (base > 10 && *str >=3D 'A'=20 - && *str <=3D (Char)('Z' - (36 - base))) { - n =3D base*n + (Long)((*str - 'A') + 10); - } - else=20 - if (base > 10 && *str >=3D 'a'=20 - && *str <=3D (Char)('z' - (36 - base))) { - n =3D base*n + (Long)((*str - 'a') + 10); - } - else { - break; - } - str++; - } - if (neg) n =3D -n; - return n; -} - - -Char* VG_(strcat) ( Char* dest, const Char* src ) -{ - Char* dest_orig =3D dest; - while (*dest) dest++; - while (*src) *dest++ =3D *src++; - *dest =3D 0; - return dest_orig; -} - - -Char* VG_(strncat) ( Char* dest, const Char* src, Int n ) -{ - Char* dest_orig =3D dest; - while (*dest) dest++; - while (*src && n > 0) { *dest++ =3D *src++; n--; } - *dest =3D 0; - return dest_orig; -} - - -Char* VG_(strpbrk) ( const Char* s, const Char* accept ) -{ - const Char* a; - while (*s) { - a =3D accept; - while (*a) - if (*a++ =3D=3D *s) - return (Char *) s; - s++; - } - return NULL; -} - - -Char* VG_(strcpy) ( Char* dest, const Char* src ) -{ - Char* dest_orig =3D dest; - while (*src) *dest++ =3D *src++; - *dest =3D 0; - return dest_orig; -} - - -/* Copy bytes, not overrunning the end of dest and always ensuring - zero termination. */ -void VG_(strncpy_safely) ( Char* dest, const Char* src, Int ndest ) -{ - Int i; - vg_assert(ndest > 0); - i =3D 0; - while (True) { - dest[i] =3D 0; - if (src[i] =3D=3D 0) return; - if (i >=3D ndest-1) return; - dest[i] =3D src[i]; - i++; - } -} - - -Char* VG_(strncpy) ( Char* dest, const Char* src, Int ndest ) -{ - Int i =3D 0; - while (True) { - if (i >=3D ndest) return dest; /* reached limit */ - dest[i] =3D src[i]; - if (src[i++] =3D=3D 0) { - /* reached NUL; pad rest with zeroes as required */ - while (i < ndest) dest[i++] =3D 0; - return dest; - } - } -} - - -Int VG_(strcmp) ( const Char* s1, const Char* s2 ) -{ - while (True) { - if (*s1 =3D=3D 0 && *s2 =3D=3D 0) return 0; - if (*s1 =3D=3D 0) return -1; - if (*s2 =3D=3D 0) return 1; - - if (*(UChar*)s1 < *(UChar*)s2) return -1; - if (*(UChar*)s1 > *(UChar*)s2) return 1; - - s1++; s2++; - } -} - -static Bool isterm ( Char c ) -{ - return ( VG_(isspace)(c) || 0 =3D=3D c ); -} - - -Int VG_(strcmp_ws) ( const Char* s1, const Char* s2 ) -{ - while (True) { - if (isterm(*s1) && isterm(*s2)) return 0; - if (isterm(*s1)) return -1; - if (isterm(*s2)) return 1; - - if (*(UChar*)s1 < *(UChar*)s2) return -1; - if (*(UChar*)s1 > *(UChar*)s2) return 1; - - s1++; s2++; - } -} - - -Int VG_(strncmp) ( const Char* s1, const Char* s2, Int nmax ) -{ - Int n =3D 0; - while (True) { - if (n >=3D nmax) return 0; - if (*s1 =3D=3D 0 && *s2 =3D=3D 0) return 0; - if (*s1 =3D=3D 0) return -1; - if (*s2 =3D=3D 0) return 1; - - if (*(UChar*)s1 < *(UChar*)s2) return -1; - if (*(UChar*)s1 > *(UChar*)s2) return 1; - - s1++; s2++; n++; - } -} - - -Int VG_(strncmp_ws) ( const Char* s1, const Char* s2, Int nmax ) -{ - Int n =3D 0; - while (True) { - if (n >=3D nmax) return 0; - if (isterm(*s1) && isterm(*s2)) return 0; - if (isterm(*s1)) return -1; - if (isterm(*s2)) return 1; - - if (*(UChar*)s1 < *(UChar*)s2) return -1; - if (*(UChar*)s1 > *(UChar*)s2) return 1; - - s1++; s2++; n++; - } -} - - -Char* VG_(strstr) ( const Char* haystack, Char* needle ) -{ - Int n;=20 - if (haystack =3D=3D NULL) - return NULL; - n =3D VG_(strlen)(needle); - while (True) { - if (haystack[0] =3D=3D 0)=20 - return NULL; - if (VG_(strncmp)(haystack, needle, n) =3D=3D 0)=20 - return (Char*)haystack; - haystack++; - } -} - - -Char* VG_(strchr) ( const Char* s, Char c ) -{ - while (True) { - if (*s =3D=3D c) return (Char*)s; - if (*s =3D=3D 0) return NULL; - s++; - } -} - - -Char* VG_(strrchr) ( const Char* s, Char c ) -{ - Int n =3D VG_(strlen)(s); - while (--n > 0) { - if (s[n] =3D=3D c) return (Char*)s + n; - } - return NULL; -} - - -void* VG_(memcpy) ( void *dest, const void *src, Int sz ) -{ - const Char *s =3D (const Char *)src; - Char *d =3D (Char *)dest; - vg_assert(sz >=3D 0); - - while (sz--) - *d++ =3D *s++; - - return dest; -} - - -void* VG_(memset) ( void *dest, Int c, Int sz ) -{ - Char *d =3D (Char *)dest; - vg_assert(sz >=3D 0); - - while (sz--) - *d++ =3D c; - - return dest; -} - -Int VG_(memcmp) ( const void* s1, const void* s2, Int n ) -{ - Int res; - UChar a0; - UChar b0; - vg_assert(n >=3D 0); - - while (n !=3D 0) { - a0 =3D ((UChar *) s1)[0]; - b0 =3D ((UChar *) s2)[0]; - s1 +=3D 1; - s2 +=3D 1; - res =3D a0 - b0; - if (res !=3D 0) - return res; - n -=3D 1; - } - return 0; -} - -Char VG_(toupper) ( Char c ) -{ - if (c >=3D 'a' && c <=3D 'z') - return c + ('A' - 'a');=20 - else - return c; -} - - /* Inline just for the wrapper VG_(strdup) below */ __inline__ Char* VG_(arena_strdup) ( ArenaId aid, const Char* s ) { @@ -861,67 +538,6 @@ } =20 /* --------------------------------------------------------------------- - A simple string matching routine, purloined from Hugs98. - '*' matches any sequence of zero or more characters - '?' matches any single character exactly=20 - '\c' matches the character c only (ignoring special chars) - c matches the character c only - ------------------------------------------------------------------ */ - -/* Keep track of recursion depth. */ -static Int recDepth; - -static Bool string_match_wrk ( const Char* pat, const Char* str ) -{ - vg_assert(recDepth >=3D 0 && recDepth < 500); - recDepth++; - for (;;) { - switch (*pat) { - case '\0' : recDepth--; - return (*str=3D=3D'\0'); - case '*' : do { - if (string_match_wrk(pat+1,str)) { - recDepth--; - return True; - } - } while (*str++); - recDepth--; - return False; - case '?' : if (*str++=3D=3D'\0') { - recDepth--; - return False; - } - pat++; - break; - case '\\' : if (*++pat =3D=3D '\0') { - recDepth--; - return False; /* spurious trailing \ in pattern = */ - } - /* falls through to ... */ - default : if (*pat++ !=3D *str++) { - recDepth--; - return False; - } - break; - } - } -} - -Bool VG_(string_match) ( const Char* pat, const Char* str ) -{ - Bool b; - recDepth =3D 0; - b =3D string_match_wrk ( pat, str ); - vg_assert(recDepth =3D=3D 0); - /* - VG_(printf)("%s %s %s\n", - b?"TRUE ":"FALSE", pat, str); - */ - return b; -} - - -/* --------------------------------------------------------------------- Assertery. ------------------------------------------------------------------ */ =20 @@ -1586,106 +1202,6 @@ } =20 /* --------------------------------------------------------------------- - Generally useful... - ------------------------------------------------------------------ */ - -Int VG_(log2) ( Int x )=20 -{ - Int i; - /* Any more than 32 and we overflow anyway... */ - for (i =3D 0; i < 32; i++) { - if (1 << i =3D=3D x) return i; - } - return -1; -} - - -// Generic shell sort. Like stdlib.h's qsort(). -void VG_(ssort)( void* base, SizeT nmemb, SizeT size, - Int (*compar)(void*, void*) ) -{ - Int incs[14] =3D { 1, 4, 13, 40, 121, 364, 1093, 3280, - 9841, 29524, 88573, 265720, - 797161, 2391484 }; - Int lo =3D 0; - Int hi =3D nmemb-1; - Int i, j, h, bigN, hp; - - bigN =3D hi - lo + 1; if (bigN < 2) return; - hp =3D 0; while (hp < 14 && incs[hp] < bigN) hp++; hp--; - vg_assert(0 <=3D hp && hp < 14); - - #define SORT \ - for ( ; hp >=3D 0; hp--) { \ - h =3D incs[hp]; \ - for (i =3D lo + h; i <=3D hi; i++) { \ - ASSIGN(v,0, a,i); \ - j =3D i; \ - while (COMPAR(a,(j-h), v,0) > 0) { \ - ASSIGN(a,j, a,(j-h)); \ - j =3D j - h; \ - if (j <=3D (lo + h - 1)) break; \ - } \ - ASSIGN(a,j, v,0); \ - } \ - } - - // Specialised cases - if (sizeof(ULong) =3D=3D size) { - - #define ASSIGN(dst, dsti, src, srci) \ - (dst)[(dsti)] =3D (src)[(srci)]; =20 - =20 - #define COMPAR(dst, dsti, src, srci) \ - compar( (void*)(& (dst)[(dsti)]), (void*)(& (src)[(srci)]) ) - - ULong* a =3D (ULong*)base; - ULong v[1]; - - SORT; - - } else if (sizeof(UInt) =3D=3D size) { - - UInt* a =3D (UInt*)base; - UInt v[1]; - - SORT; - - } else if (sizeof(UShort) =3D=3D size) { - UShort* a =3D (UShort*)base; - UShort v[1]; - - SORT; - - } else if (sizeof(UChar) =3D=3D size) { - UChar* a =3D (UChar*)base; - UChar v[1]; - - SORT; - - #undef ASSIGN - #undef COMPAR - - // General case - } else { - char* a =3D base; - char v[size]; // will be at least 'size' bytes - - #define ASSIGN(dst, dsti, src, srci) \ - VG_(memcpy)( &dst[size*(dsti)], &src[size*(srci)], size ); - - #define COMPAR(dst, dsti, src, srci) \ - compar( &dst[size*(dsti)], &src[size*(srci)] ) - - SORT; - - #undef ASSIGN - #undef COMPAR - } - #undef SORT -} - -/* --------------------------------------------------------------------- Gruesome hackery for connecting to a logging server over the network. This is all very Linux-kernel specific. ------------------------------------------------------------------ */ Modified: trunk/coregrind/x86/state.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 --- trunk/coregrind/x86/state.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/coregrind/x86/state.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -29,6 +29,7 @@ */ =20 #include "core.h" +#include "pub_core_libcbase.h" #include "pub_core_tooliface.h" #include "vki_unistd.h" #include <sys/ptrace.h> Modified: trunk/helgrind/hg_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 --- trunk/helgrind/hg_main.c 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/helgrind/hg_main.c 2005-06-02 03:39:33 UTC (rev 3838) @@ -32,6 +32,7 @@ #include "tool.h" #include "pub_tool_debuginfo.h" #include "pub_tool_hashtable.h" +#include "pub_tool_libcbase.h" #include "pub_tool_mallocfree.h" #include "pub_tool_options.h" #include "pub_tool_profile.h" Modified: trunk/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 --- trunk/include/Makefile.am 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/include/Makefile.am 2005-06-02 03:39:33 UTC (rev 3838) @@ -8,6 +8,7 @@ pub_tool_errormgr.h \ pub_tool_execontext.h \ pub_tool_hashtable.h \ + pub_tool_libcbase.h \ pub_tool_mallocfree.h \ pub_tool_options.h \ pub_tool_profile.h \ Added: trunk/include/pub_tool_libcbase.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 --- trunk/include/pub_tool_libcbase.h 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/include/pub_tool_libcbase.h 2005-06-02 03:39:33 UTC (rev 3838) @@ -0,0 +1,115 @@ + +/*--------------------------------------------------------------------*/ +/*--- Standalone libc stuff. pub_tool_libcbase.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_LIBCBASE_H +#define __PUB_TOOL_LIBCBASE_H + +/* --------------------------------------------------------------------- + Char functions. + ------------------------------------------------------------------ */ + +extern Bool VG_(isspace) ( Char c ); +extern Bool VG_(isdigit) ( Char c ); + +/* --------------------------------------------------------------------- + Converting strings to numbers + ------------------------------------------------------------------ */ + +extern Long VG_(atoll) ( Char* str ); // base 10 +extern Long VG_(atoll36) ( Char* str ); // base 36 + +/* --------------------------------------------------------------------- + String functions and macros + ------------------------------------------------------------------ */ + +/* Use this for normal null-termination-style string comparison */ +#define VG_STREQ(s1,s2) (s1 !=3D NULL && s2 !=3D NULL \ + && VG_(strcmp)((s1),(s2))=3D=3D0) + +extern Int VG_(strlen) ( const Char* str ); +extern Char* VG_(strcat) ( Char* dest, const Char* src ); +extern Char* VG_(strncat) ( Char* dest, const Char* src, SizeT n = ); +extern Char* VG_(strpbrk) ( const Char* s, const Char* accpt ); +extern Char* VG_(strcpy) ( Char* dest, const Char* src ); +extern Char* VG_(strncpy) ( Char* dest, const Char* src, SizeT nd= est ); +extern Int VG_(strcmp) ( const Char* s1, const Char* s2 ); +extern Int VG_(strncmp) ( const Char* s1, const Char* s2, SizeT= nmax ); +extern Char* VG_(strstr) ( const Char* haystack, Char* needle ); +extern Char* VG_(strchr) ( const Char* s, Char c ); +extern Char* VG_(strrchr) ( const Char* s, Char c ); +extern Char* VG_(strdup) ( const Char* s); + +/* Like strcmp() and strncmp(), but stop comparing at any whitespace. */ +extern Int VG_(strcmp_ws) ( const Char* s1, const Char* s2 ); +extern Int VG_(strncmp_ws) ( const Char* s1, const Char* s2, SizeT= nmax ); + +/* Like strncpy(), but if 'src' is longer than 'ndest' inserts a '\0' as= the + last character. */ +extern void VG_(strncpy_safely) ( Char* dest, const Char* src, SizeT nd= est ); + +/* Mini-regexp function. Searches for 'pat' in 'str'. Supports + * meta-symbols '*' and '?'. '\' escapes meta-symbols. */ +extern Bool VG_(string_match) ( const Char* pat, const Char* str ); + +/* --------------------------------------------------------------------- + mem* functions + ------------------------------------------------------------------ */ + +extern void* VG_(memcpy) ( void *d, const void *s, SizeT sz ); +extern void* VG_(memset) ( void *s, Int c, SizeT sz ); +extern Int VG_(memcmp) ( const void* s1, const void* s2, SizeT n ); + +/* --------------------------------------------------------------------- + Address computation helpers + ------------------------------------------------------------------ */ + +// Check if an address/whatever is aligned +#define VG_IS_4_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)0x= 3))) +#define VG_IS_8_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)0x= 7))) +#define VG_IS_16_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)0x= f))) +#define VG_IS_WORD_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)(s= izeof(Addr)-1)))) +#define VG_IS_PAGE_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)(V= KI_PAGE_SIZE-1)))) + +/* --------------------------------------------------------------------- + Misc useful functions + ------------------------------------------------------------------ */ + +/* Like qsort(), but does shell-sort. The size=3D=3D1/2/4 cases are spe= cialised. */ +extern void VG_(ssort)( void* base, SizeT nmemb, SizeT size, + Int (*compar)(void*, void*) ); + +/* Returns the base-2 logarithm of x. */ +extern Int VG_(log2) ( Int x ); + +#endif // __PUB_TOOL_LIBCBASE_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ Modified: trunk/include/tool.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 --- trunk/include/tool.h 2005-06-01 17:35:23 UTC (rev 3837) +++ trunk/include/tool.h 2005-06-02 03:39:33 UTC (rev 3838) @@ -63,11 +63,6 @@ /* Path to all our library/aux files */ extern const Char *VG_(libdir); =20 - -/* Use this for normal null-termination-style string comparison */ -#define VG_STREQ(s1,s2) (s1 !=3D NULL && s2 !=3D NULL \ - && VG_(strcmp)((s1),(s2))=3D=3D0) - /* Client args */ extern Int VG_(client_argc); extern Char** VG_(client_argv); @@ -101,17 +96,6 @@ /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 /* ------------------------------------------------------------------ */ -/* General stuff */ - -/* Check if an address/whatever is aligned */ -#define VG_IS_4_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)0x= 3))) -#define VG_IS_8_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)0x= 7))) -#define VG_IS_16_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)0x= f))) -#define VG_IS_WORD_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)(s= izeof(Addr)-1)))) -#define VG_IS_PAGE_ALIGNED(aaa_p) (0 =3D=3D (((Addr)(aaa_p)) & ((Addr)(V= KI_PAGE_SIZE-1)))) - - -/* ------------------------------------------------------------------ */ /* Thread-related stuff */ =20 /* Special magic value for an invalid ThreadId. It corresponds to @@ -137,17 +121,10 @@ /*=3D=3D=3D Valgrind's version of libc = =3D=3D=3D*/ /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 -/* Valgrind doesn't use libc at all, for good reasons (trust us). So he= re - are its own versions of C library functions, but with VG_ prefixes. = Note - that the types of some are slightly different to the real ones. Some - additional useful functions are provided too; descriptions of how the= y - work are given below. */ - #if !defined(NULL) # define NULL ((void*)0) #endif =20 - /* ------------------------------------------------------------------ */ /* stdio.h * @@ -187,64 +164,7 @@ /* Crude stand-in for the glibc system() call. */ extern Int VG_(system) ( Char* cmd ); =20 -extern Long VG_(atoll) ( Char* str ); - -/* Like atoll(), but converts a number of base 16 */ -extern Long VG_(atoll16) ( Char* str ); - -/* Like atoll(), but converts a number of base 2..36 */ -extern Long VG_(atoll36) ( UInt base, Char* str ); - -/* Like qsort(), but does shell-sort. The size=3D=3D1/2/4 cases are spe= cialised. */ -extern void VG_(ssort)( void* base, SizeT nmemb, SizeT size, - Int (*compar)(void*, void*) ); - - /* ------------------------------------------------------------------ */ -/* ctype.h */ -extern Bool VG_(isspace) ( Char c ); -extern Bool VG_(isdigit) ( Char c ); -extern Char VG_(toupper) ( Char c ); - - -/* ------------------------------------------------------------------ */ -/* string.h */ -extern Int VG_(strlen) ( const Char* str ); -extern Char* VG_(strcat) ( Char* dest, const Char* src ); -extern Char* VG_(strncat) ( Char* dest, const Char* src, Int n ); -extern Char* VG_(strpbrk) ( const Char* s, const Char* accpt ); -extern Char* VG_(strcpy) ( Char* dest, const Char* src ); -extern Char* VG_(strncpy) ( Char* dest, const Char* src... [truncated message content] |
|
From: <js...@ac...> - 2005-06-02 02:50:05
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-06-02 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow Nightly build on phoenix ( SuSE 9.1 ) started at 2005-06-02 03:50:00 BST |
|
From: Tom H. <to...@co...> - 2005-06-02 02:36:05
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-06-02 03:30:04 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 == 176 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-02 02:30:29
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-06-02 03:25:01 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 == 175 tests, 19 stderr failures, 13 stdout failures ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/pth_atfork1 (stdout) corecheck/tests/pth_atfork1 (stderr) corecheck/tests/pth_cancel1 (stdout) corecheck/tests/pth_cancel1 (stderr) corecheck/tests/pth_cancel2 (stderr) corecheck/tests/pth_cvsimple (stdout) corecheck/tests/pth_cvsimple (stderr) corecheck/tests/pth_exit (stderr) corecheck/tests/pth_once (stdout) corecheck/tests/pth_once (stderr) corecheck/tests/res_search (stdout) corecheck/tests/res_search (stderr) corecheck/tests/threadederrno (stdout) corecheck/tests/threadederrno (stderr) none/tests/faultstatus (stderr) none/tests/manythreads (stdout) none/tests/manythreads (stderr) none/tests/pth_blockedsig (stdout) none/tests/pth_blockedsig (stderr) none/tests/pth_stackalign (stdout) none/tests/pth_stackalign (stderr) none/tests/thread-exits (stdout) none/tests/thread-exits (stderr) none/tests/threaded-fork (stdout) none/tests/threaded-fork (stderr) none/tests/tls (stdout) none/tests/tls (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) none/tests/yield (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-02 02:25:29
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-06-02 03:20:02 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 == 174 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-02 02:20:39
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-06-02 03:15:02 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 == 174 tests, 13 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (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/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-06-02 02:19:38
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-06-02 03:10:03 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 == 155 tests, 15 stderr failures, 2 stdout failures ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-06-02 02:05:17
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-06-02 03:00:02 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 == 155 tests, 16 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |