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
(15) |
2
(17) |
3
(23) |
4
(13) |
5
(7) |
6
(8) |
7
(9) |
|
8
(8) |
9
(31) |
10
(31) |
11
(19) |
12
(11) |
13
(38) |
14
(14) |
|
15
(8) |
16
(11) |
17
(7) |
18
(17) |
19
(12) |
20
(12) |
21
(17) |
|
22
(19) |
23
(33) |
24
(42) |
25
(37) |
26
(23) |
27
(27) |
28
(27) |
|
29
(16) |
30
(52) |
31
(33) |
|
|
|
|
|
From: Tom H. <th...@cy...> - 2004-08-23 23:19:05
|
CVS commit by thughes:
The size passed to VG_(st_mkfloat) should be in bytes, not bits.
M +5 -5 vg_stabs.c 1.14
--- valgrind/coregrind/vg_stabs.c #1.13:1.14
@@ -652,10 +652,10 @@ static SymType *stabtype_parser(SegInfo
case -10: type = VG_(st_mkint)(def, 4, False); break;
case -11: type = VG_(st_mkvoid)(def); break;
- case -12: type = VG_(st_mkfloat)(def, 32); break;
- case -13: type = VG_(st_mkfloat)(def, 64); break;
+ case -12: type = VG_(st_mkfloat)(def, 4); break;
+ case -13: type = VG_(st_mkfloat)(def, 8); break;
case -15: type = VG_(st_mkint)(def, 4, True); break;
case -16: type = VG_(st_mkbool)(def, 4); break;
- case -17: type = VG_(st_mkfloat)(def, 32); break;
- case -18: type = VG_(st_mkfloat)(def, 64); break;
+ case -17: type = VG_(st_mkfloat)(def, 4); break;
+ case -18: type = VG_(st_mkfloat)(def, 8); break;
case -20: type = VG_(st_mkint)(def, 1, False); break;
case -21: type = VG_(st_mkint)(def, 1, False); break;
@@ -695,5 +695,5 @@ static SymType *stabtype_parser(SegInfo
EXPECT(';', "FP-TYPE extra");
- type = VG_(st_mkfloat)(def, bytes * 8);
+ type = VG_(st_mkfloat)(def, bytes);
break;
}
|
|
From: Tom H. <th...@cy...> - 2004-08-23 22:29:43
|
CVS commit by thughes: Added code to decode a number of additional negative type numbers in STABS debug information based on the stabs specification at: http://sources.redhat.com/cygwin/stabs.html CCMAIL: 858...@bu... M +29 -2 vg_stabs.c 1.13 --- valgrind/coregrind/vg_stabs.c #1.12:1.13 @@ -641,5 +641,33 @@ static SymType *stabtype_parser(SegInfo n = atoi(&p, 0); switch(n) { - case -16: type = VG_(st_mkbool)(def, sizeof(int)); break; + case -1: type = VG_(st_mkint)(def, 4, True); break; + case -2: type = VG_(st_mkint)(def, 1, True); break; + case -3: type = VG_(st_mkint)(def, 2, True); break; + case -4: type = VG_(st_mkint)(def, 4, True); break; + case -5: type = VG_(st_mkint)(def, 1, False); break; + case -6: type = VG_(st_mkint)(def, 1, True); break; + case -7: type = VG_(st_mkint)(def, 2, False); break; + case -8: type = VG_(st_mkint)(def, 4, False); break; + case -9: type = VG_(st_mkint)(def, 4, False); break; + case -10: type = VG_(st_mkint)(def, 4, False); break; + case -11: type = VG_(st_mkvoid)(def); break; + case -12: type = VG_(st_mkfloat)(def, 32); break; + case -13: type = VG_(st_mkfloat)(def, 64); break; + case -15: type = VG_(st_mkint)(def, 4, True); break; + case -16: type = VG_(st_mkbool)(def, 4); break; + case -17: type = VG_(st_mkfloat)(def, 32); break; + case -18: type = VG_(st_mkfloat)(def, 64); break; + case -20: type = VG_(st_mkint)(def, 1, False); break; + case -21: type = VG_(st_mkint)(def, 1, False); break; + case -22: type = VG_(st_mkint)(def, 2, False); break; + case -23: type = VG_(st_mkint)(def, 4, False); break; + case -24: type = VG_(st_mkint)(def, 4, False); break; + case -27: type = VG_(st_mkint)(def, 1, True); break; + case -28: type = VG_(st_mkint)(def, 2, True); break; + case -29: type = VG_(st_mkint)(def, 4, True); break; + case -31: type = VG_(st_mkint)(def, 8, True); break; + case -32: type = VG_(st_mkint)(def, 8, False); break; + case -33: type = VG_(st_mkint)(def, 8, False); break; + case -34: type = VG_(st_mkint)(def, 8, True); break; default: @@ -648,5 +676,4 @@ static SymType *stabtype_parser(SegInfo break; } - EXPECT(';', "negative builtin type"); break; } |
|
From: Julian S. <js...@ac...> - 2004-08-23 21:55:42
|
> CPUID is probably a slightly different case, since we need to do special > things with it rather than just run a native CPUID instruction. But > there are other strange things which we'd probably just run as-is (erm, > like, um, something. All the BCD instructions, maybe?) Yes, I guess. Or SSE-vector-do-bizarre-arithmetic, of where there appear to be many such instructions :-( J |
|
From: Jeremy F. <je...@go...> - 2004-08-23 21:14:52
|
On Mon, 2004-08-23 at 10:22 +0100, Nicholas Nethercote wrote: > Just to clarify: my understanding is that for really weird instructions > that cannot be expressed explicitly in the IR (eg. CPUID) there is a > "opaque" IR expression which holds the raw bytes (which the code generator > can spit out, ie. copy-annotate), but which the tools get very little > info, eg. only the regs/mem inputs and outputs. (There might also be a > string attached "cpuid" so that an arch-specific tool could know about > CPUID if it really needed to.) I'm not sure how X-arch translation is > feasible in the face of such instructions, however. CPUID is probably a slightly different case, since we need to do special things with it rather than just run a native CPUID instruction. But there are other strange things which we'd probably just run as-is (erm, like, um, something. All the BCD instructions, maybe?) J |
|
From: Tom H. <th...@cy...> - 2004-08-23 18:39:22
|
CVS commit by thughes:
Prevent a memcpy of zero bytes from complaining if one or both of the
pointers given as arguments is uninitialised.
CCMAIL: 869...@bu...
M +4 -1 mac_replace_strmem.c 1.13
--- valgrind/memcheck/mac_replace_strmem.c #1.12:1.13
@@ -274,4 +274,7 @@ void* memcpy( void *dst, const void *src
register char *s;
+ if (len == 0)
+ return dst;
+
if (is_overlap(dst, src, len, len))
complain3("memcpy", dst, src, len);
|
|
From: Robert W. <rj...@du...> - 2004-08-23 18:15:38
|
> > If everyone is OK with this, I can commit it tomorrow or Tuesday. > > Please let me know. >=20 > I second this -- it's required to run 32-bit programs under Valgrind on=20 > x86-64. >=20 > But can you please add a comment when you commit explaining that it means= =20 > that VG_(valgrind_end) has a slightly different meaning to all the other=20 > VG_(*_end) vars -- ie. it names the last byte, whereas the others go one=20 > byte past the end. Done. Comment added to check-in notice and code. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: Robert W. <rj...@du...> - 2004-08-23 18:15:24
|
CVS commit by rjwalsh:
Add explanatory comment.
M +10 -0 vg_main.c 1.197
--- valgrind/coregrind/vg_main.c #1.196:1.197
@@ -109,4 +109,9 @@ Addr VG_(shadow_end);
Addr VG_(valgrind_base); /* valgrind's address range */
+
+// VG_(valgrind_end) has a slightly different meaning to all the other
+// VG_(*_end) vars -- ie. it names the last byte, whereas the others
+// go one byte past the end.
+
Addr VG_(valgrind_end);
@@ -433,4 +438,9 @@ static void layout_remaining_space(Addr
VG_(valgrind_base) = (addr_t)&kickstart_base;
+
+ // VG_(valgrind_end) has a slightly different meaning to all the other
+ // VG_(*_end) vars -- ie. it names the last byte, whereas the others
+ // go one byte past the end.
+
VG_(valgrind_end) = ROUNDUP(argc_addr, 0x10000) - 1; // stack
|
|
From: Robert W. <rj...@du...> - 2004-08-23 18:13:22
|
CVS commit by rjwalsh:
Fix to allow 32-bit Valgrind to run on AMD64 boxes. Note: this does
NOT allow Valgrind to work with 64-bit executables - only with 32-bit
executables on an AMD64 box.
VG_(valgrind_end) now has a slightly different meaning to all the other
VG_(*_end) vars -- ie. it names the last byte, whereas the others go
one byte past the end.
M +1 -1 vg_main.c 1.196
--- valgrind/coregrind/vg_main.c #1.195:1.196
@@ -433,5 +433,5 @@ static void layout_remaining_space(Addr
VG_(valgrind_base) = (addr_t)&kickstart_base;
- VG_(valgrind_end) = ROUNDUP(argc_addr, 0x10000); // stack
+ VG_(valgrind_end) = ROUNDUP(argc_addr, 0x10000) - 1; // stack
// This gives the client the largest possible address space while
|
|
From: Tom H. <th...@cy...> - 2004-08-23 18:06:31
|
CVS commit by thughes:
Don't version the sem_xxx symbols that have more than one version in
glibc - it doesn't matter for valgrind as we only have one version and
by not versioning them we work no matter what version is asked for.
CCMAIL: 862...@bu...
M +1 -1 vg_libpthread.vs 1.10
--- valgrind/coregrind/vg_libpthread.vs #1.9:1.10
@@ -101,5 +101,5 @@
# Semaphores.
- sem_destroy; sem_getvalue; sem_init; sem_post; sem_trywait; sem_wait;
+ #sem_destroy; sem_getvalue; sem_init; sem_post; sem_trywait; sem_wait;
__libc_current_sigrtmin; __libc_current_sigrtmax;
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 16:39:53
|
CVS commit by nethercote:
Here's a couple more I missed in the last commit.
M +2 -3 vg_syscalls.c 1.128
--- valgrind/coregrind/vg_syscalls.c #1.127:1.128
@@ -6149,6 +6149,5 @@ Bool VG_(pre_syscall) ( ThreadId tid )
} else {
/* run the syscall directly */
- tst->m_eax = VG_(do_syscall)(syscallno,
- arg1, arg2, arg3, arg4, arg5, arg6);
+ res = VG_(do_syscall)(syscallno, arg1, arg2, arg3, arg4, arg5, arg6);
syscall_done = True;
}
@@ -6239,5 +6238,5 @@ void VG_(post_syscall) ( ThreadId tid, B
restart_syscall(tid);
} else
- tst->m_eax = -VKI_EINTR;
+ res = -VKI_EINTR;
}
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 16:36:20
|
CVS commit by nethercote:
Use SYSNO and res, etc, instead of tst->m_eax in a few places to make things
less x86-specific.
M +21 -26 vg_syscalls.c 1.127
--- valgrind/coregrind/vg_syscalls.c #1.126:1.127
@@ -5768,13 +5768,4 @@ POST(mq_getsetattr)
}
-#undef SYSNO
-#undef res
-#undef arg1
-#undef arg2
-#undef arg3
-#undef arg4
-#undef arg5
-#undef arg6
-
struct sys_info {
UInt flags;
@@ -5788,5 +5779,5 @@ static void bad_before(ThreadId tid, Thr
{
VG_(message)
- (Vg_DebugMsg,"WARNING: unhandled syscall: %d", tst->m_eax);
+ (Vg_DebugMsg,"WARNING: unhandled syscall: %d", SYSNO);
if (VG_(clo_verbosity) > 1) {
ExeContext *ec = VG_(get_ExeContext)(tid);
@@ -5798,5 +5789,5 @@ static void bad_before(ThreadId tid, Thr
(Vg_DebugMsg,"Read the file README_MISSING_SYSCALL_OR_IOCTL.");
- tst->m_eax = -VKI_ENOSYS;
+ res = -VKI_ENOSYS;
}
@@ -6075,8 +6066,8 @@ Bool VG_(pre_syscall) ( ThreadId tid )
/* Convert vfork to fork, since we can't handle it otherwise. */
- if (tst->m_eax == __NR_vfork)
- tst->m_eax = __NR_fork;
+ if (SYSNO == __NR_vfork)
+ SYSNO = __NR_fork;
- syscallno = tst->m_eax;
+ syscallno = SYSNO;
if (tst->syscallno != -1)
@@ -6146,5 +6137,5 @@ Bool VG_(pre_syscall) ( ThreadId tid )
(sys->before)(tst->tid, tst);
- if ((Int)tst->m_eax <= 0) {
+ if ((Int)res <= 0) {
/* "before" decided the syscall wasn't viable, so don't do
anything - just pretend the syscall happened. */
@@ -6159,10 +6150,5 @@ Bool VG_(pre_syscall) ( ThreadId tid )
/* run the syscall directly */
tst->m_eax = VG_(do_syscall)(syscallno,
- tst->m_ebx,
- tst->m_ecx,
- tst->m_edx,
- tst->m_esi,
- tst->m_edi,
- tst->m_ebp);
+ arg1, arg2, arg3, arg4, arg5, arg6);
syscall_done = True;
}
@@ -6186,5 +6172,5 @@ static void restart_syscall(ThreadId tid
vg_assert(tst->syscallno != -1);
- tst->m_eax = tst->syscallno;
+ SYSNO = tst->syscallno;
tst->m_eip -= 2; /* sizeof(int $0x80) */
@@ -6220,5 +6206,5 @@ void VG_(post_syscall) ( ThreadId tid, B
/* Tell the tool about the syscall return value */
- SET_SYSCALL_RETVAL(tst->tid, tst->m_eax);
+ SET_SYSCALL_RETVAL(tst->tid, res);
syscallno = tst->syscallno;
@@ -6237,5 +6223,5 @@ void VG_(post_syscall) ( ThreadId tid, B
}
- if (tst->m_eax == -VKI_ERESTARTSYS) {
+ if (res == -VKI_ERESTARTSYS) {
/* Applications never expect to see this, so we should either
restart the syscall or fail it with EINTR, depending on what
@@ -6258,5 +6244,5 @@ void VG_(post_syscall) ( ThreadId tid, B
if (!restarted) {
if (sys->after != NULL &&
- ((tst->sys_flags & PostOnFail) != 0 || !VG_(is_kerror)(tst->m_eax)))
+ ((tst->sys_flags & PostOnFail) != 0 || !VG_(is_kerror)(res)))
(sys->after)(tst->tid, tst);
@@ -6270,5 +6256,5 @@ void VG_(post_syscall) ( ThreadId tid, B
if (VG_(needs).syscall_wrapper) {
VGP_PUSHCC(VgpSkinSysWrap);
- SK_(post_syscall)(tid, syscallno, pre_res, tst->m_eax, /*isBlocking*/True); // did block
+ SK_(post_syscall)(tid, syscallno, pre_res, res, /*isBlocking*/True); // did block
VGP_POPCC(VgpSkinSysWrap);
}
@@ -6281,4 +6267,13 @@ void VG_(post_syscall) ( ThreadId tid, B
}
+#undef SYSNO
+#undef res
+#undef arg1
+#undef arg2
+#undef arg3
+#undef arg4
+#undef arg5
+#undef arg6
+
/*--------------------------------------------------------------------*/
/*--- end vg_syscalls.c ---*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 15:42:32
|
CVS commit by nethercote:
Makefile.am minor correction
M +0 -1 Makefile.am 1.6
--- valgrind/coregrind/x86/Makefile.am #1.5:1.6
@@ -4,5 +4,4 @@
EXTRA_DIST = \
ume_archdefs.c \
- ume_archdefs.h \
ume_entry.S \
ume_go.c
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 15:18:44
|
CVS commit by nethercote:
Tweak configure.in in preparation for arch and OS ports -- we now have
variables VG_ARCH, VG_OS and VG_PLATFORM (which equals ${VG_ARCH}-${VG_OS}).
Also added a check for the platform (arch/OS) combination.
M +21 -4 configure.in 1.117
--- valgrind/configure.in #1.116:1.117
@@ -66,8 +66,10 @@
AC_MSG_CHECKING([for a supported CPU])
+AC_SUBST(VG_ARCH)
case "${host_cpu}" in
i?86)
AC_MSG_RESULT([ok (${host_cpu})])
+ VG_ARCH="x86"
;;
@@ -79,10 +81,10 @@
AC_MSG_CHECKING([for a supported OS])
-AC_SUBST(VG_PLATFORM)
+AC_SUBST(VG_OS)
case "${host_os}" in
*linux*)
AC_MSG_RESULT([ok (${host_os})])
- VG_PLATFORM="x86-linux"
+ VG_OS="linux"
# Ok, this is linux. Check the kernel version
@@ -117,6 +119,5 @@
*freebsd*)
AC_MSG_RESULT([ok (${host_os})])
- VG_PLATFORM="x86-freebsd"
-
+ VG_OS="freebsd"
;;
@@ -127,4 +128,20 @@
esac
+AC_MSG_CHECKING([for a supported CPU/OS combination])
+AC_SUBST(VG_PLATFORM)
+
+VG_PLATFORM="$VG_ARCH-$VG_OS"
+
+case $VG_PLATFORM in
+ x86-linux)
+ AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
+ ;;
+
+ *)
+ AC_MSG_RESULT([no (${host_cpu}-${host_os})])
+ AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doin
+g a port.])
+ ;;
+esac
AC_SUBST(DEFAULT_SUPP)
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 15:16:48
|
CVS commit by nethercote:
Small step in factoring out arch-specific code: replace
__attribute((regparm(n))) with REGPARM(n) everywhere. REGPARM() is defined in
vg_skin.h, but will eventually be defined separately for each arch.
M +8 -8 addrcheck/ac_main.c 1.66
M +4 -4 cachegrind/cg_main.c 1.76
M +1 -1 coregrind/toolfuncs.def 1.3
M +1 -1 coregrind/vg_include.h 1.235
M +8 -8 coregrind/vg_libpthread.c 1.161
M +1 -1 coregrind/vg_memory.c 1.66
M +0 -2 helgrind/hg_main.c 1.82
M +2 -0 include/vg_skin.h.base 1.29
M +22 -22 memcheck/mac_shared.h 1.22
M +8 -8 memcheck/mc_include.h 1.20
M +8 -8 memcheck/mc_main.c 1.52
--- valgrind/addrcheck/ac_main.c #1.65:1.66
@@ -716,10 +716,10 @@ static __inline__ void ac_helperc_ACCESS
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
static void ac_helperc_LOAD4 ( Addr a )
{
ac_helperc_ACCESS4 ( a, /*isWrite*/False );
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
static void ac_helperc_STORE4 ( Addr a )
{
@@ -727,10 +727,10 @@ static void ac_helperc_STORE4 ( Addr a )
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
static void ac_helperc_LOAD2 ( Addr a )
{
ac_helperc_ACCESS2 ( a, /*isWrite*/False );
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
static void ac_helperc_STORE2 ( Addr a )
{
@@ -738,10 +738,10 @@ static void ac_helperc_STORE2 ( Addr a )
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
static void ac_helperc_LOAD1 ( Addr a )
{
ac_helperc_ACCESS1 ( a, /*isWrite*/False );
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
static void ac_helperc_STORE1 ( Addr a )
{
@@ -913,5 +913,5 @@ void ac_fpu_ACCESS_check ( Addr addr, In
}
-__attribute__ ((regparm(2)))
+REGPARM(2)
static void ac_fpu_READ_check ( Addr addr, Int size )
{
@@ -919,5 +919,5 @@ static void ac_fpu_READ_check ( Addr add
}
-__attribute__ ((regparm(2)))
+REGPARM(2)
static void ac_fpu_WRITE_check ( Addr addr, Int size )
{
--- valgrind/cachegrind/cg_main.c #1.75:1.76
@@ -291,5 +291,5 @@ static lineCC* get_lineCC(Addr orig_addr
/*------------------------------------------------------------*/
-static __attribute__ ((regparm (1)))
+static REGPARM(1)
void log_1I_0D_cache_access(instr_info* n)
{
@@ -303,5 +303,5 @@ void log_1I_0D_cache_access(instr_info*
}
-static __attribute__ ((regparm (2)))
+static REGPARM(2)
void log_1I_1Dr_cache_access(instr_info* n, Addr data_addr)
{
@@ -319,5 +319,5 @@ void log_1I_1Dr_cache_access(instr_info*
}
-static __attribute__ ((regparm (2)))
+static REGPARM(2)
void log_1I_1Dw_cache_access(instr_info* n, Addr data_addr)
{
@@ -335,5 +335,5 @@ void log_1I_1Dw_cache_access(instr_info*
}
-static __attribute__ ((regparm (3)))
+static REGPARM(3)
void log_1I_2D_cache_access(instr_info* n, Addr data_addr1, Addr data_addr2)
{
--- valgrind/coregrind/toolfuncs.def #1.2:1.3
@@ -200,5 +200,5 @@
## specialised cases are defined, the general case must be defined too.
-## Nb: they must all use the __attribute__((regparm(n))) attribute.
+## Nb: they must all use the REGPARM(n) attribute.
void, new_mem_stack_4, Addr new_ESP
void, new_mem_stack_8, Addr new_ESP
--- valgrind/coregrind/vg_include.h #1.234:1.235
@@ -1376,5 +1376,5 @@ extern void VG_(pad_address_space)(void)
extern void VG_(unpad_address_space)(void);
-extern __attribute__((regparm(1)))
+extern REGPARM(1)
void VG_(unknown_esp_update) ( Addr new_ESP );
--- valgrind/coregrind/vg_libpthread.c #1.160:1.161
@@ -655,6 +655,6 @@ int pthread_getconcurrency(void)
------------------------------------------------ */
-typedef void *(*__attribute__ ((regparm (3), stdcall)) allocate_tls_t) (void *result);
-typedef void (*__attribute__ ((regparm (3), stdcall)) deallocate_tls_t) (void *tcb, int dealloc_tcb);
+typedef void *(*__attribute__ ((stdcall)) REGPARM(3) allocate_tls_t) (void *result);
+typedef void (*__attribute__ ((stdcall)) REGPARM(3) deallocate_tls_t) (void *tcb, int dealloc_tcb);
static allocate_tls_t allocate_tls = NULL;
@@ -966,5 +966,5 @@ void _pthread_cleanup_pop_restore (struc
-__attribute ((regparm (1)))
+REGPARM(1)
void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
{
@@ -981,5 +981,5 @@ void __pthread_register_cancel (__pthrea
-__attribute ((regparm (1)))
+REGPARM(1)
void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
{
@@ -1007,5 +1007,5 @@ void __pthread_register_cancel_defer (__
-__attribute ((regparm (1)))
+REGPARM(1)
void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
{
@@ -1023,5 +1023,5 @@ void __pthread_unregister_cancel (__pthr
-__attribute ((regparm (1)))
+REGPARM(1)
void __pthread_unregister_restore (__pthread_unwind_buf_t *__buf)
{
@@ -1050,5 +1050,5 @@ void __pthread_unregister_restore (__pth
}
-__attribute ((regparm (1)))
+REGPARM(1)
__attribute ((__noreturn__))
void __pthread_unwind (__pthread_unwind_buf_t *__buf)
@@ -1074,5 +1074,5 @@ void __pthread_unwind (__pthread_unwind_
-__attribute ((regparm (1)))
+REGPARM(1)
__attribute ((__noreturn__))
void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
--- valgrind/coregrind/vg_memory.c #1.65:1.66
@@ -677,5 +677,5 @@ Segment *VG_(next_segment)(Segment *s)
tracked by the tool, and one of the specialised cases (eg. new_mem_stack_4)
isn't used in preference */
-__attribute__((regparm(1)))
+REGPARM(1)
void VG_(unknown_esp_update)(Addr new_ESP)
{
--- valgrind/helgrind/hg_main.c #1.81:1.82
@@ -1697,6 +1697,4 @@ static void eraser_mem_read (Addr a, UIn
static void eraser_mem_write(Addr a, UInt data_size, ThreadId tid);
-#define REGPARM(x) __attribute__((regparm (x)))
-
static void eraser_mem_help_read_1(Addr a) REGPARM(1);
static void eraser_mem_help_read_2(Addr a) REGPARM(1);
--- valgrind/include/vg_skin.h.base #1.28:1.29
@@ -37,4 +37,6 @@
#include "vg_constants_skin.h"
+// XXX: here temporarily, will eventually go in arch-specific headers...
+#define REGPARM(x) __attribute__((regparm (x)))
/* ---------------------------------------------------------------------
--- valgrind/memcheck/mac_shared.h #1.21:1.22
@@ -348,14 +348,14 @@ extern void MAC_(do_detect_memory_leaks)
);
-extern __attribute__((regparm(1))) void MAC_(new_mem_stack_4) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(die_mem_stack_4) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(new_mem_stack_8) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(die_mem_stack_8) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(new_mem_stack_12) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(die_mem_stack_12) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(new_mem_stack_16) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(die_mem_stack_16) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(new_mem_stack_32) ( Addr old_ESP );
-extern __attribute__((regparm(1))) void MAC_(die_mem_stack_32) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(new_mem_stack_4) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(die_mem_stack_4) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(new_mem_stack_8) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(die_mem_stack_8) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(new_mem_stack_12) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(die_mem_stack_12) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(new_mem_stack_16) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(die_mem_stack_16) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(new_mem_stack_32) ( Addr old_ESP );
+extern REGPARM(1) void MAC_(die_mem_stack_32) ( Addr old_ESP );
extern void MAC_(die_mem_stack) ( Addr a, UInt len);
extern void MAC_(new_mem_stack) ( Addr a, UInt len);
@@ -378,5 +378,5 @@ extern void
UNALIGNED_NEW, UNALIGNED_DIE) \
\
-void __attribute__((regparm(1))) MAC_(new_mem_stack_4)(Addr new_ESP) \
+void REGPARM(1) MAC_(new_mem_stack_4)(Addr new_ESP) \
{ \
PROF_EVENT(110); \
@@ -388,5 +388,5 @@ void __attribute__((regparm(1))) MAC_(ne
} \
\
-void __attribute__((regparm(1))) MAC_(die_mem_stack_4)(Addr new_ESP) \
+void REGPARM(1) MAC_(die_mem_stack_4)(Addr new_ESP) \
{ \
PROF_EVENT(120); \
@@ -398,5 +398,5 @@ void __attribute__((regparm(1))) MAC_(di
} \
\
-void __attribute__((regparm(1))) MAC_(new_mem_stack_8)(Addr new_ESP) \
+void REGPARM(1) MAC_(new_mem_stack_8)(Addr new_ESP) \
{ \
PROF_EVENT(111); \
@@ -411,5 +411,5 @@ void __attribute__((regparm(1))) MAC_(ne
} \
\
-void __attribute__((regparm(1))) MAC_(die_mem_stack_8)(Addr new_ESP) \
+void REGPARM(1) MAC_(die_mem_stack_8)(Addr new_ESP) \
{ \
PROF_EVENT(121); \
@@ -424,5 +424,5 @@ void __attribute__((regparm(1))) MAC_(di
} \
\
-void __attribute__((regparm(1))) MAC_(new_mem_stack_12)(Addr new_ESP) \
+void REGPARM(1) MAC_(new_mem_stack_12)(Addr new_ESP) \
{ \
PROF_EVENT(112); \
@@ -438,5 +438,5 @@ void __attribute__((regparm(1))) MAC_(ne
} \
\
-void __attribute__((regparm(1))) MAC_(die_mem_stack_12)(Addr new_ESP) \
+void REGPARM(1) MAC_(die_mem_stack_12)(Addr new_ESP) \
{ \
PROF_EVENT(122); \
@@ -453,5 +453,5 @@ void __attribute__((regparm(1))) MAC_(di
} \
\
-void __attribute__((regparm(1))) MAC_(new_mem_stack_16)(Addr new_ESP) \
+void REGPARM(1) MAC_(new_mem_stack_16)(Addr new_ESP) \
{ \
PROF_EVENT(113); \
@@ -468,5 +468,5 @@ void __attribute__((regparm(1))) MAC_(ne
} \
\
-void __attribute__((regparm(1))) MAC_(die_mem_stack_16)(Addr new_ESP) \
+void REGPARM(1) MAC_(die_mem_stack_16)(Addr new_ESP) \
{ \
PROF_EVENT(123); \
@@ -483,5 +483,5 @@ void __attribute__((regparm(1))) MAC_(di
} \
\
-void __attribute__((regparm(1))) MAC_(new_mem_stack_32)(Addr new_ESP) \
+void REGPARM(1) MAC_(new_mem_stack_32)(Addr new_ESP) \
{ \
PROF_EVENT(114); \
@@ -502,5 +502,5 @@ void __attribute__((regparm(1))) MAC_(ne
} \
\
-void __attribute__((regparm(1))) MAC_(die_mem_stack_32)(Addr new_ESP) \
+void REGPARM(1) MAC_(die_mem_stack_32)(Addr new_ESP) \
{ \
PROF_EVENT(124); \
--- valgrind/memcheck/mc_include.h #1.19:1.20
@@ -122,14 +122,14 @@ extern void MC_(helper_value_check0_fail
/* Functions defined in mc_main.c */
-extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV4) ( Addr, UInt );
-extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV2) ( Addr, UInt );
-extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV1) ( Addr, UInt );
+extern REGPARM(2) void MC_(helperc_STOREV4) ( Addr, UInt );
+extern REGPARM(2) void MC_(helperc_STOREV2) ( Addr, UInt );
+extern REGPARM(2) void MC_(helperc_STOREV1) ( Addr, UInt );
-extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV1) ( Addr );
-extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV2) ( Addr );
-extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV4) ( Addr );
+extern REGPARM(1) UInt MC_(helperc_LOADV1) ( Addr );
+extern REGPARM(1) UInt MC_(helperc_LOADV2) ( Addr );
+extern REGPARM(1) UInt MC_(helperc_LOADV4) ( Addr );
-extern __attribute__ ((regparm(2))) void MC_(fpu_write_check) ( Addr addr, Int size );
-extern __attribute__ ((regparm(2))) void MC_(fpu_read_check) ( Addr addr, Int size );
+extern REGPARM(2) void MC_(fpu_write_check) ( Addr addr, Int size );
+extern REGPARM(2) void MC_(fpu_read_check) ( Addr addr, Int size );
--- valgrind/memcheck/mc_main.c #1.51:1.52
@@ -763,5 +763,5 @@ static __inline__ UInt shiftRight16 ( UI
function, which can handle all situations.
*/
-__attribute__ ((regparm(1)))
+REGPARM(1)
UInt MC_(helperc_LOADV4) ( Addr a )
{
@@ -788,5 +788,5 @@ UInt MC_(helperc_LOADV4) ( Addr a )
}
-__attribute__ ((regparm(2)))
+REGPARM(2)
void MC_(helperc_STOREV4) ( Addr a, UInt vbytes )
{
@@ -813,5 +813,5 @@ void MC_(helperc_STOREV4) ( Addr a, UInt
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
UInt MC_(helperc_LOADV2) ( Addr a )
{
@@ -836,5 +836,5 @@ UInt MC_(helperc_LOADV2) ( Addr a )
}
-__attribute__ ((regparm(2)))
+REGPARM(2)
void MC_(helperc_STOREV2) ( Addr a, UInt vbytes )
{
@@ -857,5 +857,5 @@ void MC_(helperc_STOREV2) ( Addr a, UInt
}
-__attribute__ ((regparm(1)))
+REGPARM(1)
UInt MC_(helperc_LOADV1) ( Addr a )
{
@@ -880,5 +880,5 @@ UInt MC_(helperc_LOADV1) ( Addr a )
}
-__attribute__ ((regparm(2)))
+REGPARM(2)
void MC_(helperc_STOREV1) ( Addr a, UInt vbytes )
{
@@ -1108,5 +1108,5 @@ void MC_(helperc_value_check4_fail) ( vo
------------------------------------------------------------------ */
-__attribute__ ((regparm(2)))
+REGPARM(2)
void MC_(fpu_read_check) ( Addr addr, Int size )
{
@@ -1200,5 +1200,5 @@ void MC_(fpu_read_check) ( Addr addr, In
-__attribute__ ((regparm(2)))
+REGPARM(2)
void MC_(fpu_write_check) ( Addr addr, Int size )
{
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 14:15:47
|
CVS commit by nethercote:
Removing the example tool 'example' -- it's almost identical to Nulgrind,
except it doesn't actually get built and so ex_main.c and the Makefile.am tend
to get out of date. Changed the docs to refer to Nulgrind as the example tool
for if you start writing a new one.
M +5 -5 coregrind/docs/coregrind_tools.html 1.2
R example/Makefile.am 1.7
R example/ex_main.c 1.16
--- valgrind/coregrind/docs/coregrind_tools.html #1.1:1.2
@@ -348,8 +348,8 @@
</li><p>
- <li>Copy <code>example/Makefile.am</code> into <code>foobar/</code>.
+ <li>Copy <code>none/Makefile.am</code> into <code>foobar/</code>.
Edit it by replacing all occurrences of the string
- ``<code>example</code>'' with ``<code>foobar</code>'' and the one
- occurrence of the string ``<code>ex_</code>'' with ``<code>fb_</code>''.
+ ``<code>none</code>'' with ``<code>foobar</code>'' and the one
+ occurrence of the string ``<code>nl_</code>'' with ``<code>fb_</code>''.
It might be worth trying to understand this file, at least a little; you
might have to do more complicated things with it later on. In
@@ -359,7 +359,7 @@
</li><p>
- <li>Copy <code>example/ex_main.c</code> into
+ <li>Copy <code>none/nl_main.c</code> into
<code>foobar/</code>, renaming it as <code>fb_main.c</code>.
- Edit it by changing the five lines in <code>SK_(pre_clo_init)()</code>
+ Edit it by changing the lines in <code>SK_(pre_clo_init)()</code>
to something appropriate for the tool. These fields are used in the
startup message, except for <code>bug_reports_to</code> which is used
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 14:10:44
|
CVS commit by nethercote:
Make some changes to Nulgrind -- it looks like Jeremy made some changes to it
as part of FV, but then later these changes become unnecessary. Anyway, it now
looks more like the other tools again.
M +15 -22 nl_main.c 1.19
--- valgrind/none/nl_main.c #1.18:1.19
@@ -31,20 +31,5 @@
#include "vg_skin.h"
-//float SK_(shadow_ratio) = 9. / 8.;
-
-static void post_clo_init(void)
-{
-}
-
-static UCodeBlock* instrument(UCodeBlock* cb, Addr a)
-{
- return cb;
-}
-
-static void fini(Int exitcode)
-{
-}
-
-static void pre_clo_init(void)
+void SK_(pre_clo_init)(void)
{
VG_(details_name) ("Nulgrind");
@@ -56,14 +41,22 @@ static void pre_clo_init(void)
/* No needs, no core events to track */
+}
- /* entrypoints */
- VG_(init_post_clo_init)(post_clo_init);
- VG_(init_instrument)(instrument);
- VG_(init_fini)(fini);
+void SK_(post_clo_init)(void)
+{
}
-VG_DETERMINE_INTERFACE_VERSION(pre_clo_init, 0)
+UCodeBlock* SK_(instrument)(UCodeBlock* cb, Addr a)
+{
+ return cb;
+}
+
+void SK_(fini)(Int exitcode)
+{
+}
+
+VG_DETERMINE_INTERFACE_VERSION(SK_(pre_clo_init), 0)
/*--------------------------------------------------------------------*/
-/*--- end nl_main.c ---*/
+/*--- end ---*/
/*--------------------------------------------------------------------*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 14:02:30
|
CVS commit by nethercote:
Remove a bunch of unnecessary -DVG_LIBDIR="\"$(libdir)"\" arguments in
Makefile.am files.
M +1 -1 Makefile.am 1.67
M +1 -1 addrcheck/Makefile.am 1.51
M +1 -2 auxprogs/Makefile.am 1.8
M +1 -2 cachegrind/Makefile.am 1.45
M +1 -2 corecheck/Makefile.am 1.44
M +1 -1 example/Makefile.am 1.7
M +1 -2 helgrind/Makefile.am 1.48
M +1 -2 lackey/Makefile.am 1.45
M +1 -2 massif/Makefile.am 1.4
M +1 -1 memcheck/Makefile.am 1.50
M +1 -2 none/Makefile.am 1.45
--- valgrind/Makefile.am #1.66:1.67
@@ -14,5 +14,5 @@
none
-AM_CPPFLAGS = -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS =
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/addrcheck/Makefile.am #1.50:1.51
@@ -4,5 +4,5 @@
# include memcheck/ for mac_shared.h
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/memcheck -DVG_LIBDIR="\"$(libdir)"\"
+ -I$(top_srcdir)/memcheck
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/auxprogs/Makefile.am #1.7:1.8
@@ -3,6 +3,5 @@
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_builddir)/coregrind -I$(top_srcdir)/coregrind \
- -DVG_LIBDIR="\"$(libdir)"\"
+ -I$(top_builddir)/coregrind -I$(top_srcdir)/coregrind
AM_CFLAGS = $(WERROR) -Winline -Wall -O -g
--- valgrind/cachegrind/Makefile.am #1.44:1.45
@@ -2,6 +2,5 @@
SUBDIRS = . docs tests
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/corecheck/Makefile.am #1.43:1.44
@@ -2,6 +2,5 @@
SUBDIRS = . tests docs
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/example/Makefile.am #1.6:1.7
@@ -2,5 +2,5 @@
SUBDIRS = .
-AM_CPPFLAGS = -I$(top_srcdir)/include -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/helgrind/Makefile.am #1.47:1.48
@@ -2,6 +2,5 @@
SUBDIRS = . docs tests
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/lackey/Makefile.am #1.44:1.45
@@ -2,6 +2,5 @@
SUBDIRS = . docs tests
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/massif/Makefile.am #1.3:1.4
@@ -2,6 +2,5 @@
SUBDIRS = . tests docs hp2ps
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/memcheck/Makefile.am #1.49:1.50
@@ -4,5 +4,5 @@
all_includes = -I$(top_builddir)/include -I$(top_srcdir)/include
-AM_CPPFLAGS = $(all_includes) -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = $(all_includes)
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O2 -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
--- valgrind/none/Makefile.am #1.44:1.45
@@ -2,6 +2,5 @@
SUBDIRS = . docs tests
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
- -DVG_LIBDIR="\"$(libdir)"\"
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ -g
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 12:18:36
|
On Mon, 23 Aug 2004, Paul Mackerras wrote:
>> I'm not convinced this part of the patch works. It looks to me like it
>> might try to return the same address (base - VKI_BYTES_PER_PAGE) more than
>> once.
>
> No... we only do the assignment if the current segment ends before
> base - VKI_BYTES_PER_PAGE. If there is a segment that overlaps that
> we will find it further down the list. It's safe because that
> assignment can only increase ret.
>
>> Actually, I'm not at all sure about that, because that loop -- both the
>> current version and the proposed new version -- are far too subtle for my
>> liking (not to mention uncommented). I look at them and, after a few
>> minutes of head-scratching, I *think* I see how they work, but there's a
>> real leap of faith involved. Surely this loop can be rewritten in a
>> clearer fashion?
>
> The main if statement in the loop is just "if the proposed new bit
> overlaps the existing bit". If that happens we bump the proposed new
> bit up to start after the existing bit (or possibly further with my
> patch). We go through all the existing bits and stop when we find a
> bit that starts after the end of the proposed new bit. The assumption
> is that the skiplist gives us the existing bits in increasing order.
Ok, well explained; that's exactly what should be in a comment attached
to that code.
> Well, this test in do_brk() is wrong:
>
> if (PGROUNDDN(newbrk) != PGROUNDDN(VG_(brk_limit))) {
>
> That triggers when the break goes from (e.g.) 0x10010fff to
> 0x10011000, and the code in there concludes (correctly) that no more
> memory is needed, and updates VG_(brk_limit) to 0x10011000. Then when
> we raise the break to 0x10011001, that test doesn't trigger and so we
> don't allocate any more memory, but we return the new break.
What should the test say? Can you make a patch?
N
|
|
From: Paul M. <pa...@sa...> - 2004-08-23 12:04:18
|
Nicholas Nethercote writes:
> I'm not convinced this part of the patch works. It looks to me like it
> might try to return the same address (base - VKI_BYTES_PER_PAGE) more than
> once.
No... we only do the assignment if the current segment ends before
base - VKI_BYTES_PER_PAGE. If there is a segment that overlaps that
we will find it further down the list. It's safe because that
assignment can only increase ret.
> Actually, I'm not at all sure about that, because that loop -- both the
> current version and the proposed new version -- are far too subtle for my
> liking (not to mention uncommented). I look at them and, after a few
> minutes of head-scratching, I *think* I see how they work, but there's a
> real leap of faith involved. Surely this loop can be rewritten in a
> clearer fashion?
The main if statement in the loop is just "if the proposed new bit
overlaps the existing bit". If that happens we bump the proposed new
bit up to start after the existing bit (or possibly further with my
patch). We go through all the existing bits and stop when we find a
bit that starts after the end of the proposed new bit. The assumption
is that the skiplist gives us the existing bits in increasing order.
> > Interesting. We have had complaints about brk() failing under
> > valgrind and I wonder if that's the cause.
>
> The following program gives me a seg fault under Valgrind:
[snip]
Well, this test in do_brk() is wrong:
if (PGROUNDDN(newbrk) != PGROUNDDN(VG_(brk_limit))) {
That triggers when the break goes from (e.g.) 0x10010fff to
0x10011000, and the code in there concludes (correctly) that no more
memory is needed, and updates VG_(brk_limit) to 0x10011000. Then when
we raise the break to 0x10011001, that test doesn't trigger and so we
don't allocate any more memory, but we return the new break.
Regards,
Paul.
|
|
From: Julian S. <js...@ac...> - 2004-08-23 10:12:57
|
> Yeah. Man, UCode sucks -- who thought that up? :) Yeah, what a quarterwitted* hack UCode is :) > Just to clarify: my understanding is that for really weird instructions > that cannot be expressed explicitly in the IR (eg. CPUID) there is a > "opaque" IR expression which holds the raw bytes (which the code generator > can spit out, ie. copy-annotate), but which the tools get very little > info, eg. only the regs/mem inputs and outputs. (There might also be a > string attached "cpuid" so that an arch-specific tool could know about > CPUID if it really needed to.) I'm not sure how X-arch translation is > feasible in the face of such instructions, however. That's exactly correct. For instructions like CPUID which have implicit, fixed register uses, the "opaque" expression will need to contain * raw bytes * some indication of host registers defd and used so that reg-alloc can correctly integrate the insn in the flow -- a bit like the constraints on gcc in-line assembly, I guess. Opaque expressions better not read or write memory (I think that's OK). For insns which are strange but have adjustable register fields (eg, vector frobnication of a SSE register), the opaque expr will need to contain not exactly literal bytes, but more of a bitfield template, which tells the register allocator where to slot in the revised register numbers it has computed. Of course a general solution will need to deal with both explicit (pfrobl %xmm1, %xmm4) and fixed-implicit (eg CPUID) reg uses, and any combination. As you can see I have yet to work out the precise details. X-arch translation will be impossible in the face of such opaque expressions. At least this gives a clear line, though: if the x86->IR front end does not generate these, X-arch is possible; if it does, it's not. It also gives flexibility: if you want to do X-arch but really need to handle CPUID, the front end can insert a call to a C helper function which simulates CPUID rather than pushing a literal CPUID through the translation pipeline. Have your cake and eat it too. > It's also worth noting that a distinct advantage of > disassemble-resynthesise is that if there's a mistake in the disassembler, > the program will (hopefully) crash and so the bug will be obvious. > Whereas with copy-annotate, if there's a mistake in the disassembler it is > possible that the instruction description seen by the tool is wrong, but > the generated code is right. Such an error would be very hard to find. Yes, the verifiability problem is one of several things which inclines me away from full-scale copy-annotate. > (Julian found one like that with an SSE instruction recently, where it was > IIRC incorrectly marked as reading a memory location instead of writing.) coregrind/vg_to_ucode.c rev 1.143. That bug had been there for a year before I discovered it. J * 2^(-n)wit -- a generalised halfwit :-) |
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 09:28:54
|
CVS commit by nethercote:
Fix bug, courtesy of Paul Mackerras: when giving find_map_space an address
lower than that of any existing segment, it got it wrong due to the confusing
SkipList API. I wonder how many more bugs like that there are...?
M +5 -1 vg_memory.c 1.65
--- valgrind/coregrind/vg_memory.c #1.64:1.65
@@ -515,5 +515,9 @@ Addr VG_(find_map_space)(Addr addr, UInt
ret, ret+len, for_client);
- for(s = VG_(SkipList_Find)(&sk_segments, &ret);
+ s = VG_(SkipList_Find)(&sk_segments, &ret);
+ if (s == NULL)
+ s = VG_(SkipNode_First)(&sk_segments);
+
+ for( ;
s != NULL && s->addr < (ret+len);
s = VG_(SkipNode_Next)(&sk_segments, s))
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 09:22:56
|
On Sun, 22 Aug 2004, Julian Seward wrote: > UCode's limitations, as I see them, are: > > * It's very tied to x86. > > * Because the UInstrs are x86-specific, all the tools are exposed to > architecture-specific details. > > * It provides insufficient description of SIMD operations, hence > memcheck et al cannot properly instrument them. > > * It's microarchitecturally naive. > > * It forces use of a naive, macro-expanding instruction selector which > often generates poor code. > > * UCode hardwires the assumption that the guest and host CPU > architectures are the same. > > * UCode offers no support for optimisation across multiple basic > blocks. > > * The UCode machinery is deeply wired into the rest of Valgrind. Yeah. Man, UCode sucks -- who thought that up? :) > Those who have followed such discussions in the past will know > that two alternative schemes have been proposed: > > * copy-annotate, in which original insns are copied more or less > verbatim, and annotations supporting instrumentation are added > > * disassemble-resynthesise, in which original insns are unpicked into > an intermediate representation, which is then instrumented, and real > insns are then regenerated > > At present we use copy-annotate for FP/MMX/SSE/SSE2 instructions, and > disassemble-resynthesise for the integer instruction set, excluding > the condition code handling. This is an unholy mess. > > I am leaning towards a framework which is predominantly disassemble- > resynthesise. I see that there are occasions where explicitly > representing guest instruction semantics is infeasible, and so > copy-annotate must be used for those. The framework will need to > support that. However, I hope to keep that to a minimum. Just to clarify: my understanding is that for really weird instructions that cannot be expressed explicitly in the IR (eg. CPUID) there is a "opaque" IR expression which holds the raw bytes (which the code generator can spit out, ie. copy-annotate), but which the tools get very little info, eg. only the regs/mem inputs and outputs. (There might also be a string attached "cpuid" so that an arch-specific tool could know about CPUID if it really needed to.) I'm not sure how X-arch translation is feasible in the face of such instructions, however. It's also worth noting that a distinct advantage of disassemble-resynthesise is that if there's a mistake in the disassembler, the program will (hopefully) crash and so the bug will be obvious. Whereas with copy-annotate, if there's a mistake in the disassembler it is possible that the instruction description seen by the tool is wrong, but the generated code is right. Such an error would be very hard to find. (Julian found one like that with an SSE instruction recently, where it was IIRC incorrectly marked as reading a memory location instead of writing.) N |
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 09:09:39
|
On Mon, 23 Aug 2004, Tom Hughes wrote:
>> The first bug occurs if the address given is less than the address of
>> any existing map. What happens then is that VG_(SkipNode_First)()
>> returns NULL. The main for loop in VG_(find_map_space)() then exits
>> immediately, and VG_(find_map_space)() returns 0, and the client gets
>> an ENOMEM error. The patch below fixes this by calling
>> VG_(SkipNode_First)() if VG_(SkipList_Find)() returns NULL.
>
> Didn't Nick fix that recently?
No... I did fix another similar bug where a SkipList_First() call had to
be added after a failing SkipList_Find() call. The way the skiplist works
is quite strange in that respect, and easy to get wrong. I'm concerned
that some or all of the other calls to SkipList_Find() also exhibit this
bug.
I've committed that fix.
>> The second bug is that if the client asks for an address below the
>> executable but the range of addresses it wants isn't free,
>> find_map_space will give an address just above the executable instead
>> of starting at VG_(client_mapbase), which is what the kernel does.
>> Giving an address just above the executable is bad because it
>> restricts the amount of memory which can be obtained with brk().
>> This patch fixes that by jumping up to VG_(client_mapbase) if the
>> address we would move up to is less than that.
I'm not convinced this part of the patch works. It looks to me like it
might try to return the same address (base - VKI_BYTES_PER_PAGE) more than
once.
Actually, I'm not at all sure about that, because that loop -- both the
current version and the proposed new version -- are far too subtle for my
liking (not to mention uncommented). I look at them and, after a few
minutes of head-scratching, I *think* I see how they work, but there's a
real leap of faith involved. Surely this loop can be rewritten in a
clearer fashion?
> Interesting. We have had complaints about brk() failing under
> valgrind and I wonder if that's the cause.
The following program gives me a seg fault under Valgrind:
#include <stdio.h>
#include <unistd.h>
#define MAX 3000
int main () {
char* ptr;
int i;
for (i=0; i<MAX; i++) {
printf ("%d: ", i);
printf ("calling sbrk(1)\n");
ptr = sbrk(1);
printf ("sbrk returned %p\n\n", ptr);
if (ptr == (void*)-1) {
printf ("sbrk() failed!\n");
return 0;
}
*ptr = 0;
}
return 0;
}
The output being:
2588: calling sbrk(1)
sbrk returned 0x804a000
==4855==
==4855== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==4855== Access not within mapped region at address 0x804A000
==4855== at 0x80483DF: main (in /auto/homes/njn25/grind/head/brk)
==4855==
==4855== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 1)
==4855== malloc/free: in use at exit: 0 bytes in 0 blocks.
==4855== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==4855== For a detailed leak analysis, rerun with: --leak-check=yes
==4855== For counts of detected errors, rerun with: -v
Segmentation fault
And that still happens with the second part of the patch. I'll file a bug
report about this.
N
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-23 08:14:10
|
On Sun, 22 Aug 2004, Robert Walsh wrote: > I have a patch at: > > http://www.durables.org/software/valgrind/06-amd64.diff > > which fixes a runtime problem on amd64 boxes. Jeremy and I were talking > about this today: it does actually appear to fix the problem (Valgrind > aborts early when running in 32-bit mode on amd64 boxes), and doesn't > effect any of the tests on amd64 or x64 machines, so we were thinking > that perhaps that should be included too? > > There's another possible solution to the problem, but we can implement > that later if needs be - for the moment, this should be just fine. > > If everyone is OK with this, I can commit it tomorrow or Tuesday. > Please let me know. I second this -- it's required to run 32-bit programs under Valgrind on x86-64. But can you please add a comment when you commit explaining that it means that VG_(valgrind_end) has a slightly different meaning to all the other VG_(*_end) vars -- ie. it names the last byte, whereas the others go one byte past the end. Thanks. N |
|
From: Tom H. <th...@cy...> - 2004-08-23 06:16:04
|
In message <166...@ca...>
Paul Mackerras <pa...@sa...> wrote:
> The first bug occurs if the address given is less than the address of
> any existing map. What happens then is that VG_(SkipNode_First)()
> returns NULL. The main for loop in VG_(find_map_space)() then exits
> immediately, and VG_(find_map_space)() returns 0, and the client gets
> an ENOMEM error. The patch below fixes this by calling
> VG_(SkipNode_First)() if VG_(SkipList_Find)() returns NULL.
Didn't Nick fix that recently?
> The second bug is that if the client asks for an address below the
> executable but the range of addresses it wants isn't free,
> find_map_space will give an address just above the executable instead
> of starting at VG_(client_mapbase), which is what the kernel does.
> Giving an address just above the executable is bad because it
> restricts the amount of memory which can be obtained with brk().
> This patch fixes that by jumping up to VG_(client_mapbase) if the
> address we would move up to is less than that.
Interesting. We have had complaints about brk() failing under
valgrind and I wonder if that's the cause.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|