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
(11) |
2
(8) |
|
3
(8) |
4
(8) |
5
(8) |
6
(19) |
7
(17) |
8
(12) |
9
(10) |
|
10
(15) |
11
(18) |
12
(14) |
13
(16) |
14
(24) |
15
(16) |
16
(12) |
|
17
(25) |
18
(23) |
19
(12) |
20
(10) |
21
(9) |
22
(12) |
23
(13) |
|
24
(19) |
25
(7) |
26
(39) |
27
(22) |
28
(22) |
29
(16) |
30
(13) |
|
31
(23) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2006-12-30 17:58:22
|
Author: sewardj
Date: 2006-12-30 17:58:20 +0000 (Sat, 30 Dec 2006)
New Revision: 6461
Log:
Merge r6460 (Remove redundant \n)
Modified:
branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c 2006-12-30 17:56:32 U=
TC (rev 6460)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c 2006-12-30 17:58:20 U=
TC (rev 6461)
@@ -1674,7 +1674,7 @@
);
VG_(message)(
Vg_DebugMsg,=20
- "Page sizes: currently %d, max supported %d\n",=20
+ "Page sizes: currently %d, max supported %d",=20
(Int)VKI_PAGE_SIZE, (Int)VKI_MAX_PAGE_SIZE
);
VG_(message)(Vg_DebugMsg, "Valgrind library directory: %s", VG_(li=
bdir));
|
|
From: <sv...@va...> - 2006-12-30 17:56:33
|
Author: sewardj
Date: 2006-12-30 17:56:32 +0000 (Sat, 30 Dec 2006)
New Revision: 6460
Log:
Remove redundant \n
Modified:
trunk/coregrind/m_main.c
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 2006-12-30 17:45:08 UTC (rev 6459)
+++ trunk/coregrind/m_main.c 2006-12-30 17:56:32 UTC (rev 6460)
@@ -897,7 +897,7 @@
);
VG_(message)(
Vg_DebugMsg,=20
- "Page sizes: currently %d, max supported %d\n",=20
+ "Page sizes: currently %d, max supported %d",=20
(Int)VKI_PAGE_SIZE, (Int)VKI_MAX_PAGE_SIZE
);
VG_(message)(Vg_DebugMsg, "Valgrind library directory: %s", VG_(li=
bdir));
|
|
From: <sv...@va...> - 2006-12-30 17:45:11
|
Author: sewardj
Date: 2006-12-30 17:45:08 +0000 (Sat, 30 Dec 2006)
New Revision: 6459
Log:
Merge (from 3_2_BRANCH) r6457/8 (Support 64k pages on ppc32/64-linux
(Jakub Jelink, Dave Nomura) )
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-common.c
trunk/coregrind/m_main.c
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/coregrind/m_ume.c
trunk/coregrind/m_vki.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/include/vki/vki-amd64-linux.h
trunk/include/vki/vki-ppc32-linux.h
trunk/include/vki/vki-ppc64-linux.h
trunk/include/vki/vki-x86-linux.h
trunk/memcheck/tests/memalign_test.c
trunk/memcheck/tests/memalign_test.stderr.exp
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-common.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-common.c 2006-12-30 04:06:15 UT=
C (rev 6458)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-common.c 2006-12-30 17:45:08 UT=
C (rev 6459)
@@ -151,8 +151,10 @@
SysRes res;
aspacem_assert(VG_IS_PAGE_ALIGNED(offset));
# if defined(VGP_x86_linux) || defined(VGP_ppc32_linux)
+ /* mmap2 uses 4096 chunks even if actual page size is bigger. */
+ aspacem_assert((offset % 4096) =3D=3D 0);
res =3D VG_(do_syscall6)(__NR_mmap2, (UWord)start, length,
- prot, flags, fd, offset / VKI_PAGE_SIZE);
+ prot, flags, fd, offset / 4096);
# elif defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) \
|| defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
res =3D VG_(do_syscall6)(__NR_mmap, (UWord)start, length,=20
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 2006-12-30 04:06:15 UTC (rev 6458)
+++ trunk/coregrind/m_main.c 2006-12-30 17:45:08 UTC (rev 6459)
@@ -895,6 +895,11 @@
LibVEX_ppVexArch ( vex_arch ),
LibVEX_ppVexHwCaps ( vex_arch, vex_archinfo.hwcaps )
);
+ VG_(message)(
+ Vg_DebugMsg,=20
+ "Page sizes: currently %d, max supported %d\n",=20
+ (Int)VKI_PAGE_SIZE, (Int)VKI_MAX_PAGE_SIZE
+ );
VG_(message)(Vg_DebugMsg, "Valgrind library directory: %s", VG_(li=
bdir));
}
}
@@ -1256,6 +1261,11 @@
// p: logging, plausible-stack
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Starting the address space manager\n");
+ vg_assert(VKI_PAGE_SIZE =3D=3D 4096 || VKI_PAGE_SIZE =3D=3D 6=
5536);
+ vg_assert(VKI_MAX_PAGE_SIZE =3D=3D 4096 || VKI_MAX_PAGE_SIZE =3D=3D 6=
5536);
+ vg_assert(VKI_PAGE_SIZE <=3D VKI_MAX_PAGE_SIZE);
+ vg_assert(VKI_PAGE_SIZE =3D=3D (1 << VKI_PAGE_SHIFT));
+ vg_assert(VKI_MAX_PAGE_SIZE =3D=3D (1 << VKI_MAX_PAGE_SHIFT));
the_iicii.clstack_top =3D VG_(am_startup)( the_iicii.sp_at_startup );
VG_(debugLog)(1, "main", "Address space manager is running\n");
=20
@@ -2249,6 +2259,13 @@
#error "_start: needs implementation on this platform"
#endif
=20
+/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+/* This is in order to get AT_NULL and AT_PAGESIZE. */
+#include <elf.h>
+/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
+
/* Avoid compiler warnings: this fn _is_ used, but labelling it
'static' causes gcc to complain it isn't. */
void _start_in_C_linux ( UWord* pArgc );
@@ -2264,6 +2281,25 @@
=20
the_iicii.sp_at_startup =3D (Addr)pArgc;
=20
+# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+ {
+ /* ppc/ppc64 can be configured with different page sizes.
+ Determine this early. This is an ugly hack and really should
+ be moved into valgrind_main. */
+ UWord *sp =3D &pArgc[1+argc+1];
+ while (*sp++ !=3D 0)
+ ;
+ for (; *sp !=3D AT_NULL && *sp !=3D AT_PAGESZ; sp +=3D 2);
+ if (*sp =3D=3D AT_PAGESZ) {
+ VKI_PAGE_SIZE =3D sp[1];
+ for (VKI_PAGE_SHIFT =3D 12;
+ VKI_PAGE_SHIFT <=3D VKI_MAX_PAGE_SHIFT; VKI_PAGE_SHIFT++)
+ if (VKI_PAGE_SIZE =3D=3D (1UL << VKI_PAGE_SHIFT))
+ break;
+ }
+ }
+# endif
+
r =3D valgrind_main( (Int)argc, argv, envp );
/* NOTREACHED */
VG_(exit)(r);
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.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/vg_replace_malloc.c 2006-12-30 04:06:=
15 UTC (rev 6458)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2006-12-30 17:45:=
08 UTC (rev 6459)
@@ -45,7 +45,7 @@
------------------------------------------------------------------ */
=20
#include "pub_core_basics.h"
-#include "pub_core_vki.h" // VKI_EINVAL, VKI_ENOMEM, VKI_PAGE_=
SIZE
+#include "pub_core_vki.h" // VKI_EINVAL, VKI_ENOMEM
#include "pub_core_clreq.h" // for VALGRIND_INTERNAL_PRINTF,
// VALGRIND_NON_SIMD_CALL[12]
#include "pub_core_debuginfo.h" // needed for pub_core_redir.h :(
@@ -455,7 +455,12 @@
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( SizeT size ); \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( SizeT size ) \
{ \
- return VG_REPLACE_FUNCTION_ZU(m_libc_soname,memalign)(VKI_PAGE_SIZ=
E, size); \
+ static int pszB =3D 0; \
+ extern int getpagesize (void); \
+ if (pszB =3D=3D 0) \
+ pszB =3D getpagesize(); \
+ return VG_REPLACE_FUNCTION_ZU(m_libc_soname,memalign) \
+ ((SizeT)pszB, size); \
}
=20
VALLOC(m_libc_soname, valloc);
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-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_syswrap/syswrap-ppc32-linux.c 2006-12-30 04:06:15 U=
TC (rev 6458)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2006-12-30 17:45:08 U=
TC (rev 6459)
@@ -673,7 +673,7 @@
SysRes r;
=20
// Exactly like old_mmap() except:
- // - the file offset is specified in pagesize units rather than byte=
s,
+ // - the file offset is specified in 4K units rather than bytes,
// so that it can be used for files bigger than 2^32 bytes.
PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
@@ -683,7 +683,7 @@
unsigned long, fd, unsigned long, offset);
=20
r =3D ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5,=20
- VKI_PAGE_SIZE * (Off64T)ARG6 );
+ 4096 * (Off64T)ARG6 );
SET_STATUS_from_SysRes(r);
}
=20
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-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_syswrap/syswrap-ppc64-linux.c 2006-12-30 04:06:15 U=
TC (rev 6458)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2006-12-30 17:45:08 U=
TC (rev 6459)
@@ -701,7 +701,7 @@
//zz SysRes r;
//zz=20
//zz // Exactly like old_mmap() except:
-//zz // - the file offset is specified in pagesize units rather than=
bytes,
+//zz // - the file offset is specified in 4K units rather than bytes=
,
//zz // so that it can be used for files bigger than 2^32 bytes.
//zz PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
//zz ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
@@ -711,7 +711,7 @@
//zz unsigned long, fd, unsigned long, offset);
//zz=20
//zz r =3D ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, AR=
G5,=20
-//zz VKI_PAGE_SIZE * (Off64T)ARG6=
);
+//zz 4096 * (Off64T)ARG6 );
//zz SET_STATUS_from_SysRes(r);
//zz }
//zz=20
Modified: trunk/coregrind/m_syswrap/syswrap-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_syswrap/syswrap-x86-linux.c 2006-12-30 04:06:15 UTC=
(rev 6458)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2006-12-30 17:45:08 UTC=
(rev 6459)
@@ -1300,6 +1300,9 @@
// - all 6 args are passed in regs, rather than in a memory-block.
// - the file offset is specified in pagesize units rather than byte=
s,
// so that it can be used for files bigger than 2^32 bytes.
+ // pagesize or 4K-size units in offset? For ppc32/64-linux, this is
+ // 4K-sized. Assert that the page size is 4K here for safety.
+ vg_assert(VKI_PAGE_SIZE =3D=3D 4096);
PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap2",
@@ -1308,7 +1311,7 @@
unsigned long, fd, unsigned long, offset);
=20
r =3D ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5,=20
- VKI_PAGE_SIZE * (Off64T)ARG6 );
+ 4096 * (Off64T)ARG6 );
SET_STATUS_from_SysRes(r);
}
=20
Modified: trunk/coregrind/m_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/m_ume.c 2006-12-30 04:06:15 UTC (rev 6458)
+++ trunk/coregrind/m_ume.c 2006-12-30 17:45:08 UTC (rev 6459)
@@ -565,7 +565,7 @@
/* returns: 0 =3D success, non-0 is failure */
static Int load_script(Int fd, const HChar* name, ExeInfo* info)
{
- Char hdr[VKI_PAGE_SIZE];
+ Char hdr[VKI_MAX_PAGE_SIZE];
Int len =3D VKI_PAGE_SIZE;
Int eol;
Char* interp;
@@ -640,7 +640,7 @@
{
Int fd, ret;
SysRes res;
- Char buf[VKI_PAGE_SIZE];
+ Char buf[VKI_MAX_PAGE_SIZE];
SizeT bufsz =3D VKI_PAGE_SIZE, fsz;
=20
// Check it's readable
Modified: trunk/coregrind/m_vki.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_vki.c 2006-12-30 04:06:15 UTC (rev 6458)
+++ trunk/coregrind/m_vki.c 2006-12-30 17:45:08 UTC (rev 6459)
@@ -35,9 +35,18 @@
/* We have pub_{core,tool}_vki.h. This is the matching implementation
for that interface. In fact there is no implementation, as the
sole purpose of the module is to export types and constants
- describing the kernel interface, so this file is empty. */
+ describing the kernel interface, so this file is nearly empty. */
=20
=20
+/* ppc32/64-linux determines page size at startup, hence m_vki is
+ the logical place to store that info. */
+
+#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+unsigned long VKI_PAGE_SHIFT =3D 12;
+unsigned long VKI_PAGE_SIZE =3D 1UL << 12;
+#endif
+
+
/*--------------------------------------------------------------------*/
/*--- end m_vki.c ---*/
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/pub_core_aspacemgr.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_aspacemgr.h 2006-12-30 04:06:15 UTC (rev 645=
8)
+++ trunk/coregrind/pub_core_aspacemgr.h 2006-12-30 17:45:08 UTC (rev 645=
9)
@@ -368,8 +368,13 @@
// stacks. The address space manager provides and suitably
// protects such stacks.
=20
-#define VG_STACK_GUARD_SZB 8192 // 2 pages
-#define VG_STACK_ACTIVE_SZB 65536 // 16 pages
+#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+# define VG_STACK_GUARD_SZB 65536 // 1 or 16 pages
+# define VG_STACK_ACTIVE_SZB 131072 // 2 or 32 pages
+#else
+# define VG_STACK_GUARD_SZB 8192 // 2 pages
+# define VG_STACK_ACTIVE_SZB 65536 // 16 pages
+#endif
=20
typedef
struct {
Modified: trunk/include/vki/vki-amd64-linux.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/vki/vki-amd64-linux.h 2006-12-30 04:06:15 UTC (rev 6458=
)
+++ trunk/include/vki/vki-amd64-linux.h 2006-12-30 17:45:08 UTC (rev 6459=
)
@@ -59,6 +59,8 @@
=20
#define VKI_PAGE_SHIFT 12
#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
=20
//----------------------------------------------------------------------
// From linux-2.6.9/include/asm-x86_64/signal.h
Modified: trunk/include/vki/vki-ppc32-linux.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/vki/vki-ppc32-linux.h 2006-12-30 04:06:15 UTC (rev 6458=
)
+++ trunk/include/vki/vki-ppc32-linux.h 2006-12-30 17:45:08 UTC (rev 6459=
)
@@ -61,9 +61,12 @@
// From linux-2.6.9/include/asm-ppc/page.h
//----------------------------------------------------------------------
=20
-/* PAGE_SHIFT determines the page size */
-#define VKI_PAGE_SHIFT 12
-#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+/* PAGE_SHIFT determines the page size, unfortunately
+ page size might vary between 32-bit and 64-bit ppc kernels */
+extern unsigned long VKI_PAGE_SHIFT;
+extern unsigned long VKI_PAGE_SIZE;
+#define VKI_MAX_PAGE_SHIFT 16
+#define VKI_MAX_PAGE_SIZE (1UL << VKI_MAX_PAGE_SHIFT)
=20
//----------------------------------------------------------------------
// From linux-2.6.9/include/asm-ppc/signal.h
Modified: trunk/include/vki/vki-ppc64-linux.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/vki/vki-ppc64-linux.h 2006-12-30 04:06:15 UTC (rev 6458=
)
+++ trunk/include/vki/vki-ppc64-linux.h 2006-12-30 17:45:08 UTC (rev 6459=
)
@@ -62,9 +62,12 @@
// From linux-2.6.13/include/asm-ppc64/page.h
//----------------------------------------------------------------------
=20
-/* PAGE_SHIFT determines the page size */
-#define VKI_PAGE_SHIFT 12
-#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+/* PAGE_SHIFT determines the page size, unfortunately
+ page size might vary between 32-bit and 64-bit ppc kernels */
+extern unsigned long VKI_PAGE_SHIFT;
+extern unsigned long VKI_PAGE_SIZE;
+#define VKI_MAX_PAGE_SHIFT 16
+#define VKI_MAX_PAGE_SIZE (1UL << VKI_MAX_PAGE_SHIFT)
=20
//----------------------------------------------------------------------
// From linux-2.6.13/include/asm-ppc64/signal.h
Modified: trunk/include/vki/vki-x86-linux.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/vki/vki-x86-linux.h 2006-12-30 04:06:15 UTC (rev 6458)
+++ trunk/include/vki/vki-x86-linux.h 2006-12-30 17:45:08 UTC (rev 6459)
@@ -60,6 +60,8 @@
/* PAGE_SHIFT determines the page size */
#define VKI_PAGE_SHIFT 12
#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
=20
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/asm-i386/signal.h
Modified: trunk/memcheck/tests/memalign_test.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/tests/memalign_test.c 2006-12-30 04:06:15 UTC (rev 645=
8)
+++ trunk/memcheck/tests/memalign_test.c 2006-12-30 17:45:08 UTC (rev 645=
9)
@@ -1,13 +1,21 @@
=20
#include <stdlib.h>
#include <stdio.h>
+#include <unistd.h>
+#include <assert.h>
=20
int main ( void )
{
void* a[10];
int i;
+ unsigned long pszB =3D sysconf(_SC_PAGE_SIZE);
+ assert(sizeof(long) =3D=3D sizeof(void*));
+ assert(pszB =3D=3D 4096 || pszB =3D=3D 65536);
+
for (i =3D 0; i < 10; i++) {
a[i] =3D valloc(11111 * (i+1));
+ /* check valloc really is returning page-aligned memory */
+ assert( (((unsigned long)(a[i])) % pszB) =3D=3D 0 );
// printf("I acquire %p\n", a[i]);
}
for (i =3D 0; i < 10; i++) {
Modified: trunk/memcheck/tests/memalign_test.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/tests/memalign_test.stderr.exp 2006-12-30 04:06:15 UTC=
(rev 6458)
+++ trunk/memcheck/tests/memalign_test.stderr.exp 2006-12-30 17:45:08 UTC=
(rev 6459)
@@ -1,6 +1,6 @@
Invalid free() / delete / delete[]
at 0x........: free (vg_replace_malloc.c:...)
- by 0x........: main (memalign_test.c:17)
+ by 0x........: main (memalign_test.c:25)
Address 0x........ is 0 bytes inside a block of size 111,110 free'd
at 0x........: free (vg_replace_malloc.c:...)
- by 0x........: main (memalign_test.c:15)
+ by 0x........: main (memalign_test.c:23)
|
|
From: Bart V. A. <bar...@gm...> - 2006-12-30 15:06:46
|
A new drd version is available at http://home.euphonynet.be/bvassche/valgrind/valgrind-6458-drd-2006-12-30.patch.gz. Core changes since last version (2006-12-13): * oset comparison and lookup functions now accept const arguments without compiler warning. * added function VG_(memmove)(). * added function VG_(thread_get_stack_max)(const ThreadId tid). * pub_tool_vki.h has no longer to be included before include/pub_tool_libcfile.h is included. drd changes since last version (2006-12-13): * changed the bitmap representation from a three-level bitmap to oset + bitmap. * added support for spinlocks. * state information is now kept for POSIX condition variables. This allows a.o. to print an error message when pthread_cond_signal() or pthread_cond_broadcast() is called without locking the correct mutex from the signalling thread. * drd now keeps track of stack bounds per thread -- this information is updated each time the stack pointer changes. * memory accesses by system calls are now also taken into account for data race detection. * re-enabled tracking of dynamic memory allocations. When a conflict is detected on dynamically allocated memory, the call stack of the allocation is printed as well. * conflicting accesses to the top of the stack (where NPTL keeps its 'struct pthread' datastructure) are suppressed. * implemented "danger set" algorithm. The danger set is defined as the set containing all accesses of all segments of all threads other than the running thread that are unordered to the active segment of the running thread. This danger set is updated at each context switch, each time vector clocks are combined and each time memory is freed (via free(), delete or by increasing the stack pointer). * conflicting memory accesses are now reported immediately. The advantage is that an exact call stack can be printed for each conflicting access. * error suppressions now work in drd. * attempted to write a suppression file that suppresses some data races present in ld.so / libc / libstd++ / libpthread (drd/default.supp). I learned that suppressing data races by callstack probably won't be too coarse for the drd tool: several call stacks have to be included for accesses to the same location, and the danger exists that some of these call stacks suppress data races that should be reported to the user. * added command-line option for printing statistics about internal drd activity. * added command-line option for tracing all loads and stores to a certain address. This can be a big help for finding out the meaning of printed data addresses. Summarized: although one important algorithm change is still needed (segment merging), the tool is already useful for finding out which data races happened and why. But it will be a challenge to suppress all intended data races (in ld.so, glibc, libstdc++ and libpthread.so). Bart. |
|
From: <js...@ac...> - 2006-12-30 06:00:51
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-12-30 09:00:02 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 217 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <js...@ac...> - 2006-12-30 05:07:00
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-12-30 04:30:01 GMT 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 == 250 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= 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 == 250 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Dec 30 04:49:03 2006 --- new.short Sat Dec 30 05:07:12 2006 *************** *** 10,12 **** ! == 250 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) --- 10,12 ---- ! == 250 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/leak-tree (stderr) *************** *** 18,20 **** none/tests/mremap2 (stdout) - none/tests/pth_detached (stdout) --- 18,19 ---- |
|
From: <sv...@va...> - 2006-12-30 04:06:18
|
Author: sewardj
Date: 2006-12-30 04:06:15 +0000 (Sat, 30 Dec 2006)
New Revision: 6458
Log:
Followup to r6457 (Support 64k pages on ppc32/64-linux) which adds
some assertions and then fixes definitions accordingly.
Modified:
branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c
branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h
branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c 2006-12-30 02:46:07 U=
TC (rev 6457)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c 2006-12-30 04:06:15 U=
TC (rev 6458)
@@ -2041,6 +2041,8 @@
vg_assert(VKI_PAGE_SIZE =3D=3D 4096 || VKI_PAGE_SIZE =3D=3D 6=
5536);
vg_assert(VKI_MAX_PAGE_SIZE =3D=3D 4096 || VKI_MAX_PAGE_SIZE =3D=3D 6=
5536);
vg_assert(VKI_PAGE_SIZE <=3D VKI_MAX_PAGE_SIZE);
+ vg_assert(VKI_PAGE_SIZE =3D=3D (1 << VKI_PAGE_SHIFT));
+ vg_assert(VKI_MAX_PAGE_SIZE =3D=3D (1 << VKI_MAX_PAGE_SHIFT));
clstack_top =3D VG_(am_startup)( sp_at_startup );
VG_(debugLog)(1, "main", "Address space manager is running\n");
=20
@@ -2988,11 +2990,11 @@
while (*sp++ !=3D 0);
for (; *sp !=3D AT_NULL && *sp !=3D AT_PAGESZ; sp +=3D 2);
if (*sp =3D=3D AT_PAGESZ) {
- VKI_PAGE_SIZE =3D sp[1];
- for (VKI_PAGE_SHIFT =3D 12;
- VKI_PAGE_SHIFT <=3D VKI_MAX_PAGE_SHIFT; VKI_PAGE_SHIFT++)
- if (VKI_PAGE_SIZE =3D=3D (1UL << VKI_PAGE_SHIFT))
- break;
+ VKI_PAGE_SIZE =3D sp[1];
+ for (VKI_PAGE_SHIFT =3D 12;
+ VKI_PAGE_SHIFT <=3D VKI_MAX_PAGE_SHIFT; VKI_PAGE_SHIFT++)
+ if (VKI_PAGE_SIZE =3D=3D (1UL << VKI_PAGE_SHIFT))
+ break;
}
}
# endif
Modified: branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h 2006-12-30 02:=
46:07 UTC (rev 6457)
+++ branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h 2006-12-30 04:=
06:15 UTC (rev 6458)
@@ -65,7 +65,7 @@
page size might vary between 32-bit and 64-bit ppc kernels */
extern unsigned long VKI_PAGE_SHIFT, VKI_PAGE_SIZE;
#define VKI_MAX_PAGE_SHIFT 16
-#define VKI_MAX_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SIZE (1UL << VKI_MAX_PAGE_SHIFT)
=20
//----------------------------------------------------------------------
// From linux-2.6.9/include/asm-ppc/signal.h
Modified: branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h 2006-12-30 02:=
46:07 UTC (rev 6457)
+++ branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h 2006-12-30 04:=
06:15 UTC (rev 6458)
@@ -66,7 +66,7 @@
page size might vary between 32-bit and 64-bit ppc kernels */
extern unsigned long VKI_PAGE_SHIFT, VKI_PAGE_SIZE;
#define VKI_MAX_PAGE_SHIFT 16
-#define VKI_MAX_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SIZE (1UL << VKI_MAX_PAGE_SHIFT)
=20
//----------------------------------------------------------------------
// From linux-2.6.13/include/asm-ppc64/signal.h
|
|
From: Tom H. <to...@co...> - 2006-12-30 03:58:21
|
Nightly build on dunsmere ( athlon, Fedora Core 6 ) started at 2006-12-30 03:30:08 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 252 tests, 5 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2006-12-30 03:24:33
|
Nightly build on dellow ( x86_64, Fedora Core 6 ) started at 2006-12-30 03:10:05 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 281 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 281 tests, 4 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Dec 30 03:17:17 2006 --- new.short Sat Dec 30 03:24:20 2006 *************** *** 8,10 **** ! == 281 tests, 4 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 281 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) *************** *** 14,15 **** --- 14,16 ---- none/tests/mremap2 (stdout) + none/tests/pth_detached (stdout) |
|
From: <sv...@va...> - 2006-12-30 02:46:13
|
Author: sewardj
Date: 2006-12-30 02:46:07 +0000 (Sat, 30 Dec 2006)
New Revision: 6457
Log:
Support 64k pages on ppc32/64-linux (Jakub Jelink, Dave Nomura)
Modified:
branches/VALGRIND_3_2_BRANCH/coregrind/m_aspacemgr/aspacemgr.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_replacemalloc/vg_replace_mall=
oc.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc32-linux.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc64-linux.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-x86-linux.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_ume.c
branches/VALGRIND_3_2_BRANCH/coregrind/pub_core_aspacemgr.h
branches/VALGRIND_3_2_BRANCH/include/vki-amd64-linux.h
branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h
branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h
branches/VALGRIND_3_2_BRANCH/include/vki-x86-linux.h
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_aspacemgr/aspacemgr.c 2006-1=
2-28 20:26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_aspacemgr/aspacemgr.c 2006-1=
2-30 02:46:07 UTC (rev 6457)
@@ -443,8 +443,9 @@
SysRes res;
aspacem_assert(VG_IS_PAGE_ALIGNED(offset));
# if defined(VGP_x86_linux) || defined(VGP_ppc32_linux)
+ /* mmap2 uses 4096 chunks even if actual page size is bigger. */
res =3D VG_(do_syscall6)(__NR_mmap2, (UWord)start, length,
- prot, flags, fd, offset / VKI_PAGE_SIZE);
+ prot, flags, fd, offset / 4096);
# elif defined(VGP_amd64_linux) || defined(VGP_ppc64_linux)
res =3D VG_(do_syscall6)(__NR_mmap, (UWord)start, length,=20
prot, flags, fd, offset);
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c 2006-12-28 20:26:08 U=
TC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_main.c 2006-12-30 02:46:07 U=
TC (rev 6457)
@@ -1672,6 +1672,11 @@
LibVEX_ppVexArch ( vex_arch ),
LibVEX_ppVexHwCaps ( vex_arch, vex_archinfo.hwcaps )
);
+ VG_(message)(
+ Vg_DebugMsg,=20
+ "Page sizes: currently %d, max supported %d\n",=20
+ (Int)VKI_PAGE_SIZE, (Int)VKI_MAX_PAGE_SIZE
+ );
VG_(message)(Vg_DebugMsg, "Valgrind library directory: %s", VG_(li=
bdir));
}
}
@@ -2033,6 +2038,9 @@
// p: logging, plausible-stack
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Starting the address space manager\n");
+ vg_assert(VKI_PAGE_SIZE =3D=3D 4096 || VKI_PAGE_SIZE =3D=3D 6=
5536);
+ vg_assert(VKI_MAX_PAGE_SIZE =3D=3D 4096 || VKI_MAX_PAGE_SIZE =3D=3D 6=
5536);
+ vg_assert(VKI_PAGE_SIZE <=3D VKI_MAX_PAGE_SIZE);
clstack_top =3D VG_(am_startup)( sp_at_startup );
VG_(debugLog)(1, "main", "Address space manager is running\n");
=20
@@ -2956,6 +2964,11 @@
#error "_start: needs implementation on this platform"
#endif
=20
+#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+unsigned long VKI_PAGE_SHIFT =3D 12;
+unsigned long VKI_PAGE_SIZE =3D (1UL << 12);
+#endif
+
/* Avoid compiler warnings: this fn _is_ used, but labelling it
'static' causes gcc to complain it isn't. */
void _start_in_C ( UWord* pArgc );
@@ -2966,6 +2979,24 @@
HChar** argv =3D (HChar**)&pArgc[1];
HChar** envp =3D (HChar**)&pArgc[1+argc+1];
sp_at_startup =3D (Addr)pArgc;
+
+# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+ {
+ UWord *sp =3D &pArgc[1+argc+1];
+ /* ppc/ppc64 can be configured with different page sizes.
+ Determine this early. */
+ while (*sp++ !=3D 0);
+ for (; *sp !=3D AT_NULL && *sp !=3D AT_PAGESZ; sp +=3D 2);
+ if (*sp =3D=3D AT_PAGESZ) {
+ VKI_PAGE_SIZE =3D sp[1];
+ for (VKI_PAGE_SHIFT =3D 12;
+ VKI_PAGE_SHIFT <=3D VKI_MAX_PAGE_SHIFT; VKI_PAGE_SHIFT++)
+ if (VKI_PAGE_SIZE =3D=3D (1UL << VKI_PAGE_SHIFT))
+ break;
+ }
+ }
+# endif
+
r =3D main( (Int)argc, argv, envp );
VG_(exit)(r);
}
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_replacemalloc/vg_repla=
ce_malloc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_replacemalloc/vg_replace_mal=
loc.c 2006-12-28 20:26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_replacemalloc/vg_replace_mal=
loc.c 2006-12-30 02:46:07 UTC (rev 6457)
@@ -337,7 +337,11 @@
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( SizeT size ); \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( SizeT size ) \
{ \
- return VG_REPLACE_FUNCTION_ZU(libcZdsoZa,memalign)(VKI_PAGE_SIZE, =
size); \
+ static int pszB =3D 0; \
+ extern int getpagesize (void); \
+ if (pszB =3D=3D 0) \
+ pszB =3D getpagesize(); \
+ return VG_REPLACE_FUNCTION_ZU(libcZdsoZa,memalign)((SizeT)pszB, si=
ze); \
}
=20
VALLOC(m_libc_dot_so_star, valloc);
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc32-=
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
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc32-linux.=
c 2006-12-28 20:26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc32-linux.=
c 2006-12-30 02:46:07 UTC (rev 6457)
@@ -673,7 +673,7 @@
SysRes r;
=20
// Exactly like old_mmap() except:
- // - the file offset is specified in pagesize units rather than byte=
s,
+ // - the file offset is specified in 4K units rather than bytes,
// so that it can be used for files bigger than 2^32 bytes.
PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
@@ -683,7 +683,7 @@
unsigned long, fd, unsigned long, offset);
=20
r =3D ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5,=20
- VKI_PAGE_SIZE * (Off64T)ARG6 );
+ 4096 * (Off64T)ARG6 );
SET_STATUS_from_SysRes(r);
}
=20
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc64-=
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
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc64-linux.=
c 2006-12-28 20:26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-ppc64-linux.=
c 2006-12-30 02:46:07 UTC (rev 6457)
@@ -701,7 +701,7 @@
//zz SysRes r;
//zz=20
//zz // Exactly like old_mmap() except:
-//zz // - the file offset is specified in pagesize units rather than=
bytes,
+//zz // - the file offset is specified in 4K units rather than bytes=
,
//zz // so that it can be used for files bigger than 2^32 bytes.
//zz PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
//zz ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
@@ -711,7 +711,7 @@
//zz unsigned long, fd, unsigned long, offset);
//zz=20
//zz r =3D ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, AR=
G5,=20
-//zz VKI_PAGE_SIZE * (Off64T)ARG6=
);
+//zz 4096 * (Off64T)ARG6 );
//zz SET_STATUS_from_SysRes(r);
//zz }
//zz=20
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-x86-li=
nux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-x86-linux.c =
2006-12-28 20:26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_syswrap/syswrap-x86-linux.c =
2006-12-30 02:46:07 UTC (rev 6457)
@@ -1300,6 +1300,9 @@
// - all 6 args are passed in regs, rather than in a memory-block.
// - the file offset is specified in pagesize units rather than byte=
s,
// so that it can be used for files bigger than 2^32 bytes.
+ // pagesize or 4K-size units in offset? For ppc32/64-linux, this is
+ // 4K-sized. Assert that the page size is 4K here for safety.
+ vg_assert(VKI_PAGE_SIZE =3D=3D 4096);
PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )",
ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap2",
@@ -1308,7 +1311,7 @@
unsigned long, fd, unsigned long, offset);
=20
r =3D ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5,=20
- VKI_PAGE_SIZE * (Off64T)ARG6 );
+ 4096 * (Off64T)ARG6 );
SET_STATUS_from_SysRes(r);
}
=20
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_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
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_ume.c 2006-12-28 20:26:08 UT=
C (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_ume.c 2006-12-30 02:46:07 UT=
C (rev 6457)
@@ -553,7 +553,7 @@
/* returns: 0 =3D success, non-0 is failure */
static Int load_script(Int fd, const HChar* name, ExeInfo* info)
{
- Char hdr[VKI_PAGE_SIZE];
+ Char hdr[VKI_MAX_PAGE_SIZE];
Int len =3D VKI_PAGE_SIZE;
Int eol;
Char* interp;
@@ -628,7 +628,7 @@
{
Int fd, ret;
SysRes res;
- Char buf[VKI_PAGE_SIZE];
+ Char buf[VKI_MAX_PAGE_SIZE];
SizeT bufsz =3D VKI_PAGE_SIZE, fsz;
=20
// Check it's readable
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/pub_core_aspacemgr.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/pub_core_aspacemgr.h 2006-12-2=
8 20:26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/pub_core_aspacemgr.h 2006-12-3=
0 02:46:07 UTC (rev 6457)
@@ -293,8 +293,13 @@
// stacks. The address space manager provides and suitably
// protects such stacks.
=20
-#define VG_STACK_GUARD_SZB 8192 // 2 pages
-#define VG_STACK_ACTIVE_SZB 65536 // 16 pages
+#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+# define VG_STACK_GUARD_SZB 65536 // 1 .. 16 pages
+# define VG_STACK_ACTIVE_SZB 131072 // 2 .. 32 pages
+#else
+# define VG_STACK_GUARD_SZB 8192 // 2 pages
+# define VG_STACK_ACTIVE_SZB 65536 // 16 pages
+#endif
=20
typedef
struct {
Modified: branches/VALGRIND_3_2_BRANCH/include/vki-amd64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/include/vki-amd64-linux.h 2006-12-28 20:=
26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/include/vki-amd64-linux.h 2006-12-30 02:=
46:07 UTC (rev 6457)
@@ -59,6 +59,8 @@
=20
#define VKI_PAGE_SHIFT 12
#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
=20
//----------------------------------------------------------------------
// From linux-2.6.9/include/asm-x86_64/signal.h
Modified: branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h 2006-12-28 20:=
26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/include/vki-ppc32-linux.h 2006-12-30 02:=
46:07 UTC (rev 6457)
@@ -61,9 +61,11 @@
// From linux-2.6.9/include/asm-ppc/page.h
//----------------------------------------------------------------------
=20
-/* PAGE_SHIFT determines the page size */
-#define VKI_PAGE_SHIFT 12
-#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+/* PAGE_SHIFT determines the page size, unfortunately
+ page size might vary between 32-bit and 64-bit ppc kernels */
+extern unsigned long VKI_PAGE_SHIFT, VKI_PAGE_SIZE;
+#define VKI_MAX_PAGE_SHIFT 16
+#define VKI_MAX_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
=20
//----------------------------------------------------------------------
// From linux-2.6.9/include/asm-ppc/signal.h
Modified: branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h 2006-12-28 20:=
26:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/include/vki-ppc64-linux.h 2006-12-30 02:=
46:07 UTC (rev 6457)
@@ -62,9 +62,11 @@
// From linux-2.6.13/include/asm-ppc64/page.h
//----------------------------------------------------------------------
=20
-/* PAGE_SHIFT determines the page size */
-#define VKI_PAGE_SHIFT 12
-#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+/* PAGE_SHIFT determines the page size, unfortunately
+ page size might vary between 32-bit and 64-bit ppc kernels */
+extern unsigned long VKI_PAGE_SHIFT, VKI_PAGE_SIZE;
+#define VKI_MAX_PAGE_SHIFT 16
+#define VKI_MAX_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
=20
//----------------------------------------------------------------------
// From linux-2.6.13/include/asm-ppc64/signal.h
Modified: branches/VALGRIND_3_2_BRANCH/include/vki-x86-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/include/vki-x86-linux.h 2006-12-28 20:26=
:08 UTC (rev 6456)
+++ branches/VALGRIND_3_2_BRANCH/include/vki-x86-linux.h 2006-12-30 02:46=
:07 UTC (rev 6457)
@@ -60,6 +60,8 @@
/* PAGE_SHIFT determines the page size */
#define VKI_PAGE_SHIFT 12
#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
=20
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/asm-i386/signal.h
|
|
From: <js...@ac...> - 2006-12-30 01:16:21
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2006-12-30 02:00:01 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 223 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Josef W. <Jos...@gm...> - 2006-12-29 20:12:18
|
On Friday 29 December 2006 10:45, Bart Van Assche wrote: > ==22662== load 0x8049880 size 4 thread 1 > ==22662== at 0x400A613: _dl_relocate_object (in /lib/ld-2.4.so) > ==22662== by 0x4004777: dl_main (in /lib/ld-2.4.so) > ==22662== by 0x40131CA: _dl_sysdep_start (in /lib/ld-2.4.so) > ==22662== by 0x40011F3: _dl_start (in /lib/ld-2.4.so) > ==22662== by 0x4000846: (within /lib/ld-2.4.so) > ==22662== store 0x8049880 size 4 thread 1 > ==22662== at 0x400A613: _dl_relocate_object (in /lib/ld-2.4.so) > ==22662== by 0x4004777: dl_main (in /lib/ld-2.4.so) > ==22662== by 0x40131CA: _dl_sysdep_start (in /lib/ld-2.4.so) > ==22662== by 0x40011F3: _dl_start (in /lib/ld-2.4.so) > ==22662== by 0x4000846: (within /lib/ld-2.4.so) > ==22662== load 0x8049880 size 4 thread 2 > ==22662== at 0x80484B8: (within > /home/bart/software/valgrind-svn/drd/tests/new_delete) > ==22662== by 0x4022E2C: vg_thread_wrapper (drd_preloaded.c:133) > ==22662== by 0x404434A: start_thread (in /lib/libpthread-2.4.so) > ==22662== by 0x421C65D: clone (in /lib/libc-2.4.so) > ==22662== store 0x8049880 size 4 thread 2 > ==22662== at 0x400D274: _dl_fixup (in /lib/ld-2.4.so) > ==22662== by 0x401262F: _dl_runtime_resolve (in /lib/ld-2.4.so) > ==22662== by 0x4022E2C: vg_thread_wrapper (drd_preloaded.c:133) > ==22662== by 0x404434A: start_thread (in /lib/libpthread-2.4.so) > ==22662== by 0x421C65D: clone (in /lib/libc-2.4.so) Why is this a race at all? The accesses in thread 1 are before main() is called, and only there is the 2nd thread created, which does the other accesses. Josef |
|
From: Julian S. <js...@ac...> - 2006-12-29 19:24:14
|
> The proposal sounds very nice. But I should have told you that I have an > alternative available, namely allocating a new DrdThreadId each time a new > ThreadId is passed by Valgrind to the drd tool. If the ThreadId of the > creator thread is not yet available at the time the ThreadId of the created > thread is passed for the first time to the drd tool, I will have to > initialize the per-thread data in the drd tool in two steps anyway. That works I guess, but I would prefer to fix the core properly. I'll try to come up with a refined proposal for a state machine and post it. J |
|
From: Julian S. <js...@ac...> - 2006-12-29 19:21:25
|
On Friday 29 December 2006 09:45, Bart Van Assche wrote:
> Does anyone know where I can find comprehensive documentation of how ELF
> shared library symbols are resolved at runtime ? When running drd on C++
> programs drd reports data races on calls to a.o. 'operator new(unsigned)'
> (_Znwj) and 'operator delete(void*)' (_ZdlPv). After having traced all
> accesses to the memory location on which the data race occurred
> (0x08049874), it turned out that the race is caused by the dynamic loader.
> I don't think I can suppress this race using Valgrind's suppression
> mechanism because the race is reported before the _dl* function names
> appear in the call stack.
You can't even really assume that you will ever get the _dl* function names;
some distros are very aggressive in stripping every possible name out of
ld.so and glibc.so for that matter.
One way out of this is to use sonames (shared object "names") in the
suppressions, rather than function names. It's crude but it works.
Here's an example:
{
Fedora-Core-5-hack2a
Memcheck:Cond
obj:/lib*/ld-2.4*so
obj:/lib*/ld-2.4*so
obj:/lib*/ld-2.4*so
obj:/lib*/ld-2.4*so
}
All .so's should have a soname, but it isn't the file name. To find the
soname for "foo.so" do readelf -a foo.so | grep soname.
Sounds like you have done considerable work since the 13 Dec drd snapshot?
Will you make a new patch soon?
J
|
|
From: Julian S. <js...@ac...> - 2006-12-29 19:11:14
|
On Friday 29 December 2006 08:08, Bart Van Assche wrote: > In the tool I'm writing (drd) I have to know in which direction the stack > grows. Is it safe to assume that the stack grows downward ? Yes. Certainly the address space management stuff to do with the stack will collapse spectacularly if the stack grows up, so I wouldn't worry about it. We could add a configure time check, if you want. > Are there > intentions to port Valgrind to systems where the stack grows upward ? No. J |
|
From: Bart V. A. <bar...@gm...> - 2006-12-29 17:46:07
|
On 12/28/06, Julian Seward <js...@ac...> wrote: > > > Well, you certainly ask some difficult questions :-) I'm not > complaining though. This and the previous problem with > VG_TRACK(thread_run) has happened because the thread-events aspects > of the core-tool interface has not been looked at in such detail > before. > > It seems to me that thread creation in V is not an atomic event, > and so we really need to split VG_TRACK(post_thread_create) into > two events: one to indicate V's intention to attempt creation of > a new thread, and one to indicate success. Possibly with names > > threadid_active ( ThreadId ) > post_thread_create ( ThreadId, ThreadId ) > > The new event, threadid_active is sent by the core right at the > start of a thread creation attempt. It tells the tool that the > specified ThreadId is now in use and that it can now expect to hear > of other events using that ThreadId. > > post_thread_create remains unchanged: as at present, it notifies the > tool that a thread has been successfully created. > > To make this completely general, perhaps we should also add > > threadid_inactive ( ThreadId ) > > which tells the tool that the given ThreadId is now inactive and > any further mention of it (except for threadid_active) is an error > in the core-tool protocol. > > ------- > > It further seems to me that this is complex enough that we should > use a state machine to specify the allowable sequences of thread > notification events in the core-tool interface. Roughly this would > be (note: this confuses 'events' with 'states') > > threadid_active -> post_thread_create // if successful > threadid_active -> threadid_inactive // if failed > > post_thread_create -> start_client_code // now running > > start_client_code -> stop_client_code // stopping > stop_client_code -> start_client_code // running again > > stop_client_code -> thread_join > > thread_join -> threadid_inactive > > > How does all that sound to you? > > J > The proposal sounds very nice. But I should have told you that I have an alternative available, namely allocating a new DrdThreadId each time a new ThreadId is passed by Valgrind to the drd tool. If the ThreadId of the creator thread is not yet available at the time the ThreadId of the created thread is passed for the first time to the drd tool, I will have to initialize the per-thread data in the drd tool in two steps anyway. Bart. |
|
From: John R.
|
Bart Van Assche wrote: > In the tool I'm writing (drd) I have to know in which direction the stack > grows. Is it safe to assume that the stack grows downward ? Are there > intentions to port Valgrind to systems where the stack grows upward ? HP Precision Architecture (PA-RISC) comes to mind as an example where the stack grows towards increasing addresses. On any machine with a "physical" stack, it is simple for C code to discover the direction of growth by comparing addresses of automatic scalar local variables in calling<==>called subroutines. I'd be more concerned by situations that replace "stack frames" with general activation records allocated from a heap. This can be particularly attractive for interpreted languages, or for mixed compiled<->interpreted systems. Such systems often encourage multi-threaded computation, so races become more likely. -- |
|
From: John R.
|
Bart Van Assche wrote: > Does anyone know where I can find comprehensive documentation of how ELF > shared library symbols are resolved at runtime ? The source code to glibc may well be the only place that is detailed enough to answer questions that are necessary to resolve issues regarding races. The ELF section of http://people.redhat.com/drepper/ points to some papers that may help. When running drd on C++ > programs drd reports data races on calls to a.o. 'operator new(unsigned)' > (_Znwj) and 'operator delete(void*)' (_ZdlPv). After having traced all > accesses to the memory location on which the data race occurred > (0x08049874), it turned out that the race is caused by the dynamic > loader. In some of my own code dynamic linking code I have knowingly allowed controlled races between processors [threads], and between instruction and data caches of the same processor. The end result is the same (a value in memory changes only from A to B); the race affects only the time required by any one thread and the propagation delay of visibility by other threads. Threads which "lose" the race also store the same value B into the location which originally contained A. The number of races is limited to the product of the number of processors [threads] and the number of symbol resolutions. In each case the time penalty due to the race is bounded [loop-free code], the "window of opportunity" is bounded by system context switching, and the probability of anything other than the fastest outcome is not large. By contrast, the penalty in time and space and complexity for a race-free algorithm [any mutual exclusion at all] is large. dlclose() might interfere, but only because the same logical race is already present independent of the algorithm used for symbol resolution. Calling dlclose() while any other thread could begin a dynamic resolution [that might be affected by the dlclose()] is itself a [logical] race. -- |
|
From: Bart V. A. <bar...@gm...> - 2006-12-29 09:45:41
|
Does anyone know where I can find comprehensive documentation of how ELF
shared library symbols are resolved at runtime ? When running drd on C++
programs drd reports data races on calls to a.o. 'operator new(unsigned)'
(_Znwj) and 'operator delete(void*)' (_ZdlPv). After having traced all
accesses to the memory location on which the data race occurred
(0x08049874), it turned out that the race is caused by the dynamic loader. I
don't think I can suppress this race using Valgrind's suppression mechanism
because the race is reported before the _dl* function names appear in the
call stack. If I understand more about dynamic loading, maybe I can find out
the address of the conflicting location before the _dl* functions are
called.
Bart.
$ cat new_delete.cpp
#include <pthread.h>
void* thread_func(void*)
{
delete new int;
return 0;
}
int main(int argc, char** argv)
{
pthread_t tid;
pthread_create(&tid, 0, thread_func, 0);
delete new int;
pthread_join(tid, 0);
return 0;
}
$ VALGRIND_LIB=.in_place coregrind/valgrind --suppressions=drd/default.supp
--tool=drd --trace-address=134518912 drd/tests/new_delete
==22662== drd, a data race detector.
==22662== Copyright (C) 2006, and GNU GPL'd, by Bart Van Assche.
THIS SOFTWARE IS A PROTOTYPE, AND IS NOT YET RELEASED
==22662== Using LibVEX rev 1680, a library for dynamic binary translation.
==22662== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==22662== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation
framework.
==22662== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==22662== For more details, rerun with: -v
==22662==
==22662== load 0x8049880 size 4 thread 1
==22662== at 0x400A613: _dl_relocate_object (in /lib/ld-2.4.so)
==22662== by 0x4004777: dl_main (in /lib/ld-2.4.so)
==22662== by 0x40131CA: _dl_sysdep_start (in /lib/ld-2.4.so)
==22662== by 0x40011F3: _dl_start (in /lib/ld-2.4.so)
==22662== by 0x4000846: (within /lib/ld-2.4.so)
==22662== store 0x8049880 size 4 thread 1
==22662== at 0x400A613: _dl_relocate_object (in /lib/ld-2.4.so)
==22662== by 0x4004777: dl_main (in /lib/ld-2.4.so)
==22662== by 0x40131CA: _dl_sysdep_start (in /lib/ld-2.4.so)
==22662== by 0x40011F3: _dl_start (in /lib/ld-2.4.so)
==22662== by 0x4000846: (within /lib/ld-2.4.so)
==22662== load 0x8049880 size 4 thread 2
==22662== at 0x80484B8: (within
/home/bart/software/valgrind-svn/drd/tests/new_delete)
==22662== by 0x4022E2C: vg_thread_wrapper (drd_preloaded.c:133)
==22662== by 0x404434A: start_thread (in /lib/libpthread-2.4.so)
==22662== by 0x421C65D: clone (in /lib/libc-2.4.so)
==22662== store 0x8049880 size 4 thread 2
==22662== at 0x400D274: _dl_fixup (in /lib/ld-2.4.so)
==22662== by 0x401262F: _dl_runtime_resolve (in /lib/ld-2.4.so)
==22662== by 0x4022E2C: vg_thread_wrapper (drd_preloaded.c:133)
==22662== by 0x404434A: start_thread (in /lib/libpthread-2.4.so)
==22662== by 0x421C65D: clone (in /lib/libc-2.4.so)
==22662== Conflicting load by thread 1 at 0x08049874 size 4
==22662== at 0x8048488: (within
/home/bart/software/valgrind-svn/drd/tests/new_delete)
==22662== by 0x417487B: (below main) (in /lib/libc-2.4.so)
==22662== Allocation context: drd/tests/new_delete, NONE:Data
==22662== Other segment start (thread 2)
==22662== (thread finished, call stack no longer available)
==22662== Other segment end (thread 2)
==22662== (thread finished, call stack no longer available)
==22662== load 0x8049880 size 4 thread 1
==22662== at 0x80484B8: (within
/home/bart/software/valgrind-svn/drd/tests/new_delete)
==22662== by 0x417487B: (below main) (in /lib/libc-2.4.so)
==22662==
==22662== Conflicting load by thread 1 at 0x08049880 size 4
==22662== at 0x80484B8: (within
/home/bart/software/valgrind-svn/drd/tests/new_delete)
==22662== by 0x417487B: (below main) (in /lib/libc-2.4.so)
==22662== Allocation context: drd/tests/new_delete, NONE:Data
==22662== Other segment start (thread 2)
==22662== (thread finished, call stack no longer available)
==22662== Other segment end (thread 2)
==22662== (thread finished, call stack no longer available)
==22662==
==22662== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 6 from 3)
|
|
From: Bart V. A. <bar...@gm...> - 2006-12-29 08:08:24
|
In the tool I'm writing (drd) I have to know in which direction the stack grows. Is it safe to assume that the stack grows downward ? Are there intentions to port Valgrind to systems where the stack grows upward ? Bart. |
|
From: <js...@ac...> - 2006-12-29 05:55:53
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-12-29 09:00:01 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 217 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <sv...@va...> - 2006-12-29 05:06:56
|
Author: sewardj
Date: 2006-12-29 05:06:51 +0000 (Fri, 29 Dec 2006)
New Revision: 1715
Log:
Sync x86/amd64 flag helpers with the trunk.
Modified:
branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c
branches/VEX_3_2_BRANCH/priv/guest-x86/ghelpers.c
Modified: branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c 2006-12-29 01:54:=
36 UTC (rev 1714)
+++ branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c 2006-12-29 05:06:=
51 UTC (rev 1715)
@@ -904,7 +904,6 @@
return unop(Iop_1Uto64,
binop(Iop_CmpEQ64,cc_dep1,cc_dep2));
}
-
if (isU64(cc_op, AMD64G_CC_OP_SUBQ) && isU64(cond, AMD64CondNZ)) {
/* long long sub/cmp, then NZ --> test dst!=3Dsrc */
return unop(Iop_1Uto64,
@@ -924,7 +923,6 @@
return unop(Iop_1Uto64,
binop(Iop_CmpLT64U, cc_dep1, cc_dep2));
}
-
if (isU64(cc_op, AMD64G_CC_OP_SUBQ) && isU64(cond, AMD64CondNB)) {
/* long long sub/cmp, then NB (unsigned greater than or equal)
--> test src <=3Du dst */
@@ -949,7 +947,6 @@
binop(Iop_Shl64,cc_dep1,mkU8(32)),
binop(Iop_Shl64,cc_dep2,mkU8(32))));
}
-
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondNZ)) {
/* long sub/cmp, then NZ --> test dst!=3Dsrc */
return unop(Iop_1Uto64,
@@ -985,7 +982,6 @@
binop(Iop_Shl64,cc_dep1,mkU8(32)),
binop(Iop_Shl64,cc_dep2,mkU8(32))));
}
-
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondNBE)) =
{
/* long sub/cmp, then NBE (unsigned greater than)
--> test src <u dst */
@@ -1025,7 +1021,6 @@
unop(Iop_64to8,cc_dep1),
unop(Iop_64to8,cc_dep2)));
}
-
if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondNZ)) {
/* byte sub/cmp, then NZ --> test dst!=3Dsrc */
return unop(Iop_1Uto64,
@@ -1049,25 +1044,6 @@
mkU64(1));
}
=20
-// if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondNZ))=
{
-// /* byte sub/cmp, then NZ --> test dst!=3Dsrc */
-// return unop(Iop_32Uto64,
-// unop(Iop_1Uto32,
-// binop(Iop_CmpNE8,=20
-// unop(Iop_32to8,unop(Iop_64to32,cc_dep1)),
-// unop(Iop_32to8,unop(Iop_64to32,cc_dep2)))))=
;
-// }
-
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBB) && isU32(cond, X86CondNBE=
)) {
-//.. /* long sub/cmp, then NBE (unsigned greater than)
-//.. --> test src <u dst */
-//.. /* Note, args are opposite way round from the usual */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpLT32U,=20
-//.. binop(Iop_And32,cc_dep2,mkU32(0xFF)),
-//.. binop(Iop_And32,cc_dep1,mkU32(0xFF))));
-//.. }
-
/*---------------- LOGICQ ----------------*/
=20
if (isU64(cc_op, AMD64G_CC_OP_LOGICQ) && isU64(cond, AMD64CondZ)) =
{
@@ -1107,11 +1083,6 @@
mkU64(0)));
}
=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondS=
)) {
-//.. /* long and/or/xor, then S --> test dst <s 0 */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpLT32S, cc_dep1, mkU32(=
0)));
-//.. }
-
if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondLE))=
{
/* long and/or/xor, then LE
This is pretty subtle. LOGIC sets SF and ZF according to th=
e
@@ -1125,24 +1096,6 @@
mkU64(0)));
}
=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondB=
E)) {
-//.. /* long and/or/xor, then BE
-//.. LOGIC sets ZF according to the result and makes CF be z=
ero.
-//.. BE computes (CF | ZF), but CF is zero, so this reduces =
ZF=20
-//.. -- which will be 1 iff the result is zero. Hence ...
-//.. */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpEQ32, cc_dep1, mkU32(0=
)));
-//.. }
-//..=20
-//.. /*---------------- LOGICW ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICW) && isU32(cond, X86CondZ=
)) {
-//.. /* byte and/or/xor, then Z --> test dst=3D=3D0 */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpEQ32, binop(Iop_And32,cc_dep1,mkU=
32(0xFFFF)),=20
-//.. mkU32(0)));
-//.. }
-
/*---------------- LOGICB ----------------*/
=20
if (isU64(cc_op, AMD64G_CC_OP_LOGICB) && isU64(cond, AMD64CondZ)) =
{
@@ -1175,6 +1128,16 @@
mkU64(0)));
}
=20
+ /*---------------- INCW ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_INCW) && isU64(cond, AMD64CondZ)) {
+ /* 16-bit inc, then Z --> test dst =3D=3D 0 */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpEQ64,=20
+ binop(Iop_Shl64,cc_dep1,mkU8(48)),=20
+ mkU64(0)));
+ }
+
/*---------------- DECL ----------------*/
=20
if (isU64(cc_op, AMD64G_CC_OP_DECL) && isU64(cond, AMD64CondZ)) {
@@ -1195,25 +1158,6 @@
mkU64(0)));
}
=20
-//.. /*---------------- DECL ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_DECL) && isU32(cond, X86CondZ))=
{
-//.. /* dec L, then Z --> test dst =3D=3D 0 */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpEQ32, cc_dep1, mkU32(0=
)));
-//.. }
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_DECL) && isU32(cond, X86CondS))=
{
-//.. /* dec L, then S --> compare DST <s 0 */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpLT32S, cc_dep1, mkU32(=
0)));
-//.. }
-//..=20
-//.. /*---------------- SHRL ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SHRL) && isU32(cond, X86CondZ))=
{
-//.. /* SHRL, then Z --> test dep1 =3D=3D 0 */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpEQ32, cc_dep1, mkU32(0=
)));
-//.. }
-
/*---------------- COPY ----------------*/
/* This can happen, as a result of amd64 FP compares: "comisd ... =
;
jbe" for example. */
@@ -1261,6 +1205,43 @@
);
}
=20
+ if (isU64(cc_op, AMD64G_CC_OP_COPY)=20
+ && (isU64(cond, AMD64CondZ) || isU64(cond, AMD64CondNZ))) {
+ /* COPY, then Z --> extract Z from dep1, and test (Z =3D=3D 1).=
*/
+ /* COPY, then NZ --> extract Z from dep1, and test (Z =3D=3D 0)=
. */
+ UInt nnn =3D isU64(cond, AMD64CondZ) ? 1 : 0;
+ return
+ unop(
+ Iop_1Uto64,
+ binop(
+ Iop_CmpEQ64,
+ binop(
+ Iop_And64,
+ binop(Iop_Shr64, cc_dep1, mkU8(AMD64G_CC_SHIFT_Z)),
+ mkU64(1)
+ ),
+ mkU64(nnn)
+ )
+ );
+ }
+
+ if (isU64(cc_op, AMD64G_CC_OP_COPY) && isU64(cond, AMD64CondP)) {
+ /* COPY, then P --> extract P from dep1, and test (P =3D=3D 1).=
*/
+ return
+ unop(
+ Iop_1Uto64,
+ binop(
+ Iop_CmpNE64,
+ binop(
+ Iop_And64,
+ binop(Iop_Shr64, cc_dep1, mkU8(AMD64G_CC_SHIFT_P)),
+ mkU64(1)
+ ),
+ mkU64(0)
+ )
+ );
+ }
+
return NULL;
}
=20
@@ -1308,48 +1289,16 @@
/* If the thunk is dec or inc, the cflag is supplied as CC_NDEP=
. */
return cc_ndep;
}
-//.. if (isU64(cc_op, AMD64G_CC_OP_COPY)) {
-//.. /* cflag after COPY is stored in DEP1. */
-//.. return
-//.. binop(
-//.. Iop_And64,
-//.. binop(Iop_Shr64, cc_dep1, mkU8(AMD64G_CC_SHIFT_C)),
-//.. mkU64(1)
-//.. );
-//.. }
-//.. # if 0
-//.. if (cc_op->tag =3D=3D Iex_Const) {
-//.. vex_printf("CFLAG "); ppIRExpr(cc_op); vex_printf("\n");
-//.. }
-//.. # endif
=20
+# if 0
+ if (cc_op->tag =3D=3D Iex_Const) {
+ vex_printf("CFLAG "); ppIRExpr(cc_op); vex_printf("\n");
+ }
+# endif
+
return NULL;
}
=20
-//.. /* --------- specialising "x86g_calculate_rflags_all" --------- =
*/
-//..=20
-//.. if (vex_streq(function_name, "x86g_calculate_rflags_all")) {
-//.. /* specialise calls to above "calculate_rflags_all" function =
*/
-//.. IRExpr *cc_op, *cc_dep1, *cc_dep2, *cc_ndep;
-//.. vassert(arity =3D=3D 4);
-//.. cc_op =3D args[0];
-//.. cc_dep1 =3D args[1];
-//.. cc_dep2 =3D args[2];
-//.. cc_ndep =3D args[3];
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_COPY)) {
-//.. /* eflags after COPY are stored in DEP1. */
-//.. return
-//.. binop(
-//.. Iop_And32,
-//.. cc_dep1,
-//.. mkU32(AMD64G_CC_MASK_O | AMD64G_CC_MASK_S | AMD64G_C=
C_MASK_Z=20
-//.. | AMD64G_CC_MASK_A | AMD64G_CC_MASK_C | AMD64G=
_CC_MASK_P)
-//.. );
-//.. }
-//.. return NULL;
-//.. }
-
# undef unop
# undef binop
# undef mkU64
Modified: branches/VEX_3_2_BRANCH/priv/guest-x86/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_2_BRANCH/priv/guest-x86/ghelpers.c 2006-12-29 01:54:36=
UTC (rev 1714)
+++ branches/VEX_3_2_BRANCH/priv/guest-x86/ghelpers.c 2006-12-29 05:06:51=
UTC (rev 1715)
@@ -832,7 +832,6 @@
return unop(Iop_1Uto32,
binop(Iop_CmpEQ32, cc_dep1, cc_dep2));
}
-
if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNZ)) {
/* long sub/cmp, then NZ --> test dst!=3Dsrc */
return unop(Iop_1Uto32,
@@ -845,6 +844,14 @@
return unop(Iop_1Uto32,
binop(Iop_CmpLT32S, cc_dep1, cc_dep2));
}
+ if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNL)) {
+ /* long sub/cmp, then NL (signed greater than or equal)=20
+ --> test !(dst <s src) */
+ return binop(Iop_Xor32,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLT32S, cc_dep1, cc_dep2)),
+ mkU32(1));
+ }
=20
if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondLE)) {
/* long sub/cmp, then LE (signed less than or equal)
@@ -852,9 +859,8 @@
return unop(Iop_1Uto32,
binop(Iop_CmpLE32S, cc_dep1, cc_dep2));
}
-
if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNLE)) {
- /* long sub/cmp, then LE (signed not less than or equal)
+ /* long sub/cmp, then NLE (signed not less than or equal)
--> test dst >s src=20
--> test !(dst <=3Ds src) */
return binop(Iop_Xor32,
@@ -869,6 +875,14 @@
return unop(Iop_1Uto32,
binop(Iop_CmpLE32U, cc_dep1, cc_dep2));
}
+ if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNBE)) {
+ /* long sub/cmp, then BE (unsigned greater than)
+ --> test !(dst <=3Du src) */
+ return binop(Iop_Xor32,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLE32U, cc_dep1, cc_dep2)),
+ mkU32(1));
+ }
=20
if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondB)) {
/* long sub/cmp, then B (unsigned less than)
@@ -876,14 +890,31 @@
return unop(Iop_1Uto32,
binop(Iop_CmpLT32U, cc_dep1, cc_dep2));
}
+ if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNB)) {
+ /* long sub/cmp, then NB (unsigned greater than or equal)
+ --> test !(dst <u src) */
+ return binop(Iop_Xor32,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLT32U, cc_dep1, cc_dep2)),
+ mkU32(1));
+ }
=20
if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondS)) {
- /* long sub/cmp, then S --> test (dst-src <s 0) */
+ /* long sub/cmp, then S (negative) --> test (dst-src <s 0) */
return unop(Iop_1Uto32,
binop(Iop_CmpLT32S,=20
binop(Iop_Sub32, cc_dep1, cc_dep2),
mkU32(0)));
}
+ if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNS)) {
+ /* long sub/cmp, then NS (not negative) --> test !(dst-src <s 0=
) */
+ return binop(Iop_Xor32,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLT32S,=20
+ binop(Iop_Sub32, cc_dep1, cc_dep2),
+ mkU32(0))),
+ mkU32(1));
+ }
=20
/*---------------- SUBW ----------------*/
=20
@@ -904,7 +935,6 @@
unop(Iop_32to8,cc_dep1),=20
unop(Iop_32to8,cc_dep2)));
}
-
if (isU32(cc_op, X86G_CC_OP_SUBB) && isU32(cond, X86CondNZ)) {
/* byte sub/cmp, then NZ --> test dst!=3Dsrc */
return unop(Iop_1Uto32,
@@ -944,7 +974,6 @@
/* long and/or/xor, then Z --> test dst=3D=3D0 */
return unop(Iop_1Uto32,binop(Iop_CmpEQ32, cc_dep1, mkU32(0)));
}
-
if (isU32(cc_op, X86G_CC_OP_LOGICL) && isU32(cond, X86CondNZ)) {
/* long and/or/xor, then NZ --> test dst!=3D0 */
return unop(Iop_1Uto32,binop(Iop_CmpNE32, cc_dep1, mkU32(0)));
@@ -1002,17 +1031,6 @@
binop(Iop_Shr32,cc_dep1,mkU8(15)),
mkU32(1));
}
- //Probably correct, but no test case for it yet found
- //if (isU32(cc_op, X86G_CC_OP_LOGICW) && isU32(cond, X86CondNS)) {
- // /* see comment below for (LOGICB, CondNS) */
- // /* word and/or/xor, then S --> (UInt) ~ result[15] */
- // vassert(0+0);
- // return binop(Iop_Xor32,
- // binop(Iop_And32,
- // binop(Iop_Shr32,cc_dep1,mkU8(15)),
- // mkU32(1)),
- // mkU32(1));
- //}
=20
/*---------------- LOGICB ----------------*/
=20
@@ -1022,7 +1040,6 @@
binop(Iop_CmpEQ32, binop(Iop_And32,cc_dep1,mkU32(25=
5)),=20
mkU32(0)));
}
-
if (isU32(cc_op, X86G_CC_OP_LOGICB) && isU32(cond, X86CondNZ)) {
/* byte and/or/xor, then Z --> test dst!=3D0 */
/* b9ac9: 84 c0 test %al,%al
@@ -1100,10 +1117,10 @@
=20
if (isU32(cc_op, X86G_CC_OP_COPY) &&=20
(isU32(cond, X86CondBE) || isU32(cond, X86CondNBE))) {
- /* COPY, then BE --> extract C and Z from dep1, and test (C
- or Z =3D=3D 1). */
- /* COPY, then NBE --> extract C and Z from dep1, and test (C
- or Z =3D=3D 0). */
+ /* COPY, then BE --> extract C and Z from dep1, and test=20
+ (C or Z) =3D=3D 1. */
+ /* COPY, then NBE --> extract C and Z from dep1, and test
+ (C or Z) =3D=3D 0. */
UInt nnn =3D isU32(cond, X86CondBE) ? 1 : 0;
return
unop(
@@ -1124,8 +1141,8 @@
);
}
=20
- if (isU32(cc_op, X86G_CC_OP_COPY) &&=20
- (isU32(cond, X86CondB) || isU32(cond, X86CondNB))) {
+ if (isU32(cc_op, X86G_CC_OP_COPY)=20
+ && (isU32(cond, X86CondB) || isU32(cond, X86CondNB))) {
/* COPY, then B --> extract C from dep1, and test (C =3D=3D 1).=
*/
/* COPY, then NB --> extract C from dep1, and test (C =3D=3D 0)=
. */
UInt nnn =3D isU32(cond, X86CondB) ? 1 : 0;
@@ -1144,36 +1161,42 @@
);
}
=20
- if (isU32(cc_op, X86G_CC_OP_COPY) && isU32(cond, X86CondZ)) {
+ if (isU32(cc_op, X86G_CC_OP_COPY)=20
+ && (isU32(cond, X86CondZ) || isU32(cond, X86CondNZ))) {
/* COPY, then Z --> extract Z from dep1, and test (Z =3D=3D 1).=
*/
+ /* COPY, then NZ --> extract Z from dep1, and test (Z =3D=3D 0)=
. */
+ UInt nnn =3D isU32(cond, X86CondZ) ? 1 : 0;
return
unop(
Iop_1Uto32,
binop(
- Iop_CmpNE32,
+ Iop_CmpEQ32,
binop(
Iop_And32,
binop(Iop_Shr32, cc_dep1, mkU8(X86G_CC_SHIFT_Z)),
mkU32(1)
),
- mkU32(0)
+ mkU32(nnn)
)
);
}
=20
- if (isU32(cc_op, X86G_CC_OP_COPY) && isU32(cond, X86CondP)) {
+ if (isU32(cc_op, X86G_CC_OP_COPY)=20
+ && (isU32(cond, X86CondP) || isU32(cond, X86CondNP))) {
/* COPY, then P --> extract P from dep1, and test (P =3D=3D 1).=
*/
+ /* COPY, then NP --> extract P from dep1, and test (P =3D=3D 0)=
. */
+ UInt nnn =3D isU32(cond, X86CondP) ? 1 : 0;
return
unop(
Iop_1Uto32,
binop(
- Iop_CmpNE32,
+ Iop_CmpEQ32,
binop(
Iop_And32,
binop(Iop_Shr32, cc_dep1, mkU8(X86G_CC_SHIFT_P)),
mkU32(1)
),
- mkU32(0)
+ mkU32(nnn)
)
);
}
@@ -1223,6 +1246,13 @@
mkU32(1)
);
}
+ if (isU32(cc_op, X86G_CC_OP_ADDL)) {
+ /* C after add denotes sum <u either arg */
+ return unop(Iop_1Uto32,
+ binop(Iop_CmpLT32U,=20
+ binop(Iop_Add32, cc_dep1, cc_dep2),=20
+ cc_dep1));
+ }
# if 0
if (cc_op->tag =3D=3D Iex_Const) {
vex_printf("CFLAG "); ppIRExpr(cc_op); vex_printf("\n");
|
|
From: <js...@ac...> - 2006-12-29 05:03:27
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-12-29 04:30:01 GMT 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 == 250 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <to...@co...> - 2006-12-29 03:54:06
|
Nightly build on dunsmere ( athlon, Fedora Core 6 ) started at 2006-12-29 03:30:06 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 252 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 252 tests, 5 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Dec 29 03:42:38 2006 --- new.short Fri Dec 29 03:54:00 2006 *************** *** 8,10 **** ! == 252 tests, 5 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 252 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,17 **** none/tests/mremap2 (stdout) - none/tests/pth_detached (stdout) --- 15,16 ---- |
|
From: Tom H. <th...@cy...> - 2006-12-29 03:24:16
|
Nightly build on dellow ( x86_64, Fedora Core 6 ) started at 2006-12-29 03:10:05 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 281 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) |