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
(22) |
2
(19) |
3
(8) |
4
(34) |
5
(14) |
6
(14) |
|
7
(12) |
8
(15) |
9
(15) |
10
(10) |
11
(10) |
12
(28) |
13
(11) |
|
14
(22) |
15
(29) |
16
(20) |
17
(15) |
18
(39) |
19
(11) |
20
(12) |
|
21
(8) |
22
(9) |
23
(8) |
24
(10) |
25
(9) |
26
(7) |
27
(7) |
|
28
(6) |
29
(6) |
30
(11) |
|
|
|
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 20:00:51
|
CVS commit by nethercote:
64-bit cleanness: some more.
M +3 -3 vg_syscalls.c 1.161
--- valgrind/coregrind/vg_syscalls.c #1.160:1.161
@@ -4876,5 +4876,5 @@ PRE(socketcall)
*/
- struct vki_msghdr *msg = (struct vki_msghdr *)((UInt *)arg2)[ 1 ];
+ struct vki_msghdr *msg = (struct vki_msghdr *)((UWord*)arg2)[ 1 ];
msghdr_foreachfield ( tid, msg, pre_mem_read_sendmsg );
@@ -4891,5 +4891,5 @@ PRE(socketcall)
*/
- struct vki_msghdr *msg = (struct vki_msghdr *)((UInt *)arg2)[ 1 ];
+ struct vki_msghdr *msg = (struct vki_msghdr *)((UWord*)arg2)[ 1 ];
msghdr_foreachfield ( tid, msg, pre_mem_write_recvmsg );
@@ -5040,5 +5040,5 @@ POST(socketcall)
case VKI_SYS_RECVMSG:
{
- struct vki_msghdr *msg = (struct vki_msghdr *)((UInt *)arg2)[ 1 ];
+ struct vki_msghdr *msg = (struct vki_msghdr *)((UWord*)arg2)[ 1 ];
msghdr_foreachfield( tid, msg, post_mem_write_recvmsg );
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:57:09
|
CVS commit by nethercote:
64-bit cleanness: fix the memory arg of socketcall syscalls.
M +45 -45 vg_syscalls.c 1.160
--- valgrind/coregrind/vg_syscalls.c #1.159:1.160
@@ -4330,5 +4330,5 @@ POST(pipe)
MAYBE_PRINTF("SYSCALL[%d] pipe --> %d (rd %d, wr %d)\n",
VG_(getpid)(), res,
- ((UInt*)arg1)[0], ((UInt*)arg1)[1] );
+ ((Int*)arg1)[0], ((Int*)arg1)[1] );
}
@@ -4696,5 +4696,5 @@ PRE(socketcall)
arg2, 4*sizeof(Addr) );
SYSCALL_TRACK( pre_mem_write, tid, "socketcall.socketpair(sv)",
- ((UInt*)arg2)[3], 2*sizeof(int) );
+ ((UWord*)arg2)[3], 2*sizeof(int) );
break;
@@ -4711,5 +4711,5 @@ PRE(socketcall)
arg2, 3*sizeof(Addr) );
pre_mem_read_sockaddr( tid, "socketcall.bind(my_addr.%s)",
- (struct vki_sockaddr *) (((UInt*)arg2)[1]), ((UInt*)arg2)[2]);
+ (struct vki_sockaddr *) (((UWord*)arg2)[1]), ((UWord*)arg2)[2]);
break;
@@ -4725,6 +4725,6 @@ PRE(socketcall)
arg2, 3*sizeof(Addr) );
{
- Addr addr_p = ((UInt*)arg2)[1];
- Addr addrlen_p = ((UInt*)arg2)[2];
+ Addr addr_p = ((UWord*)arg2)[1];
+ Addr addrlen_p = ((UWord*)arg2)[2];
if (addr_p != (Addr)NULL)
buf_and_len_pre_check ( tid, addr_p, addrlen_p,
@@ -4742,8 +4742,8 @@ PRE(socketcall)
6*sizeof(Addr) );
SYSCALL_TRACK( pre_mem_read, tid, "socketcall.sendto(msg)",
- ((UInt*)arg2)[1], /* msg */
- ((UInt*)arg2)[2] /* len */ );
+ ((UWord*)arg2)[1], /* msg */
+ ((UWord*)arg2)[2] /* len */ );
pre_mem_read_sockaddr( tid, "socketcall.sendto(to.%s)",
- (struct vki_sockaddr *) (((UInt*)arg2)[4]), ((UInt*)arg2)[5]);
+ (struct vki_sockaddr *) (((UWord*)arg2)[4]), ((UWord*)arg2)[5]);
break;
@@ -4753,6 +4753,6 @@ PRE(socketcall)
4*sizeof(Addr) );
SYSCALL_TRACK( pre_mem_read, tid, "socketcall.send(msg)",
- ((UInt*)arg2)[1], /* msg */
- ((UInt*)arg2)[2] /* len */ );
+ ((UWord*)arg2)[1], /* msg */
+ ((UWord*)arg2)[2] /* len */ );
break;
@@ -4763,8 +4763,8 @@ PRE(socketcall)
arg2, 6*sizeof(Addr) );
{
- Addr buf_p = ((UInt*)arg2)[1];
- Int len = ((UInt*)arg2)[2];
- Addr from_p = ((UInt*)arg2)[4];
- Addr fromlen_p = ((UInt*)arg2)[5];
+ Addr buf_p = ((UWord*)arg2)[1];
+ Int len = ((UWord*)arg2)[2];
+ Addr from_p = ((UWord*)arg2)[4];
+ Addr fromlen_p = ((UWord*)arg2)[5];
SYSCALL_TRACK( pre_mem_write, tid, "socketcall.recvfrom(buf)",
@@ -4787,6 +4787,6 @@ PRE(socketcall)
arg2, 4*sizeof(Addr) );
SYSCALL_TRACK( pre_mem_write, tid, "socketcall.recv(buf)",
- ((UInt*)arg2)[1], /* buf */
- ((UInt*)arg2)[2] /* len */ );
+ ((UWord*)arg2)[1], /* buf */
+ ((UWord*)arg2)[2] /* len */ );
break;
@@ -4798,9 +4798,9 @@ PRE(socketcall)
SYSCALL_TRACK( pre_mem_read, tid,
"socketcall.connect(serv_addr.sa_family)",
- ((UInt*)arg2)[1], /* serv_addr */
+ ((UWord*)arg2)[1], /* serv_addr */
sizeof(vki_sa_family_t));
pre_mem_read_sockaddr( tid,
"socketcall.connect(serv_addr.%s)",
- (struct vki_sockaddr *) (((UInt*)arg2)[1]), ((UInt*)arg2)[2]);
+ (struct vki_sockaddr *) (((UWord*)arg2)[1]), ((UWord*)arg2)[2]);
break;
@@ -4811,6 +4811,6 @@ PRE(socketcall)
arg2, 5*sizeof(Addr) );
SYSCALL_TRACK( pre_mem_read, tid, "socketcall.setsockopt(optval)",
- ((UInt*)arg2)[3], /* optval */
- ((UInt*)arg2)[4] /* optlen */ );
+ ((UWord*)arg2)[3], /* optval */
+ ((UWord*)arg2)[4] /* optlen */ );
break;
@@ -4821,6 +4821,6 @@ PRE(socketcall)
arg2, 5*sizeof(Addr) );
{
- Addr optval_p = ((UInt*)arg2)[3];
- Addr optlen_p = ((UInt*)arg2)[4];
+ Addr optval_p = ((UWord*)arg2)[3];
+ Addr optlen_p = ((UWord*)arg2)[4];
/* vg_assert(sizeof(socklen_t) == sizeof(UInt)); */
if (optval_p != (Addr)NULL)
@@ -4836,6 +4836,6 @@ PRE(socketcall)
arg2, 3*sizeof(Addr) );
{
- Addr name_p = ((UInt*)arg2)[1];
- Addr namelen_p = ((UInt*)arg2)[2];
+ Addr name_p = ((UWord*)arg2)[1];
+ Addr namelen_p = ((UWord*)arg2)[2];
/* Nb: name_p cannot be NULL */
@@ -4851,6 +4851,6 @@ PRE(socketcall)
arg2, 3*sizeof(Addr) );
{
- Addr name_p = ((UInt*)arg2)[1];
- Addr namelen_p = ((UInt*)arg2)[2];
+ Addr name_p = ((UWord*)arg2)[1];
+ Addr namelen_p = ((UWord*)arg2)[2];
/* Nb: name_p cannot be NULL */
@@ -4912,7 +4912,7 @@ POST(socketcall)
case VKI_SYS_SOCKETPAIR: {
- Int fd1 = ((UInt*)((UInt*)arg2)[3])[0];
- Int fd2 = ((UInt*)((UInt*)arg2)[3])[1];
- VG_TRACK( post_mem_write, ((UInt*)arg2)[3], 2*sizeof(int) );
+ Int fd1 = ((Int*)((UWord*)arg2)[3])[0];
+ Int fd2 = ((Int*)((UWord*)arg2)[3])[1];
+ VG_TRACK( post_mem_write, ((UWord*)arg2)[3], 2*sizeof(int) );
if (!fd_allowed(fd1, "socketcall.socketpair", tid, True) ||
!fd_allowed(fd2, "socketcall.socketpair", tid, True)) {
@@ -4921,5 +4921,5 @@ POST(socketcall)
set_result( -VKI_EMFILE );
} else {
- VG_TRACK( post_mem_write, ((UInt*)arg2)[3], 2*sizeof(int) );
+ VG_TRACK( post_mem_write, ((UWord*)arg2)[3], 2*sizeof(int) );
if (VG_(clo_track_fds)) {
record_fd_open(tid, fd1, NULL);
@@ -4955,6 +4955,6 @@ POST(socketcall)
set_result( -VKI_EMFILE );
} else {
- Addr addr_p = ((UInt*)arg2)[1];
- Addr addrlen_p = ((UInt*)arg2)[2];
+ Addr addr_p = ((UWord*)arg2)[1];
+ Addr addrlen_p = ((UWord*)arg2)[2];
if (addr_p != (Addr)NULL)
@@ -4975,8 +4975,8 @@ POST(socketcall)
case VKI_SYS_RECVFROM:
{
- Addr buf_p = ((UInt*)arg2)[1];
- Int len = ((UInt*)arg2)[2];
- Addr from_p = ((UInt*)arg2)[4];
- Addr fromlen_p = ((UInt*)arg2)[5];
+ Addr buf_p = ((UWord*)arg2)[1];
+ Int len = ((UWord*)arg2)[2];
+ Addr from_p = ((UWord*)arg2)[4];
+ Addr fromlen_p = ((UWord*)arg2)[5];
if (from_p != (Addr)NULL)
@@ -4989,7 +4989,7 @@ POST(socketcall)
case VKI_SYS_RECV:
if (res >= 0
- && ((UInt*)arg2)[1] != (UWord)NULL) {
- VG_TRACK( post_mem_write, ((UInt*)arg2)[1], /* buf */
- ((UInt*)arg2)[2] /* len */ );
+ && ((UWord*)arg2)[1] != (UWord)NULL) {
+ VG_TRACK( post_mem_write, ((UWord*)arg2)[1], /* buf */
+ ((UWord*)arg2)[2] /* len */ );
}
break;
@@ -5003,6 +5003,6 @@ POST(socketcall)
case VKI_SYS_GETSOCKOPT:
{
- Addr optval_p = ((UInt*)arg2)[3];
- Addr optlen_p = ((UInt*)arg2)[4];
+ Addr optval_p = ((UWord*)arg2)[3];
+ Addr optlen_p = ((UWord*)arg2)[4];
if (optval_p != (Addr)NULL)
@@ -5014,6 +5014,6 @@ POST(socketcall)
case VKI_SYS_GETSOCKNAME:
{
- Addr name_p = ((UInt*)arg2)[1];
- Addr namelen_p = ((UInt*)arg2)[2];
+ Addr name_p = ((UWord*)arg2)[1];
+ Addr namelen_p = ((UWord*)arg2)[2];
buf_and_len_post_check ( tid, res, name_p, namelen_p,
@@ -5024,6 +5024,6 @@ POST(socketcall)
case VKI_SYS_GETPEERNAME:
{
- Addr name_p = ((UInt*)arg2)[1];
- Addr namelen_p = ((UInt*)arg2)[2];
+ Addr name_p = ((UWord*)arg2)[1];
+ Addr namelen_p = ((UWord*)arg2)[2];
buf_and_len_post_check ( tid, res, name_p, namelen_p,
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:43:26
|
CVS commit by nethercote: whitespace wibbles M +6 -6 vg_signals.c 1.102 |
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:41:21
|
CVS commit by nethercote:
Make computations more understandable.
M +6 -6 state.c 1.12
--- valgrind/coregrind/x86/state.c #1.11:1.12
@@ -510,16 +510,16 @@ void VGA_(thread_initial_stack)(ThreadId
/* push two args */
- esp -= 8;
+ esp -= 2 * sizeof(UWord);
SET_PTHREQ_ESP(tid, esp);
- VG_TRACK ( new_mem_stack, esp, 2 * 4 );
+ VG_TRACK ( new_mem_stack, esp, 2 * sizeof(UWord) );
VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack",
- esp, 2 * 4 );
+ esp, 2 * sizeof(UWord) );
/* push arg and (bogus) return address */
- *(UWord*)(esp+4) = arg;
+ *(UWord*)(esp+sizeof(UWord)) = arg;
*(UWord*)(esp) = ret;
- VG_TRACK ( post_mem_write, esp, 2 * 4 );
+ VG_TRACK ( post_mem_write, esp, 2 * sizeof(UWord) );
}
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:39:21
|
CVS commit by nethercote: comment wibble M +1 -2 helpers.S 1.2 --- valgrind/coregrind/x86/helpers.S #1.1:1.2 @@ -1,5 +1,4 @@ ##--------------------------------------------------------------------## -##--- Support routines for the JITter output. ---## -##--- x86/helpers.S ---## +##--- Support routines for the JITter output. x86/helpers.S ---## ##--------------------------------------------------------------------## |
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:38:21
|
CVS commit by nethercote:
More minor 64-bit cleanness tweaks.
M +3 -3 vg_syscalls.c 1.159
M +2 -2 x86/core_arch.h 1.15
--- valgrind/coregrind/vg_syscalls.c #1.158:1.159
@@ -5883,5 +5883,5 @@ static void bad_before(ThreadId tid, Thr
{
VG_(message)
- (Vg_DebugMsg,"WARNING: unhandled syscall: %d", SYSNO);
+ (Vg_DebugMsg,"WARNING: unhandled syscall: %u", (UInt)SYSNO);
if (VG_(clo_verbosity) > 1) {
ExeContext *ec = VG_(get_ExeContext)(tid);
@@ -6186,5 +6186,5 @@ Bool VG_(pre_syscall) ( ThreadId tid )
SYSNO = __NR_fork;
- syscallno = SYSNO;
+ syscallno = (UInt)SYSNO;
if (tst->syscallno != -1)
@@ -6254,5 +6254,5 @@ Bool VG_(pre_syscall) ( ThreadId tid )
(sys->before)(tst->tid, tst);
- if ((Int)res <= 0) {
+ if ((Word)res <= 0) {
/* "before" decided the syscall wasn't viable, so don't do
anything - just pretend the syscall happened. */
--- valgrind/coregrind/x86/core_arch.h #1.14:1.15
@@ -54,6 +54,6 @@
// Stack frame layout and linkage
#define FIRST_STACK_FRAME(ebp) (ebp)
-#define STACK_FRAME_RET(ebp) (((UInt*)ebp)[1])
-#define STACK_FRAME_NEXT(ebp) (((UInt*)ebp)[0])
+#define STACK_FRAME_RET(ebp) (((UWord*)ebp)[1])
+#define STACK_FRAME_NEXT(ebp) (((UWord*)ebp)[0])
// Offsets of interesting registers
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:33:55
|
CVS commit by nethercote:
Comment/formatting wibbles.
M +1 -2 vg_symtypes.c 1.11
M +2 -2 vg_syscalls.c 1.158
--- valgrind/coregrind/vg_symtypes.c #1.10:1.11
@@ -599,6 +599,5 @@ static Bool is_valid_addr(Addr a)
volatile Bool ret = False;
- if ((a > VKI_PAGE_SIZE) &&
- !test_visited(a, &faulted)) {
+ if ((a > VKI_PAGE_SIZE) && !test_visited(a, &faulted)) {
if (!LAZYSIG)
setup_signals();
--- valgrind/coregrind/vg_syscalls.c #1.157:1.158
@@ -4076,5 +4076,5 @@ PRE(mmap2)
// - the file offset is specified in pagesize units rather than bytes,
// so that it can be used for files bigger than 2^32 bytes.
- /* void* mmap(void *start, size_t length, int prot,
+ /* void* mmap2(void *start, size_t length, int prot,
int flags, int fd, off_t offset);
*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:32:16
|
CVS commit by nethercote:
Make size calculation more robust.
M +1 -1 vg_signals.c 1.101
--- valgrind/coregrind/vg_signals.c #1.100:1.101
@@ -2046,5 +2046,5 @@ void VG_(sigstartup_actions) ( void )
/* Register an alternative stack for our own signal handler to run on. */
altstack_info.ss_sp = &(sigstack[0]);
- altstack_info.ss_size = VG_SIGSTACK_SIZE_W * sizeof(UInt);
+ altstack_info.ss_size = sizeof(sigstack);
altstack_info.ss_flags = 0;
ret = VG_(sigaltstack)(&altstack_info, NULL);
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:29:09
|
CVS commit by nethercote:
64-bit cleanness tweak.
M +1 -1 vg_memory.c 1.80
--- valgrind/coregrind/vg_memory.c #1.79:1.80
@@ -672,5 +672,5 @@ void VG_(unknown_SP_update)(Addr new_SP)
{
Addr old_SP = VG_(get_archreg)(R_STACK_PTR);
- Int delta = (Int)new_SP - (Int)old_SP;
+ Word delta = (Word)new_SP - (Word)old_SP;
if (delta < -(VG_HUGE_DELTA) || VG_HUGE_DELTA < delta) {
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:28:49
|
CVS commit by nethercote:
Formatting wibbles.
M +1 -1 vg_main.c 1.228
M +4 -3 vg_proxylwp.c 1.29
M +1 -2 vg_scheduler.c 1.197
M +4 -5 vg_signals.c 1.100
--- valgrind/coregrind/vg_scheduler.c #1.196:1.197
@@ -2572,6 +2572,5 @@ void do_pthread_getspecific_ptr ( Thread
specifics_ptr = VG_(threads)[tid].specifics_ptr;
- vg_assert(specifics_ptr == NULL
- || IS_ALIGNED4_ADDR(specifics_ptr));
+ vg_assert(specifics_ptr == NULL || IS_ALIGNED4_ADDR(specifics_ptr));
SET_PTHREQ_RETVAL(tid, (UWord)specifics_ptr);
--- valgrind/coregrind/vg_signals.c #1.99:1.100
@@ -369,8 +369,6 @@ void calculate_SKSS_from_SCSS ( SKSS* ds
/* Sanity checks. */
- vg_assert(dst->skss_per_sig[VKI_SIGKILL].skss_handler
- == VKI_SIG_DFL);
- vg_assert(dst->skss_per_sig[VKI_SIGSTOP].skss_handler
- == VKI_SIG_DFL);
+ vg_assert(dst->skss_per_sig[VKI_SIGKILL].skss_handler == VKI_SIG_DFL);
+ vg_assert(dst->skss_per_sig[VKI_SIGSTOP].skss_handler == VKI_SIG_DFL);
if (0)
@@ -1700,5 +1698,6 @@ void vg_sync_signalhandler ( Int sigNo,
if (VG_(clo_trace_signals)) {
- VG_(message)(Vg_DebugMsg, "signal %d arrived ... si_code=%d", sigNo, info->si_code );
+ VG_(message)(Vg_DebugMsg, "signal %d arrived ... si_code=%d",
+ sigNo, info->si_code );
}
vg_assert(sigNo >= 1 && sigNo <= _VKI_NSIG);
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:11:25
|
CVS commit by nethercote:
64-bit cleanness: fix up types in libpthread.c.
M +15 -15 vg_libpthread.c 1.178
--- valgrind/coregrind/vg_libpthread.c #1.177:1.178
@@ -2470,7 +2470,7 @@ ssize_t pread(int fd, void *buf, size_t
typedef
-int (*recv_t)(int s, void *msg, size_t len, int flags);
+ssize_t (*recv_t)(int s, void *msg, size_t len, int flags);
WEAK
-int recv(int s, void *msg, size_t len, int flags)
+ssize_t recv(int s, void *msg, size_t len, int flags)
{
__my_pthread_testcancel();
@@ -2479,7 +2479,7 @@ int recv(int s, void *msg, size_t len, i
typedef
-int (*send_t)(int s, const void *msg, size_t len, int flags);
+ssize_t (*send_t)(int s, const void *msg, size_t len, int flags);
WEAK
-int send(int s, const void *msg, size_t len, int flags)
+ssize_t send(int s, const void *msg, size_t len, int flags)
{
__my_pthread_testcancel();
@@ -2489,7 +2489,7 @@ int send(int s, const void *msg, size_t
typedef
-int (*sendmsg_t)(int s, const struct msghdr *msg, int flags);
+ssize_t (*sendmsg_t)(int s, const struct msghdr *msg, int flags);
WEAK
-int sendmsg(int s, const struct msghdr *msg, int flags)
+ssize_t sendmsg(int s, const struct msghdr *msg, int flags)
{
__my_pthread_testcancel();
@@ -2499,7 +2499,7 @@ int sendmsg(int s, const struct msghdr *
typedef
-int (*recvmsg_t)(int s, struct msghdr *msg, int flags);
+ssize_t (*recvmsg_t)(int s, struct msghdr *msg, int flags);
WEAK
-int recvmsg(int s, struct msghdr *msg, int flags)
+ssize_t recvmsg(int s, struct msghdr *msg, int flags)
{
__my_pthread_testcancel();
@@ -2509,8 +2509,8 @@ int recvmsg(int s, struct msghdr *msg, i
typedef
-int (*recvfrom_t)(int s, void *buf, size_t len, int flags,
+ssize_t (*recvfrom_t)(int s, void *buf, size_t len, int flags,
struct sockaddr *from, socklen_t *fromlen);
WEAK
-int recvfrom(int s, void *buf, size_t len, int flags,
+ssize_t recvfrom(int s, void *buf, size_t len, int flags,
struct sockaddr *from, socklen_t *fromlen)
{
@@ -2521,8 +2521,8 @@ int recvfrom(int s, void *buf, size_t le
typedef
-int (*sendto_t)(int s, const void *msg, size_t len, int flags,
+ssize_t (*sendto_t)(int s, const void *msg, size_t len, int flags,
const struct sockaddr *to, socklen_t tolen);
WEAK
-int sendto(int s, const void *msg, size_t len, int flags,
+ssize_t sendto(int s, const void *msg, size_t len, int flags,
const struct sockaddr *to, socklen_t tolen)
{
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 19:10:53
|
CVS commit by nethercote:
Get rid of compile errors and warnings (ahem).
M +0 -1 coregrind/vg_memory.c 1.79
M +1 -1 coregrind/vg_syscalls.c 1.157
M +1 -1 include/basic_types.h 1.5
--- valgrind/include/basic_types.h #1.4:1.5
@@ -58,5 +58,5 @@ typedef UWord SizeT;
typedef Word SSizeT; // 32 64
-typedef Word OffT // 32 64
+typedef Word OffT; // 32 64
typedef UChar Bool; // 8 8
--- valgrind/coregrind/vg_syscalls.c #1.156:1.157
@@ -358,5 +358,5 @@ Addr mremap_segment ( Addr old_addr, Siz
END QUOTE
*/
-Bool VG_(is_kerror) ( Int res )
+Bool VG_(is_kerror) ( Word res )
{
if (res >= -4095 && res <= -1)
--- valgrind/coregrind/vg_memory.c #1.78:1.79
@@ -564,5 +564,4 @@ void VG_(pad_address_space)(void)
Addr addr = VG_(client_base);
Segment *s = VG_(SkipNode_First)(&sk_segments);
- UInt args[6];
Addr ret;
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 18:56:50
|
CVS commit by nethercote:
64-bit cleanness wibbles.
M +1 -1 vg_mylibc.c 1.106
M +2 -2 vg_signals.c 1.99
--- valgrind/coregrind/vg_mylibc.c #1.105:1.106
@@ -74,5 +74,5 @@ Bool VG_(isfullsigset)( vki_sigset_t* se
vg_assert(set != NULL);
for (i = 0; i < _VKI_NSIG_WORDS; i++)
- if (set->sig[i] != (UWord)(~0x0)) return False;
+ if (set->sig[i] != ~(UWord)0x0) return False;
return True;
}
--- valgrind/coregrind/vg_signals.c #1.98:1.99
@@ -544,7 +544,7 @@ void VG_(do__NR_sigaction) ( ThreadId ti
VG_(message)(Vg_DebugExtraMsg,
"__NR_sigaction: tid %d, sigNo %d, "
- "new %p, old %p, new flags 0x%x",
+ "new %p, old %p, new flags 0x%llx",
tid, signo, (UWord)new_act, (UWord)old_act,
- (UInt)(new_act ? new_act->sa_flags : 0) );
+ (ULong)(new_act ? new_act->sa_flags : 0) );
/* Rule out various error conditions. The aim is to ensure that if
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 18:45:25
|
CVS commit by nethercote:
Arch-abstraction: factor out a use of mmap() appropriately.
M +6 -13 vg_memory.c 1.78
--- valgrind/coregrind/vg_memory.c #1.77:1.78
@@ -567,15 +567,9 @@ void VG_(pad_address_space)(void)
Addr ret;
- args[2] = 0;
- args[3] = VKI_MAP_FIXED | VKI_MAP_PRIVATE | VKI_MAP_ANONYMOUS;
- args[4] = -1;
- args[5] = 0;
-
while (s && addr <= VG_(valgrind_last)) {
if (addr < s->addr) {
- args[0] = (UInt)addr;
- args[1] = s->addr - addr;
-
- ret = VG_(do_syscall)(__NR_mmap, (UInt)args);
+ PLATFORM_DO_MMAP(ret, addr, s->addr - addr, 0,
+ VKI_MAP_FIXED | VKI_MAP_PRIVATE | VKI_MAP_ANONYMOUS,
+ -1, 0);
}
@@ -585,8 +579,7 @@ void VG_(pad_address_space)(void)
if (addr <= VG_(valgrind_last)) {
- args[0] = (UInt)addr;
- args[1] = VG_(valgrind_last) - addr + 1;
-
- ret = VG_(do_syscall)(__NR_mmap, (UInt)args);
+ PLATFORM_DO_MMAP(ret, addr, VG_(valgrind_last) - addr + 1, 0,
+ VKI_MAP_FIXED | VKI_MAP_PRIVATE | VKI_MAP_ANONYMOUS,
+ -1, 0);
}
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 18:39:26
|
CVS commit by nethercote:
64-bit cleanness: introduced OffT type for off_t, used it in a few important
places.
M +2 -2 coregrind/core.h 1.50
M +5 -4 coregrind/vg_mylibc.c 1.105
M +1 -1 coregrind/vg_syscalls.c 1.156
M +2 -0 include/basic_types.h 1.4
M +1 -1 include/tool.h.base 1.14
--- valgrind/coregrind/core.h #1.49:1.50
@@ -1014,5 +1014,5 @@ extern Int VG_(poll)( struct vki_pollfd
/* system/mman.h */
extern void* VG_(mmap)( void* start, SizeT length, UInt prot, UInt flags,
- UInt sf_flags, UInt fd, UInt offset );
+ UInt sf_flags, UInt fd, OffT offset );
extern Int VG_(munmap)( void* start, SizeT length );
extern Int VG_(mprotect)( void *start, SizeT length, UInt prot );
@@ -1388,5 +1388,5 @@ extern Bool VG_(pre_syscall) ( ThreadId
extern void VG_(post_syscall)( ThreadId tid, Bool restart );
-extern Bool VG_(is_kerror) ( Int res );
+extern Bool VG_(is_kerror) ( Word res );
/* Internal atfork handlers */
--- valgrind/coregrind/vg_mylibc.c #1.104:1.105
@@ -270,5 +270,6 @@ static Int munmap_inner(void *start, Siz
}
-static Addr mmap_inner(void *start, SizeT length, UInt prot, UInt flags, UInt fd, UInt offset)
+static Addr mmap_inner(void *start, SizeT length, UInt prot, UInt flags,
+ UInt fd, OffT offset)
{
Int ret;
@@ -282,5 +283,5 @@ static Addr mmap_inner(void *start, Size
/* Returns -1 on failure. */
void* VG_(mmap)( void* start, SizeT length,
- UInt prot, UInt flags, UInt sf_flags, UInt fd, UInt offset)
+ UInt prot, UInt flags, UInt sf_flags, UInt fd, OffT offset)
{
Addr res;
@@ -1266,9 +1267,9 @@ Int VG_(write) ( Int fd, const void* buf
}
-Int VG_(lseek) ( Int fd, Long offset, Int whence)
+OffT VG_(lseek) ( Int fd, OffT offset, Int whence)
{
Int res;
/* res = lseek( fd, offset, whence ); */
- res = VG_(do_syscall)(__NR_lseek, fd, (UWord)offset, whence);
+ res = VG_(do_syscall)(__NR_lseek, fd, offset, whence);
if (VG_(is_kerror)(res)) res = -1;
return res;
--- valgrind/coregrind/vg_syscalls.c #1.155:1.156
@@ -4011,5 +4011,5 @@ PRE(lseek)
{
/* off_t lseek(int fildes, off_t offset, int whence); */
- MAYBE_PRINTF("lseek ( %d, %d, %d )\n",arg1,arg2,arg3);
+ MAYBE_PRINTF("lseek ( %d, %lld, %d )\n",arg1,(ULong)arg2,arg3);
}
--- valgrind/include/basic_types.h #1.3:1.4
@@ -58,4 +58,6 @@ typedef UWord SizeT;
typedef Word SSizeT; // 32 64
+typedef Word OffT // 32 64
+
typedef UChar Bool; // 8 8
#define False ((Bool)0)
--- valgrind/include/tool.h.base #1.13:1.14
@@ -450,5 +450,5 @@
extern Int VG_(read) ( Int fd, void* buf, Int count);
extern Int VG_(write) ( Int fd, const void* buf, Int count);
-extern Int VG_(lseek) ( Int fd, Long offset, Int whence);
+extern OffT VG_(lseek) ( Int fd, OffT offset, Int whence);
extern void VG_(close) ( Int fd );
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 18:03:13
|
CVS commit by nethercote:
64-bit cleanness: lots more replacing of UInt with UWord as necessary.
M +2 -2 coregrind/vg_execontext.c 1.21
M +1 -1 coregrind/vg_hashtable.c 1.12
M +1 -1 coregrind/vg_memory.c 1.77
M +10 -13 coregrind/vg_mylibc.c 1.104
M +6 -6 coregrind/vg_scheduler.c 1.195
M +2 -2 coregrind/vg_signals.c 1.98
M +36 -38 coregrind/vg_syscalls.c 1.155
M +2 -2 coregrind/vg_transtab.c 1.36
M +13 -13 helgrind/hg_main.c 1.90
M +5 -6 memcheck/mac_needs.c 1.31
M +3 -3 memcheck/mc_clientreqs.c 1.23
--- valgrind/coregrind/vg_execontext.c #1.20:1.21
@@ -237,5 +237,5 @@ ExeContext* VG_(get_ExeContext2) ( Addr
Addr ips[VG_DEEPEST_BACKTRACE];
Bool same;
- UInt hash;
+ UWord hash;
ExeContext* new_ec;
ExeContext* list;
@@ -255,5 +255,5 @@ ExeContext* VG_(get_ExeContext2) ( Addr
hash = 0;
for (i = 0; i < VG_(clo_backtrace_size); i++) {
- hash ^= (UInt)ips[i];
+ hash ^= ips[i];
hash = (hash << 29) | (hash >> 3);
}
--- valgrind/coregrind/vg_hashtable.c #1.11:1.12
@@ -39,5 +39,5 @@
#define VG_N_CHAINS 4999 /* a prime number */
-#define VG_CHAIN_NO(aa) (((UInt)(aa)) % VG_N_CHAINS)
+#define VG_CHAIN_NO(aa) (((UWord)(aa)) % VG_N_CHAINS)
/*--------------------------------------------------------------------*/
--- valgrind/coregrind/vg_memory.c #1.76:1.77
@@ -604,5 +604,5 @@ void VG_(unpad_address_space)(void)
while (s && addr <= VG_(valgrind_last)) {
if (addr < s->addr) {
- ret = VG_(do_syscall)(__NR_munmap, (UInt)addr, s->addr - addr);
+ ret = VG_(do_syscall)(__NR_munmap, addr, s->addr - addr);
}
--- valgrind/coregrind/vg_mylibc.c #1.103:1.104
@@ -74,5 +74,5 @@ Bool VG_(isfullsigset)( vki_sigset_t* se
vg_assert(set != NULL);
for (i = 0; i < _VKI_NSIG_WORDS; i++)
- if (set->sig[i] != (UInt)(~0x0)) return False;
+ if (set->sig[i] != (UWord)(~0x0)) return False;
return True;
}
@@ -137,11 +137,9 @@ void VG_(sigdelset_from_set)( vki_sigset
return 0 on success and -1 on error.
*/
-Int VG_(sigprocmask)( Int how,
- const vki_sigset_t* set,
- vki_sigset_t* oldset)
+Int VG_(sigprocmask)( Int how, const vki_sigset_t* set, vki_sigset_t* oldset)
{
Int res
= VG_(do_syscall)(__NR_rt_sigprocmask,
- how, (UInt)set, (UInt)oldset,
+ how, (UWord)set, (UWord)oldset,
_VKI_NSIG_WORDS * sizeof(UWord));
return VG_(is_kerror)(res) ? -1 : 0;
@@ -149,11 +147,10 @@ Int VG_(sigprocmask)( Int how,
-Int VG_(sigaction) ( Int signum,
- const struct vki_sigaction* act,
+Int VG_(sigaction) ( Int signum, const struct vki_sigaction* act,
struct vki_sigaction* oldact)
{
Int res
= VG_(do_syscall)(__NR_rt_sigaction,
- signum, (UInt)act, (UInt)oldact,
+ signum, (UWord)act, (UWord)oldact,
_VKI_NSIG_WORDS * sizeof(UWord));
/* VG_(printf)("res = %d\n",res); */
@@ -186,5 +183,5 @@ Int VG_(signal)(Int signum, void (*sigha
vg_assert(res == 0);
res = VG_(do_syscall)(__NR_rt_sigaction,
- signum, (UInt)(&sa), (UInt)NULL,
+ signum, (UWord)&sa, (UWord)NULL,
_VKI_NSIG_WORDS * sizeof(UWord));
return VG_(is_kerror)(res) ? -1 : 0;
@@ -576,5 +573,5 @@ VG_(vprintf) ( void(*send)(Char), const
send('x');
ret += myvprintf_int64(send, flags, 16, width,
- (ULong)((UInt)va_arg (vargs, void *)));
+ (ULong)((UWord)va_arg (vargs, void *)));
break;
case 'x': /* %x */
@@ -1639,5 +1636,5 @@ Int VG_(system) ( Char* cmd )
(void)VG_(do_syscall)(__NR_execve,
- (UInt)"/bin/sh", (UInt)argv, (UInt)envp);
+ (UWord)"/bin/sh", (UWord)argv, (UWord)envp);
/* If we're still alive here, execve failed. */
@@ -1691,5 +1688,5 @@ void* VG_(get_memory_from_mmap) ( SizeT
if (p != ((void*)(-1))) {
vg_assert((void*)VG_(valgrind_base) <= p && p <= (void*)VG_(valgrind_last));
- tot_alloc += (UInt)nBytes;
+ tot_alloc += nBytes;
if (0)
VG_(printf)(
--- valgrind/coregrind/vg_scheduler.c #1.194:1.195
@@ -982,5 +982,5 @@ VgSchedReturnCode do_scheduler ( Int* ex
VG_(nuke_all_threads_except) ( tid );
ARCH_INSTR_PTR(VG_(threads)[tid].arch) =
- (UInt)__libc_freeres_wrapper;
+ __libc_freeres_wrapper;
vg_assert(VG_(threads)[tid].status == VgTs_Runnable);
goto stage1; /* party on, dudes (but not for much longer :) */
@@ -1198,8 +1198,8 @@ void make_thread_jump_to_cancelhdlr ( Th
be used, but we still need to have it so that the arg is at the
correct stack offset. */
- VGA_(set_arg_and_bogus_ret)(tid, (UInt)PTHREAD_CANCELED, 0xBEADDEEF);
+ VGA_(set_arg_and_bogus_ret)(tid, (UWord)PTHREAD_CANCELED, 0xBEADDEEF);
/* .cancel_pend will hold &thread_exit_wrapper */
- ARCH_INSTR_PTR(VG_(threads)[tid].arch) = (UInt)VG_(threads)[tid].cancel_pend;
+ ARCH_INSTR_PTR(VG_(threads)[tid].arch) = (UWord)VG_(threads)[tid].cancel_pend;
VG_(proxy_abort_syscall)(tid);
@@ -1844,5 +1844,5 @@ void do__apply_in_new_thread ( ThreadId
/* this is where we start */
- ARCH_INSTR_PTR(VG_(threads)[tid].arch) = (UInt)fn;
+ ARCH_INSTR_PTR(VG_(threads)[tid].arch) = (UWord)fn;
if (VG_(clo_trace_sched)) {
@@ -2575,5 +2575,5 @@ void do_pthread_getspecific_ptr ( Thread
|| IS_ALIGNED4_ADDR(specifics_ptr));
- SET_PTHREQ_RETVAL(tid, (UInt)specifics_ptr);
+ SET_PTHREQ_RETVAL(tid, (UWord)specifics_ptr);
}
@@ -2927,5 +2927,5 @@ void do_client_request ( ThreadId tid, U
VG_(sk_malloc_called_by_scheduler) = True;
SET_PTHREQ_RETVAL(
- tid, (UInt)SK_(malloc) ( arg[1] )
+ tid, (Addr)SK_(malloc) ( arg[1] )
);
VG_(sk_malloc_called_by_scheduler) = False;
--- valgrind/coregrind/vg_signals.c #1.97:1.98
@@ -544,6 +544,6 @@ void VG_(do__NR_sigaction) ( ThreadId ti
VG_(message)(Vg_DebugExtraMsg,
"__NR_sigaction: tid %d, sigNo %d, "
- "new 0x%x, old 0x%x, new flags 0x%x",
- tid, signo, (UInt)new_act, (UInt)old_act,
+ "new %p, old %p, new flags 0x%x",
+ tid, signo, (UWord)new_act, (UWord)old_act,
(UInt)(new_act ? new_act->sa_flags : 0) );
--- valgrind/coregrind/vg_syscalls.c #1.154:1.155
@@ -1490,5 +1490,5 @@ PRE(sched_setscheduler)
const struct sched_param *p); */
MAYBE_PRINTF("sched_setscheduler ( %d, %d, %p )\n",arg1,arg2,arg3);
- if (arg3 != (UInt)NULL)
+ if (arg3 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid,
"sched_setscheduler(struct sched_param *p)",
@@ -1573,5 +1573,5 @@ PRE(sendfile)
size_t count) */
MAYBE_PRINTF("sendfile ( %d, %d, %p, %llu )\n",arg1,arg2,arg3,(ULong)arg4);
- if (arg3 != (UInt)NULL)
+ if (arg3 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "sendfile(offset)",
arg3, sizeof(vki_off_t) );
@@ -1588,5 +1588,5 @@ PRE(sendfile64)
size_t count); */
MAYBE_PRINTF("sendfile64 ( %d, %d, %p, %llu )\n",arg1,arg2,arg3,(ULong)arg4);
- if (arg3 != (UInt)NULL)
+ if (arg3 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "sendfile64(offset)",
arg3, sizeof(vki_loff_t) );
@@ -1595,5 +1595,5 @@ PRE(sendfile64)
POST(sendfile64)
{
- if (arg3 != (UInt)NULL ) {
+ if (arg3 != (UWord)NULL ) {
VG_TRACK( post_mem_write, arg3, sizeof(vki_loff_t) );
}
@@ -1735,7 +1735,7 @@ PRE(execve)
SYSCALL_TRACK( pre_mem_read_asciiz, tid, "execve(filename)", arg1 );
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
pre_argv_envp( arg2, tid, "execve(argv)", "execve(argv[i])" );
- if (arg3 != (UInt)NULL)
+ if (arg3 != (UWord)NULL)
pre_argv_envp( arg3, tid, "execve(envp)", "execve(envp[i])" );
@@ -2518,5 +2518,5 @@ PRE(ipc)
SYSCALL_TRACK( pre_mem_read, tid, "semtimedop(sops)", arg5,
arg3 * sizeof(struct vki_sembuf) );
- if (arg6 != (UInt)NULL)
+ if (arg6 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "semtimedop(timeout)", arg6,
sizeof(struct vki_timespec) );
@@ -3113,5 +3113,5 @@ PRE(ioctl)
struct vki_ifconf *ifc = (struct vki_ifconf *) arg3;
SYSCALL_TRACK( pre_mem_write,tid, "ioctl(SIOCGIFCONF).ifc_buf",
- (Addr)(ifc->vki_ifc_buf), (UInt)(ifc->ifc_len) );
+ (Addr)(ifc->vki_ifc_buf), ifc->ifc_len );
}
break;
@@ -3389,6 +3389,5 @@ PRE(ioctl)
struct vki_cdrom_read_audio *cra = (struct vki_cdrom_read_audio *) arg3;
SYSCALL_TRACK( pre_mem_write, tid, "ioctl(CDROMREADAUDIO).buf",
- (Addr)(cra->buf),
- (UInt)(cra->nframes * VKI_CD_FRAMESIZE_RAW));
+ (Addr)cra->buf, cra->nframes * VKI_CD_FRAMESIZE_RAW);
}
break;
@@ -3731,6 +3730,5 @@ POST(ioctl)
struct vki_ifconf *ifc = (struct vki_ifconf *) arg3;
if (ifc->vki_ifc_buf != NULL)
- VG_TRACK( post_mem_write, (Addr)(ifc->vki_ifc_buf),
- (UInt)(ifc->ifc_len) );
+ VG_TRACK( post_mem_write, (Addr)(ifc->vki_ifc_buf), ifc->ifc_len );
}
break;
@@ -3886,5 +3884,5 @@ POST(ioctl)
struct vki_cdrom_read_audio *cra = (struct vki_cdrom_read_audio *) arg3;
VG_TRACK( post_mem_write, (Addr)(cra->buf),
- (UInt)(cra->nframes * VKI_CD_FRAMESIZE_RAW));
+ cra->nframes * VKI_CD_FRAMESIZE_RAW);
break;
}
@@ -4202,5 +4200,5 @@ PRE(nanosleep)
SYSCALL_TRACK( pre_mem_read, tid, "nanosleep(req)", arg1,
sizeof(struct vki_timespec) );
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "nanosleep(rem)", arg2,
sizeof(struct vki_timespec) );
@@ -4209,5 +4207,5 @@ PRE(nanosleep)
POST(nanosleep)
{
- if (arg2 != (UInt)NULL && res == -VKI_EINTR)
+ if (arg2 != (UWord)NULL && res == -VKI_EINTR)
VG_TRACK( post_mem_write, arg2, sizeof(struct vki_timespec) );
}
@@ -4991,5 +4989,5 @@ POST(socketcall)
case VKI_SYS_RECV:
if (res >= 0
- && ((UInt*)arg2)[1] != (UInt)NULL) {
+ && ((UInt*)arg2)[1] != (UWord)NULL) {
VG_TRACK( post_mem_write, ((UInt*)arg2)[1], /* buf */
((UInt*)arg2)[2] /* len */ );
@@ -5150,5 +5148,5 @@ PRE(time)
/* time_t time(time_t *t); */
MAYBE_PRINTF("time ( %p )\n",arg1);
- if (arg1 != (UInt)NULL) {
+ if (arg1 != (UWord)NULL) {
SYSCALL_TRACK( pre_mem_write, tid, "time", arg1, sizeof(vki_time_t) );
}
@@ -5157,5 +5155,5 @@ PRE(time)
POST(time)
{
- if (arg1 != (UInt)NULL) {
+ if (arg1 != (UWord)NULL) {
VG_TRACK( post_mem_write, arg1, sizeof(vki_time_t) );
}
@@ -5172,5 +5170,5 @@ PRE(times)
POST(times)
{
- if (arg1 != (UInt)NULL) {
+ if (arg1 != (UWord)NULL) {
VG_TRACK( post_mem_write, arg1, sizeof(struct vki_tms) );
}
@@ -5207,5 +5205,5 @@ PRE(uname)
POST(uname)
{
- if (arg1 != (UInt)NULL) {
+ if (arg1 != (UWord)NULL) {
VG_TRACK( post_mem_write, arg1, sizeof(struct vki_new_utsname) );
}
@@ -5217,5 +5215,5 @@ PRE(utime)
MAYBE_PRINTF("utime ( %p, %p )\n", arg1,arg2);
SYSCALL_TRACK( pre_mem_read_asciiz, tid, "utime(filename)", arg1 );
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "utime(buf)", arg2,
sizeof(struct vki_utimbuf) );
@@ -5323,5 +5321,5 @@ PRE(utimes)
MAYBE_PRINTF("utimes ( %p, %p )\n", arg1,arg2);
SYSCALL_TRACK( pre_mem_read_asciiz, tid, "utimes(filename)", arg1 );
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "utimes(tvp)", arg2,
sizeof(struct vki_timeval) );
@@ -5333,5 +5331,5 @@ PRE(futex)
MAYBE_PRINTF("futex ( %p, %d, %d, %p, %p )\n", arg1,arg2,arg3,arg4,arg5);
SYSCALL_TRACK( pre_mem_read, tid, "futex(futex)", arg1, sizeof(int) );
- if (arg2 == VKI_FUTEX_WAIT && arg4 != (UInt)NULL)
+ if (arg2 == VKI_FUTEX_WAIT && arg4 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "futex(timeout)", arg4,
sizeof(struct vki_timespec) );
@@ -5406,8 +5404,8 @@ PRE(rt_sigtimedwait)
const struct timespec timeout); */
MAYBE_PRINTF("sigtimedwait ( %p, %p, timeout )\n", arg1, arg2);
- if (arg1 != (UInt)NULL)
+ if (arg1 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "sigtimedwait(set)", arg1,
sizeof(vki_sigset_t));
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "sigtimedwait(info)", arg2,
sizeof(vki_siginfo_t) );
@@ -5416,5 +5414,5 @@ PRE(rt_sigtimedwait)
POST(rt_sigtimedwait)
{
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
VG_TRACK( post_mem_write, arg2, sizeof(vki_siginfo_t) );
}
@@ -5424,5 +5422,5 @@ PRE(rt_sigqueueinfo)
/* long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t *uinfo) */
MAYBE_PRINTF("rt_sigqueueinfo(%d, %d, %p)\n", arg1, arg2, arg3);
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "sigqueueinfo(uinfo)", arg3,
sizeof(vki_siginfo_t) );
@@ -5444,9 +5442,9 @@ PRE(sigaltstack)
/* int sigaltstack(const stack_t *ss, stack_t *oss); */
MAYBE_PRINTF("sigaltstack ( %p, %p )\n",arg1,arg2);
- if (arg1 != (UInt)NULL) {
+ if (arg1 != (UWord)NULL) {
SYSCALL_TRACK( pre_mem_read, tid, "sigaltstack(ss)",
arg1, sizeof(vki_stack_t) );
}
- if (arg2 != (UInt)NULL) {
+ if (arg2 != (UWord)NULL) {
SYSCALL_TRACK( pre_mem_write, tid, "sigaltstack(oss)",
arg2, sizeof(vki_stack_t) );
@@ -5459,5 +5457,5 @@ PRE(sigaltstack)
POST(sigaltstack)
{
- if (res == 0 && arg2 != (UInt)NULL)
+ if (res == 0 && arg2 != (UWord)NULL)
VG_TRACK( post_mem_write, arg2, sizeof(vki_stack_t));
}
@@ -5468,8 +5466,8 @@ PRE(sigaction)
struct k_sigaction *oldact); */
MAYBE_PRINTF("sigaction ( %d, %p, %p )\n",arg1,arg2,arg3);
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "sigaction(act)",
arg2, sizeof(struct vki_sigaction));
- if (arg3 != (UInt)NULL)
+ if (arg3 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "sigaction(oldact)",
arg3, sizeof(struct vki_sigaction));
@@ -5481,5 +5479,5 @@ PRE(sigaction)
POST(sigaction)
{
- if (res == 0 && arg3 != (UInt)NULL)
+ if (res == 0 && arg3 != (UWord)NULL)
VG_TRACK( post_mem_write, arg3, sizeof(struct vki_sigaction));
}
@@ -5493,8 +5491,8 @@ PRE(sigprocmask)
k_sigset_t *oldset); */
MAYBE_PRINTF("sigprocmask ( %d, %p, %p )\n",arg1,arg2,arg3);
- if (arg2 != (UInt)NULL)
+ if (arg2 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "sigprocmask(set)",
arg2, sizeof(vki_sigset_t));
- if (arg3 != (UInt)NULL)
+ if (arg3 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_write, tid, "sigprocmask(oldset)",
arg3, sizeof(vki_sigset_t));
@@ -5509,5 +5507,5 @@ PRE(sigprocmask)
POST(sigprocmask)
{
- if (res == 0 && arg3 != (UInt)NULL)
+ if (res == 0 && arg3 != (UWord)NULL)
VG_TRACK( post_mem_write, arg3, sizeof(vki_sigset_t));
}
@@ -5589,5 +5587,5 @@ PRE(io_getevents)
SYSCALL_TRACK( pre_mem_write, tid, "io_getevents(events)",
arg4, sizeof(struct vki_io_event)*arg3 );
- if (arg5 != (UInt)NULL)
+ if (arg5 != (UWord)NULL)
SYSCALL_TRACK( pre_mem_read, tid, "io_getevents(timeout)",
arg5, sizeof(struct vki_timespec));
@@ -5602,5 +5600,5 @@ POST(io_getevents)
for (i = 0; i < res; i++) {
const struct vki_io_event *vev = ((struct vki_io_event *)arg4) + i;
- const struct vki_iocb *cb = (struct vki_iocb *)(UInt)vev->obj;
+ const struct vki_iocb *cb = (struct vki_iocb *)(Addr)vev->obj;
switch (cb->aio_lio_opcode) {
--- valgrind/coregrind/vg_transtab.c #1.35:1.36
@@ -239,5 +239,5 @@ void add_tt_entry ( TCEntry* tce )
/* VG_(printf)("add_TT_entry orig_addr %p\n", tce->orig_addr); */
/* Hash to get initial probe point. */
- i = ((UInt)(tce->orig_addr)) % VG_TT_SIZE;
+ i = tce->orig_addr % VG_TT_SIZE;
while (True) {
if (vg_tt[i].orig_addr == tce->orig_addr)
@@ -267,5 +267,5 @@ TTEntry* search_tt ( Addr orig_addr )
Int i;
/* Hash to get initial probe point. */
- i = ((UInt)orig_addr) % VG_TT_SIZE;
+ i = orig_addr % VG_TT_SIZE;
while (True) {
if (vg_tt[i].orig_addr == orig_addr)
--- valgrind/helgrind/hg_main.c #1.89:1.90
@@ -241,6 +241,6 @@ typedef struct EC_IP {
static inline UInt packEC(ExeContext *ec)
{
- SK_ASSERT(((UInt)ec & ((1 << STATE_BITS)-1)) == 0);
- return ((UInt)ec) >> STATE_BITS;
+ SK_ASSERT(((UWord)ec & ((1 << STATE_BITS)-1)) == 0);
+ return ((UWord)ec) >> STATE_BITS;
}
@@ -253,5 +253,5 @@ static inline ExeContext *unpackEC(UInt
static inline UInt packIP(Addr ip)
{
- return ((UInt)ip) >> STATE_BITS;
+ return ip >> STATE_BITS;
}
@@ -446,6 +446,6 @@ static Bool tlsIsDisjoint(const ThreadLi
static inline UInt packTLS(ThreadLifeSeg *tls)
{
- SK_ASSERT(((UInt)tls & ((1 << STATE_BITS)-1)) == 0);
- return ((UInt)tls) >> STATE_BITS;
+ SK_ASSERT(((UWord)tls & ((1 << STATE_BITS)-1)) == 0);
+ return ((UWord)tls) >> STATE_BITS;
}
@@ -657,6 +657,6 @@ static inline UInt packLockSet(const Loc
UInt id;
- SK_ASSERT(((UInt)p & ((1 << STATE_BITS)-1)) == 0);
- id = ((UInt)p) >> STATE_BITS;
+ SK_ASSERT(((UWord)p & ((1 << STATE_BITS)-1)) == 0);
+ id = ((UWord)p) >> STATE_BITS;
return id;
@@ -711,5 +711,5 @@ static UInt hash_LockSet_w_wo(const Lock
hash = ROTL(hash, 17);
- hash ^= (UInt)mx->mutexp;
+ hash ^= mx->mutexp;
}
@@ -1349,5 +1349,5 @@ static void pp_all_mutexes()
static Mutex *get_mutex(Addr mutexp)
{
- UInt bucket = ((UInt)mutexp) % M_MUTEX_HASHSZ;
+ UInt bucket = mutexp % M_MUTEX_HASHSZ;
Mutex *mp;
@@ -2594,8 +2594,8 @@ static void pp_AddrInfo ( Addr a, AddrIn
case Mallocd:
case Freed: {
- UInt delta;
+ SizeT delta;
UChar* relative;
if (ai->rwoffset < 0) {
- delta = (UInt)(- ai->rwoffset);
+ delta = (SizeT)(- ai->rwoffset);
relative = "before";
} else if (ai->rwoffset >= ai->blksize) {
@@ -2607,6 +2607,6 @@ static void pp_AddrInfo ( Addr a, AddrIn
}
VG_(message)(Vg_UserMsg,
- " Address %p is %d bytes %s a block of size %d %s by thread %d",
- a, delta, relative,
+ " Address %p is %llu bytes %s a block of size %d %s by thread %d",
+ a, (ULong)delta, relative,
ai->blksize,
ai->akind == Mallocd ? "alloc'd" : "freed",
--- valgrind/memcheck/mac_needs.c #1.30:1.31
@@ -228,5 +228,5 @@ void MAC_(pp_AddrInfo) ( Addr a, AddrInf
break;
case Freed: case Mallocd: case UserG: case Mempool: {
- UInt delta;
+ SizeT delta;
UChar* relative;
UChar* kind;
@@ -237,5 +237,5 @@ void MAC_(pp_AddrInfo) ( Addr a, AddrInf
}
if (ai->rwoffset < 0) {
- delta = (UInt)(- ai->rwoffset);
+ delta = (SizeT)(- ai->rwoffset);
relative = "before";
} else if (ai->rwoffset >= ai->blksize) {
@@ -247,6 +247,6 @@ void MAC_(pp_AddrInfo) ( Addr a, AddrInf
}
VG_(message)(Vg_UserMsg,
- " Address 0x%x is %d bytes %s a %s of size %d %s",
- a, delta, relative, kind,
+ " Address 0x%x is %llu bytes %s a %s of size %d %s",
+ a, (ULong)delta, relative, kind,
ai->blksize,
ai->akind==Mallocd ? "alloc'd"
@@ -413,6 +413,5 @@ static void describe_addr ( Addr a, Addr
static Bool is_just_below_ESP( Addr esp, Addr aa )
{
- if ((UInt)esp > (UInt)aa
- && ((UInt)esp - (UInt)aa) <= VG_GCC296_BUG_STACK_SLOP)
+ if (esp > aa && (esp - aa) <= VG_GCC296_BUG_STACK_SLOP)
return True;
else
--- valgrind/memcheck/mc_clientreqs.c #1.22:1.23
@@ -147,5 +147,5 @@ Bool MC_(client_perm_maybe_describe)( Ad
/* OK - maybe it's a mempool, too? */
mp = (MAC_Mempool*)VG_(HT_get_node)(MAC_(mempool_list),
- (UInt)vg_cgbs[i].start,
+ (UWord)vg_cgbs[i].start,
(void*)&d);
if(mp != NULL) {
@@ -198,5 +198,5 @@ Bool SK_(handle_client_request) ( Thread
if (!ok)
MC_(record_user_error) ( tid, bad_addr, True );
- *ret = ok ? (UInt)NULL : bad_addr;
+ *ret = ok ? (UWord)NULL : bad_addr;
break;
@@ -205,5 +205,5 @@ Bool SK_(handle_client_request) ( Thread
if (!ok)
MC_(record_user_error) ( tid, bad_addr, False );
- *ret = ok ? (UInt)NULL : bad_addr;
+ *ret = ok ? (UWord)NULL : bad_addr;
break;
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 17:25:00
|
CVS commit by nethercote:
64-bit cleanness: fix some more pointer casts to UInt.
M +16 -16 vg_mylibc.c 1.103
--- valgrind/coregrind/vg_mylibc.c #1.102:1.103
@@ -1940,5 +1940,5 @@ Int my_socket ( Int domain, Int type, In
{
Int res;
- UInt args[3];
+ UWord args[3];
args[0] = domain;
args[1] = type;
@@ -1955,7 +1955,7 @@ Int my_connect ( Int sockfd, struct vki_
{
Int res;
- UInt args[3];
+ UWord args[3];
args[0] = sockfd;
- args[1] = (UInt)serv_addr;
+ args[1] = (UWord)serv_addr;
args[2] = addrlen;
res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_CONNECT, (UWord)&args);
@@ -1975,7 +1975,7 @@ Int VG_(write_socket)( Int sd, void *msg
Int res;
- UInt args[4];
+ UWord args[4];
args[0] = sd;
- args[1] = (UInt)msg;
+ args[1] = (UWord)msg;
args[2] = count;
args[3] = flags;
@@ -1989,8 +1989,8 @@ Int VG_(getsockname) ( Int sd, struct vk
{
Int res;
- UInt args[3];
+ UWord args[3];
args[0] = sd;
- args[1] = (UInt)name;
- args[2] = (UInt)namelen;
+ args[1] = (UWord)name;
+ args[2] = (UWord)namelen;
res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETSOCKNAME, (UWord)&args);
if(VG_(is_kerror)(res))
@@ -2002,8 +2002,8 @@ Int VG_(getpeername) ( Int sd, struct vk
{
Int res;
- UInt args[3];
+ UWord args[3];
args[0] = sd;
- args[1] = (UInt)name;
- args[2] = (UInt)namelen;
+ args[1] = (UWord)name;
+ args[2] = (UWord)namelen;
res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETPEERNAME, (UWord)&args);
if(VG_(is_kerror)(res))
@@ -2016,10 +2016,10 @@ Int VG_(getsockopt) ( Int sd, Int level,
{
Int res;
- UInt args[5];
+ UWord args[5];
args[0] = sd;
- args[1] = (UInt)level;
- args[2] = (UInt)optname;
- args[3] = (UInt)optval;
- args[4] = (UInt)optlen;
+ args[1] = level;
+ args[2] = optname;
+ args[3] = (UWord)optval;
+ args[4] = (UWord)optlen;
res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETSOCKOPT, (UWord)&args);
if(VG_(is_kerror)(res))
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 17:10:35
|
CVS commit by nethercote:
Format wibbles.
M +2 -4 vg_mylibc.c 1.102
--- valgrind/coregrind/vg_mylibc.c #1.101:1.102
@@ -164,6 +164,5 @@ Int VG_(sigaction) ( Int signum,
Int VG_(sigaltstack)( const vki_stack_t* ss, vki_stack_t* oss )
{
- Int res
- = VG_(do_syscall)(__NR_sigaltstack, (UWord)ss, (UWord)oss);
+ Int res = VG_(do_syscall)(__NR_sigaltstack, (UWord)ss, (UWord)oss);
return VG_(is_kerror)(res) ? -1 : 0;
}
@@ -1667,6 +1666,5 @@ UInt VG_(read_millisecond_timer) ( void
Int res;
- res = VG_(do_syscall)(__NR_gettimeofday, (UWord)&tv_now,
- (UWord)NULL);
+ res = VG_(do_syscall)(__NR_gettimeofday, (UWord)&tv_now, (UWord)NULL);
now = tv_now.tv_sec * 1000000ULL + tv_now.tv_usec;
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 17:02:50
|
CVS commit by nethercote:
64-bit cleanness: convert some (UInt) casts of pointers to (UWord) casts.
Also, remove some unnecessary (UInt) casts of integers.
M +28 -28 vg_mylibc.c 1.101
--- valgrind/coregrind/vg_mylibc.c #1.100:1.101
@@ -165,5 +165,5 @@ Int VG_(sigaltstack)( const vki_stack_t*
{
Int res
- = VG_(do_syscall)(__NR_sigaltstack, (UInt)ss, (UInt)oss);
+ = VG_(do_syscall)(__NR_sigaltstack, (UWord)ss, (UWord)oss);
return VG_(is_kerror)(res) ? -1 : 0;
}
@@ -221,5 +221,5 @@ Int VG_(tkill)( Int tid, Int signo )
Int VG_(sigpending) ( vki_sigset_t* set )
{
- Int res = VG_(do_syscall)(__NR_sigpending, (UInt)set);
+ Int res = VG_(do_syscall)(__NR_sigpending, (UWord)set);
return VG_(is_kerror)(res) ? -1 : 0;
}
@@ -269,7 +269,7 @@ Int VG_(gettid)(void)
------------------------------------------------------------------ */
-static Int munmap_inner(void *start, UInt length)
+static Int munmap_inner(void *start, SizeT length)
{
- return VG_(do_syscall)(__NR_munmap, (UInt)start, (UInt)length );
+ return VG_(do_syscall)(__NR_munmap, (UWord)start, length );
}
@@ -340,6 +340,6 @@ Int VG_(mprotect)( void *start, SizeT le
void VG_(exit)( Int status )
{
- (void)VG_(do_syscall)(__NR_exit_group, (UInt)status );
- (void)VG_(do_syscall)(__NR_exit, (UInt)status );
+ (void)VG_(do_syscall)(__NR_exit_group, status );
+ (void)VG_(do_syscall)(__NR_exit, status );
/* Why are we still alive here? */
/*NOTREACHED*/
@@ -1234,5 +1234,5 @@ Int VG_(open) ( const Char* pathname, In
/* ... so we go direct to the horse's mouth, which seems to work
ok: */
- fd = VG_(do_syscall)(__NR_open, (UInt)pathname, flags, mode);
+ fd = VG_(do_syscall)(__NR_open, (UWord)pathname, flags, mode);
/* VG_(printf)("result = %d\n", fd); */
/* return -ve error code */
@@ -1256,5 +1256,5 @@ Int VG_(read) ( Int fd, void* buf, Int c
Int res;
/* res = read( fd, buf, count ); */
- res = VG_(do_syscall)(__NR_read, fd, (UInt)buf, count);
+ res = VG_(do_syscall)(__NR_read, fd, (UWord)buf, count);
/* return -ERRNO on error */
return res;
@@ -1265,5 +1265,5 @@ Int VG_(write) ( Int fd, const void* buf
Int res;
/* res = write( fd, buf, count ); */
- res = VG_(do_syscall)(__NR_write, fd, (UInt)buf, count);
+ res = VG_(do_syscall)(__NR_write, fd, (UWord)buf, count);
/* return -ERRNO on error */
return res;
@@ -1274,5 +1274,5 @@ Int VG_(lseek) ( Int fd, Long offset, In
Int res;
/* res = lseek( fd, offset, whence ); */
- res = VG_(do_syscall)(__NR_lseek, fd, (UInt)offset, whence);
+ res = VG_(do_syscall)(__NR_lseek, fd, (UWord)offset, whence);
if (VG_(is_kerror)(res)) res = -1;
return res;
@@ -1282,5 +1282,5 @@ Int VG_(stat) ( Char* file_name, struct
{
Int res;
- res = VG_(do_syscall)(__NR_stat, (UInt)file_name, (UInt)buf);
+ res = VG_(do_syscall)(__NR_stat, (UWord)file_name, (UWord)buf);
return res; /* return -ve error */
}
@@ -1289,5 +1289,5 @@ Int VG_(fstat) ( Int fd, struct vki_stat
{
Int res;
- res = VG_(do_syscall)(__NR_fstat, (UInt)fd, (UInt)buf);
+ res = VG_(do_syscall)(__NR_fstat, fd, (UWord)buf);
return VG_(is_kerror)(res) ? (-1) : 0;
}
@@ -1296,5 +1296,5 @@ Int VG_(dup2) ( Int oldfd, Int newfd )
{
Int res;
- res = VG_(do_syscall)(__NR_dup2, (UInt)oldfd, (UInt)newfd);
+ res = VG_(do_syscall)(__NR_dup2, oldfd, newfd);
return VG_(is_kerror)(res) ? (-1) : res;
}
@@ -1303,5 +1303,5 @@ Int VG_(rename) ( Char* old_name, Char*
{
Int res;
- res = VG_(do_syscall)(__NR_rename, (UInt)old_name, (UInt)new_name);
+ res = VG_(do_syscall)(__NR_rename, (UWord)old_name, (UWord)new_name);
return VG_(is_kerror)(res) ? (-1) : 0;
}
@@ -1310,5 +1310,5 @@ Int VG_(unlink) ( Char* file_name )
{
Int res;
- res = VG_(do_syscall)(__NR_unlink, (UInt)file_name);
+ res = VG_(do_syscall)(__NR_unlink, (UWord)file_name);
return VG_(is_kerror)(res) ? (-1) : 0;
}
@@ -1320,5 +1320,5 @@ Char* VG_(getcwd) ( Char* buf, SizeT siz
Int res;
vg_assert(buf != NULL);
- res = VG_(do_syscall)(__NR_getcwd, (UInt)buf, size);
+ res = VG_(do_syscall)(__NR_getcwd, (UWord)buf, size);
return VG_(is_kerror)(res) ? ((Char*)NULL) : (Char*)res;
}
@@ -1451,5 +1451,5 @@ Int VG_(getrlimit) (Int resource, struct
Int res;
/* res = getrlimit( resource, rlim ); */
- res = VG_(do_syscall)(__NR_getrlimit, (UInt)resource, (UInt)rlim);
+ res = VG_(do_syscall)(__NR_getrlimit, resource, (UWord)rlim);
if(VG_(is_kerror)(res)) res = -1;
return res;
@@ -1462,5 +1462,5 @@ Int VG_(setrlimit) (Int resource, struct
Int res;
/* res = setrlimit( resource, rlim ); */
- res = VG_(do_syscall)(__NR_setrlimit, (UInt)resource, (UInt)rlim);
+ res = VG_(do_syscall)(__NR_setrlimit, resource, (UWord)rlim);
if(VG_(is_kerror)(res)) res = -1;
return res;
@@ -1473,5 +1473,5 @@ Int VG_(getdents) (UInt fd, struct vki_d
Int res;
/* res = getdents( fd, dirp, count ); */
- res = VG_(do_syscall)(__NR_getdents, fd, (UInt)dirp, count);
+ res = VG_(do_syscall)(__NR_getdents, fd, (UWord)dirp, count);
if (VG_(is_kerror)(res)) res = -1;
return res;
@@ -1483,5 +1483,5 @@ Int VG_(readlink) (Char* path, Char* buf
Int res;
/* res = readlink( path, buf, bufsiz ); */
- res = VG_(do_syscall)(__NR_readlink, (UInt)path, (UInt)buf, bufsiz);
+ res = VG_(do_syscall)(__NR_readlink, (UWord)path, (UWord)buf, bufsiz);
if (VG_(is_kerror)(res)) res = -1;
return res;
@@ -1667,6 +1667,6 @@ UInt VG_(read_millisecond_timer) ( void
Int res;
- res = VG_(do_syscall)(__NR_gettimeofday, (UInt)&tv_now,
- (UInt)NULL);
+ res = VG_(do_syscall)(__NR_gettimeofday, (UWord)&tv_now,
+ (UWord)NULL);
now = tv_now.tv_sec * 1000000ULL + tv_now.tv_usec;
@@ -1946,5 +1946,5 @@ Int my_socket ( Int domain, Int type, In
args[1] = type;
args[2] = protocol;
- res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_SOCKET, (UInt)&args);
+ res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_SOCKET, (UWord)&args);
if (VG_(is_kerror)(res))
res = -1;
@@ -1961,5 +1961,5 @@ Int my_connect ( Int sockfd, struct vki_
args[1] = (UInt)serv_addr;
args[2] = addrlen;
- res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_CONNECT, (UInt)&args);
+ res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_CONNECT, (UWord)&args);
if (VG_(is_kerror)(res))
res = -1;
@@ -1982,5 +1982,5 @@ Int VG_(write_socket)( Int sd, void *msg
args[2] = count;
args[3] = flags;
- res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_SEND, (UInt)&args);
+ res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_SEND, (UWord)&args);
if (VG_(is_kerror)(res))
res = -1;
@@ -1995,5 +1995,5 @@ Int VG_(getsockname) ( Int sd, struct vk
args[1] = (UInt)name;
args[2] = (UInt)namelen;
- res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETSOCKNAME, (UInt)&args);
+ res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETSOCKNAME, (UWord)&args);
if(VG_(is_kerror)(res))
res = -1;
@@ -2008,5 +2008,5 @@ Int VG_(getpeername) ( Int sd, struct vk
args[1] = (UInt)name;
args[2] = (UInt)namelen;
- res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETPEERNAME, (UInt)&args);
+ res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETPEERNAME, (UWord)&args);
if(VG_(is_kerror)(res))
res = -1;
@@ -2024,5 +2024,5 @@ Int VG_(getsockopt) ( Int sd, Int level,
args[3] = (UInt)optval;
args[4] = (UInt)optlen;
- res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETSOCKOPT, (UInt)&args);
+ res = VG_(do_syscall)(__NR_socketcall, VKI_SYS_GETSOCKOPT, (UWord)&args);
if(VG_(is_kerror)(res))
res = -1;
|
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 16:39:47
|
CVS commit by nethercote:
64-bit cleanness: make the hash-table have UWord keys instead of UInt keys.
Allows addresses as keys.
M +1 -1 coregrind/vg_hashtable.c 1.11
M +2 -2 helgrind/hg_main.c 1.89
M +2 -2 include/tool.h.base 1.13
M +1 -1 massif/ms_main.c 1.20
M +6 -6 memcheck/mac_malloc_wrappers.c 1.17
--- valgrind/coregrind/vg_hashtable.c #1.10:1.11
@@ -74,5 +74,5 @@ void VG_(HT_add_node) ( VgHashTable tabl
the previous node's `next' pointer which allows it to be removed from the
list later without having to look it up again. */
-VgHashNode* VG_(HT_get_node) ( VgHashTable table, UInt key,
+VgHashNode* VG_(HT_get_node) ( VgHashTable table, UWord key,
/*OUT*/VgHashNode*** next_ptr )
{
--- valgrind/helgrind/hg_main.c #1.88:1.89
@@ -1921,5 +1921,5 @@ void handle_free ( void* p )
HG_Chunk** prev_chunks_next_ptr;
- hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UInt)p,
+ hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UWord)p,
(VgHashNode***)&prev_chunks_next_ptr );
if (hc == NULL) {
@@ -1953,5 +1953,5 @@ void* SK_(realloc) ( void* p, SizeT new_
/* First try and find the block. */
- hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UInt)p,
+ hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UWord)p,
(VgHashNode***)&prev_chunks_next_ptr );
--- valgrind/include/tool.h.base #1.12:1.13
@@ -1587,5 +1587,5 @@
struct _VgHashNode {
struct _VgHashNode * next;
- UInt key;
+ UWord key;
}
VgHashNode;
@@ -1607,5 +1607,5 @@
previous node's `next' pointer which allows it to be removed from the
list later without having to look it up again. */
-extern VgHashNode* VG_(HT_get_node) ( VgHashTable t, UInt key,
+extern VgHashNode* VG_(HT_get_node) ( VgHashTable t, UWord key,
/*OUT*/VgHashNode*** next_ptr );
--- valgrind/massif/ms_main.c #1.19:1.20
@@ -649,5 +649,5 @@ static __inline__
HP_Chunk* get_HP_Chunk(void* p, HP_Chunk*** prev_chunks_next_ptr)
{
- return (HP_Chunk*)VG_(HT_get_node) ( malloc_list, (UInt)p,
+ return (HP_Chunk*)VG_(HT_get_node) ( malloc_list, (UWord)p,
(VgHashNode***)prev_chunks_next_ptr );
}
--- valgrind/memcheck/mac_malloc_wrappers.c #1.16:1.17
@@ -305,5 +305,5 @@ void MAC_(handle_free) ( Addr p, UInt rz
cmalloc_n_frees++;
- mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UInt)p,
+ mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UWord)p,
(void*)&prev_chunks_next_ptr );
if (mc == NULL) {
@@ -354,5 +354,5 @@ void* SK_(realloc) ( void* p, SizeT new_
/* First try and find the block. */
- mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UInt)p,
+ mc = (MAC_Chunk*)VG_(HT_get_node) ( MAC_(malloc_list), (UWord)p,
(void*)&prev_chunks_next_ptr );
@@ -461,5 +461,5 @@ void MAC_(destroy_mempool)(Addr pool)
mp = (MAC_Mempool*)VG_(HT_get_node) ( MAC_(mempool_list),
- (UInt)pool,
+ (UWord)pool,
(void*)&prev_next );
@@ -483,5 +483,5 @@ void MAC_(mempool_alloc)(Addr pool, Addr
MAC_Mempool** prev_next;
- mp = (MAC_Mempool*)VG_(HT_get_node) ( MAC_(mempool_list), (UInt)pool,
+ mp = (MAC_Mempool*)VG_(HT_get_node) ( MAC_(mempool_list), (UWord)pool,
(void*)&prev_next );
@@ -506,5 +506,5 @@ void MAC_(mempool_free)(Addr pool, Addr
- mp = (MAC_Mempool*)VG_(HT_get_node)(MAC_(mempool_list), (UInt)pool,
+ mp = (MAC_Mempool*)VG_(HT_get_node)(MAC_(mempool_list), (UWord)pool,
(void*)&prev_pool);
@@ -514,5 +514,5 @@ void MAC_(mempool_free)(Addr pool, Addr
}
- mc = (MAC_Chunk*)VG_(HT_get_node)(mp->chunks, (UInt)addr,
+ mc = (MAC_Chunk*)VG_(HT_get_node)(mp->chunks, (UWord)addr,
(void*)&prev_chunk);
|
|
From: Benjamin M. <ben...@cs...> - 2004-11-04 16:17:06
|
CVS commit by bmeyer: Changed to be consistant with the rest of the files M +1 -1 demangle.h 1.2 --- valgrind/coregrind/demangle/demangle.h #1.1.1.1:1.2 @@ -19,5 +19,5 @@ -#if !defined (DEMANGLE_H) +#ifndef DEMANGLE_H #define DEMANGLE_H |
|
From: Nicholas N. <nj...@ca...> - 2004-11-04 13:49:37
|
CVS commit by nethercote:
64-bit cleanness: replace hard-wired 0xffffffff literals with something less
32-bit-specific.
M +1 -1 coregrind/vg_mylibc.c 1.100
M +2 -2 massif/ms_main.c 1.19
M +4 -4 memcheck/tests/brk.c 1.2
--- valgrind/coregrind/vg_mylibc.c #1.99:1.100
@@ -46,5 +46,5 @@ Int VG_(sigfillset)( vki_sigset_t* set )
return -1;
for (i = 0; i < _VKI_NSIG_WORDS; i++)
- set->sig[i] = 0xFFFFFFFF;
+ set->sig[i] = ~(UWord)0x0;
return 0;
}
--- valgrind/massif/ms_main.c #1.18:1.19
@@ -416,5 +416,5 @@ static Bool is_alloc_fn(Addr eip)
static XPt* get_XCon( ThreadId tid, Bool custom_malloc )
{
- // Static to minimise stack size. +1 for added 0xffffffff %eip.
+ // Static to minimise stack size. +1 for added ~0 %eip.
static Addr eips[MAX_DEPTH + MAX_ALLOC_FNS + 1];
@@ -441,5 +441,5 @@ static XPt* get_XCon( ThreadId tid, Bool
// the parent's approx_ST wouldn't be equal [or almost equal] to the
// total of the childrens' approx_STs).
- eips[ n_eips++ ] = 0xffffffff;
+ eips[ n_eips++ ] = ~((Addr)0);
// Skip over alloc functions in eips[].
--- valgrind/memcheck/tests/brk.c #1.1:1.2
@@ -14,5 +14,5 @@ int main(void)
void* vals[10];
void* res;
-
+#define EOL ((void*)( ~(long)0 ))
vals[0] = (void*)0;
vals[1] = (void*)1;
@@ -24,6 +24,6 @@ int main(void)
vals[7] = ds - 0x1; // shrink below start size
// vals[8] = ds - 0x1000; // shrink a lot below start size (into text)
-// vals[9] = (void*)0xffffffff;
- vals[8] = (void*)0xffffffff;
+// vals[9] = EOL;
+ vals[8] = EOL;
for (i = 0; (void*)0xffffffff != vals[i]; i++) {
@@ -33,5 +33,5 @@ int main(void)
assert( 0 == brk(orig_ds) ); // libc brk()
- for (i = 0; (void*)0xffffffff != vals[i]; i++) {
+ for (i = 0; EOL != vals[i]; i++) {
res = (void*)brk(vals[i]);
}
|
|
From: Tom H. <th...@cy...> - 2004-11-04 13:24:38
|
CVS commit by thughes:
Fix some GNAT related stabs parsing problems.
MERGE TO STABLE
M +20 -7 vg_stabs.c 1.14.2.2
--- valgrind/coregrind/vg_stabs.c #1.14.2.1:1.14.2.2
@@ -171,4 +171,13 @@ static SymType *structDef(StabTypeTab *t
SymType *ref = structRef(tab, NULL, isstruct, name);
+ /* it seems that GNAT likes to declare names as both struct tags
+ and typedefs so check we aren't about to make a structure a
+ reference to itself as that will create a loop */
+ if (ref == def) {
+ if (debug)
+ VG_(printf)("ignoring %s self ref for %s %p -> %p\n",
+ isstruct ? "struct" : "union", name, ref, def);
+ }
+ else {
if (debug)
VG_(printf)("defining %s ref for %s %p -> %p\n",
@@ -177,4 +186,5 @@ static SymType *structDef(StabTypeTab *t
def = VG_(st_mktypedef)(ref, name, VG_(st_basetype)(def, False));
VG_(st_setname)(def, name);
+ }
return def;
}
@@ -940,5 +950,8 @@ static SymType *stabtype_parser(SegInfo
EXPECT(',', "struct TYPE");
- off = atou(&p, 0);
+ /* logic dictates that the offset would always be
+ positive and that atou would work here but GNAT has
+ has other ideas - see bug 90128 for more details */
+ off = atoi(&p, 0);
if (*p == ',') {
|
|
From: Tom H. <th...@cy...> - 2004-11-04 13:20:23
|
CVS commit by thughes:
Add support for the settimeofday system call.
MERGE TO STABLE
M +14 -0 vg_syscalls.c 1.131.2.1
--- valgrind/coregrind/vg_syscalls.c #1.131:1.131.2.1
@@ -4675,4 +4675,17 @@ PRE(setrlimit)
}
+PRE(settimeofday)
+{
+ /* int settimeofday(const struct timeval *tv, const struct timezone *tz); */
+ MAYBE_PRINTF("settimeofday ( %p, %p )\n",arg1,arg2);
+ SYSCALL_TRACK( pre_mem_read, tid, "settimeofday(tv)", arg1,
+ sizeof(struct timeval) );
+ if (arg2 != 0) {
+ SYSCALL_TRACK( pre_mem_read, tid, "settimeofday(tz)", arg2,
+ sizeof(struct timezone) );
+ /* maybe should warn if tz->tz_dsttime is non-zero? */
+ }
+}
+
PRE(setuid)
{
@@ -6072,4 +6085,5 @@ static const struct sys_info sys_info[]
SYSB_(setreuid, 0),
SYSB_(setrlimit, 0),
+ SYSB_(settimeofday, 0),
SYSB_(setuid32, 0),
SYSB_(setuid, 0),
|
|
From: Tom H. <th...@cy...> - 2004-11-04 13:20:22
|
CVS commit by thughes:
Add support for the settimeofday system call.
M +14 -0 vg_syscalls.c 1.154
--- valgrind/coregrind/vg_syscalls.c #1.153:1.154
@@ -4666,4 +4666,17 @@ PRE(setrlimit)
}
+PRE(settimeofday)
+{
+ /* int settimeofday(const struct timeval *tv, const struct timezone *tz); */
+ MAYBE_PRINTF("settimeofday ( %p, %p )\n",arg1,arg2);
+ SYSCALL_TRACK( pre_mem_read, tid, "settimeofday(tv)", arg1,
+ sizeof(struct vki_timeval) );
+ if (arg2 != 0) {
+ SYSCALL_TRACK( pre_mem_read, tid, "settimeofday(tz)", arg2,
+ sizeof(struct vki_timezone) );
+ /* maybe should warn if tz->tz_dsttime is non-zero? */
+ }
+}
+
PRE(setuid)
{
@@ -6082,4 +6095,5 @@ static const struct sys_info sys_info[]
SYSB_(setreuid, 0),
SYSB_(setrlimit, 0),
+ SYSB_(settimeofday, 0),
SYSB_(setuid32, 0),
SYSB_(setuid, 0),
|