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
(4) |
2
(17) |
3
(9) |
4
(14) |
5
(10) |
6
(11) |
7
(8) |
|
8
(9) |
9
(11) |
10
(29) |
11
(27) |
12
(29) |
13
(36) |
14
(8) |
|
15
(18) |
16
(30) |
17
(25) |
18
(6) |
19
(16) |
20
(13) |
21
(10) |
|
22
(16) |
23
(7) |
24
(8) |
25
(13) |
26
(14) |
27
(14) |
28
(5) |
|
29
(6) |
30
(21) |
31
(14) |
|
|
|
|
|
From: <sv...@va...> - 2009-03-19 23:59:17
|
Author: sewardj
Date: 2009-03-19 23:59:01 +0000 (Thu, 19 Mar 2009)
New Revision: 1888
Log:
Make VexGuestAMD64State have a 16-aligned size once again, following
r1886.
Modified:
trunk/priv/guest-amd64/ghelpers.c
trunk/pub/libvex_guest_amd64.h
Modified: trunk/priv/guest-amd64/ghelpers.c
===================================================================
--- trunk/priv/guest-amd64/ghelpers.c 2009-03-19 23:43:43 UTC (rev 1887)
+++ trunk/priv/guest-amd64/ghelpers.c 2009-03-19 23:59:01 UTC (rev 1888)
@@ -2316,7 +2316,7 @@
vex_state->guest_GS_0x60 = 0;
vex_state->guest_IP_AT_SYSCALL = 0;
- vex_state->padding = 0;
+ /* vex_state->padding = 0; */
}
Modified: trunk/pub/libvex_guest_amd64.h
===================================================================
--- trunk/pub/libvex_guest_amd64.h 2009-03-19 23:43:43 UTC (rev 1887)
+++ trunk/pub/libvex_guest_amd64.h 2009-03-19 23:59:01 UTC (rev 1888)
@@ -168,7 +168,7 @@
ULong guest_IP_AT_SYSCALL;
/* Padding to make it have an 16-aligned size */
- ULong padding;
+ /* ULong padding; */
}
VexGuestAMD64State;
|
|
From: <sv...@va...> - 2009-03-19 23:43:54
|
Author: sewardj
Date: 2009-03-19 23:43:43 +0000 (Thu, 19 Mar 2009)
New Revision: 1887
Log:
Calculate next %rip correctly in palignr instructions (mmx and xmm-class).
Fixes #186238.
MERGE TO 3_4_BRANCH.
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.c
===================================================================
--- trunk/priv/guest-amd64/toIR.c 2009-03-19 22:21:40 UTC (rev 1886)
+++ trunk/priv/guest-amd64/toIR.c 2009-03-19 23:43:43 UTC (rev 1887)
@@ -13259,7 +13259,7 @@
nameMMXReg(eregLO3ofRM(modrm)),
nameMMXReg(gregLO3ofRM(modrm)));
} else {
- addr = disAMode ( &alen, vbi, pfx, delta+3, dis_buf, 0 );
+ addr = disAMode ( &alen, vbi, pfx, delta+3, dis_buf, 1 );
assign( sV, loadLE(Ity_I64, mkexpr(addr)) );
d64 = (Long)insn[3+alen];
delta += 3+alen+1;
@@ -13318,7 +13318,7 @@
nameXMMReg(eregOfRexRM(pfx,modrm)),
nameXMMReg(gregOfRexRM(pfx,modrm)));
} else {
- addr = disAMode ( &alen, vbi, pfx, delta+3, dis_buf, 0 );
+ addr = disAMode ( &alen, vbi, pfx, delta+3, dis_buf, 1 );
gen_SEGV_if_not_16_aligned( addr );
assign( sV, loadLE(Ity_V128, mkexpr(addr)) );
d64 = (Long)insn[3+alen];
|
|
From: <sv...@va...> - 2009-03-19 23:39:11
|
Author: sewardj
Date: 2009-03-19 23:38:59 +0000 (Thu, 19 Mar 2009)
New Revision: 9467
Log:
Remove unused var. Debug printing in
VG_(fixup_guest_state_after_syscall_interrupted) is now controlled by
VG_(clo_trace_signals).
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-03-19 23:03:04 UTC (rev 9466)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-03-19 23:38:59 UTC (rev 9467)
@@ -1979,8 +1979,6 @@
state yet. In any other situation it will be meaningless and
therefore ignored. */
- static const Bool debug = False;
-
ThreadState* tst;
SyscallStatus canonical;
ThreadArchState* th_regs;
|
|
From: <sv...@va...> - 2009-03-19 23:03:22
|
Author: sewardj
Date: 2009-03-19 23:03:04 +0000 (Thu, 19 Mar 2009)
New Revision: 9466
Log:
Don't assert when handling assignments to newly created
pseudo-register IP_AT_SYSCALL on x86 and amd64 guests, when
--track-origins=yes.
Modified:
branches/DARWIN/memcheck/mc_machine.c
Modified: branches/DARWIN/memcheck/mc_machine.c
===================================================================
--- branches/DARWIN/memcheck/mc_machine.c 2009-03-19 22:57:41 UTC (rev 9465)
+++ branches/DARWIN/memcheck/mc_machine.c 2009-03-19 23:03:04 UTC (rev 9466)
@@ -493,6 +493,7 @@
if (o == GOF(GS_0x60) && sz == 8) return -1; /* slot unused */
if (o == GOF(TISTART) && sz == 8) return -1; /* slot unused */
if (o == GOF(TILEN) && sz == 8) return -1; /* slot unused */
+ if (o == GOF(IP_AT_SYSCALL) && sz == 8) return -1; /* slot unused */
/* Treat %AH, %BH, %CH, %DH as independent registers. To do this
requires finding 4 unused 32-bit slots in the second-shadow
@@ -603,6 +604,7 @@
if (o == GOF(ACFLAG) && sz == 4) return -1; /* slot unused */
if (o == GOF(TISTART) && sz == 4) return -1; /* slot unused */
if (o == GOF(TILEN) && sz == 4) return -1; /* slot unused */
+ if (o == GOF(IP_AT_SYSCALL) && sz == 4) return -1; /* slot unused */
/* Treat %AH, %BH, %CH, %DH as independent registers. To do this
requires finding 4 unused 32-bit slots in the second-shadow
|
|
From: <sv...@va...> - 2009-03-19 22:57:45
|
Author: sewardj
Date: 2009-03-19 22:57:41 +0000 (Thu, 19 Mar 2009)
New Revision: 9465
Log:
Fill in slots in higher-level logic needed to handle delivery of
signals to threads waiting in syscalls on Darwin. This really just
means implementing VG_UCONTEXT_SYSCALL_SYSRES.
Add many comments, explaining the meaning of
VG_UCONTEXT_SYSCALL_SYSRES, and explaining the logic in
async_sighandler.
Got rid of VG_UCONTEXT_SYSCALL_NUM. It's not needed for anything
except debug printing, and in any case the notion that the syscall
number can reliably (portably) be extracted from the interrupting
signal's ucontext is simply incorrect.
Modified:
branches/DARWIN/coregrind/m_signals.c
Modified: branches/DARWIN/coregrind/m_signals.c
===================================================================
--- branches/DARWIN/coregrind/m_signals.c 2009-03-19 22:46:58 UTC (rev 9464)
+++ branches/DARWIN/coregrind/m_signals.c 2009-03-19 22:57:41 UTC (rev 9465)
@@ -133,11 +133,22 @@
/* ------ Macros for pulling stuff out of ucontexts ------ */
+/* Q: what does UCONTEXT_SYSCALL_SYSRES do? A: let's suppose the
+ machine context (uc) reflects the situation that a syscall had just
+ completed, quite literally -- that is, that the program counter was
+ now at the instruction following the syscall. (or we're slightly
+ downstream, but we're sure no relevant register has yet changed
+ value.) Then UCONTEXT_SYSCALL_SYSRES returns a SysRes reflecting
+ the result of the syscall; it does this by fishing relevant bits of
+ the machine state out of the uc. Of course if the program counter
+ was somewhere else entirely then the result is likely to be
+ meaningless, so the caller of UCONTEXT_SYSCALL_SYSRES has to be
+ very careful to pay attention to the results only when it is sure
+ that the said constraint on the program counter is indeed valid. */
#if defined(VGP_x86_linux)
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.eip)
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.esp)
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.ebp)
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.eax)
# define VG_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the value in uc_mcontext.eax into a SysRes. */ \
VG_(mk_SysRes_x86_linux)( (uc)->uc_mcontext.eax )
@@ -147,7 +158,6 @@
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.rip)
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.rsp)
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.rbp)
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.rax)
# define VG_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the value in uc_mcontext.rax into a SysRes. */ \
VG_(mk_SysRes_amd64_linux)( (uc)->uc_mcontext.rax )
@@ -201,7 +211,6 @@
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_NIP])
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_R1])
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_R1])
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_R0])
# define VG_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the values in uc_mcontext r3,cr into a SysRes. */ \
VG_(mk_SysRes_ppc32_linux)( \
@@ -214,7 +223,6 @@
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_NIP])
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R1])
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R1])
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R0])
/* Dubious hack: if there is an error, only consider the lowest 8
bits of r3. memcheck/tests/post-syscall shows a case where an
interrupted syscall should have produced a ucontext with 0x4
@@ -248,12 +256,6 @@
struct mstsave* jc = &mc->jmp_context;
return jc->gpr[1];
}
- static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
- ucontext_t* uc = (ucontext_t*)ucV;
- struct __jmpbuf* mc = &(uc->uc_mcontext);
- struct mstsave* jc = &mc->jmp_context;
- return jc->gpr[2];
- }
static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
ucontext_t* uc = (ucontext_t*)ucV;
struct __jmpbuf* mc = &(uc->uc_mcontext);
@@ -287,12 +289,6 @@
struct __context64* jc = &mc->jmp_context;
return jc->gpr[1];
}
- static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
- ucontext_t* uc = (ucontext_t*)ucV;
- struct __jmpbuf* mc = &(uc->uc_mcontext);
- struct __context64* jc = &mc->jmp_context;
- return jc->gpr[2];
- }
static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
ucontext_t* uc = (ucontext_t*)ucV;
struct __jmpbuf* mc = &(uc->uc_mcontext);
@@ -323,27 +319,38 @@
struct __darwin_i386_thread_state* ss = &mc->__ss;
return ss->__esp;
}
- static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
- I_die_here;
- }
- static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
- /* this is massively complicated by the problem that there are 4
- different kinds of syscalls, each with its own return
- convention. */
+ static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV,
+ UWord scclass ) {
+ /* this is complicated by the problem that there are 3 different
+ kinds of syscalls, each with its own return convention.
+ NB: scclass is a host word, hence UWord is good for both
+ amd64-darwin and x86-darwin */
ucontext_t* uc = (ucontext_t*)ucV;
struct __darwin_mcontext32* mc = uc->uc_mcontext;
struct __darwin_i386_thread_state* ss = &mc->__ss;
- UInt sysno = ss->__eax;
- VG_(printf)("VG_UCONTEXT_SYSCALL_SYSRES: sysno = 0x%x\n", sysno);
- VG_(printf)("%08x\n", ss->__eax);
- VG_(printf)("%08x\n", ss->__ebx);
- VG_(printf)("%08x\n", ss->__ecx);
- VG_(printf)("%08x\n", ss->__edx);
- VG_(printf)("%08x\n", ss->__esi);
- VG_(printf)("%08x\n", ss->__edi);
- VG_(printf)("%08x\n", ss->__ebp);
- VG_(printf)("%08x\n", ss->__esp);
- I_die_here;
+ /* duplicates logic in m_syswrap.getSyscallStatusFromGuestState */
+ UInt carry = 1 & ss->__eflags;
+ UInt err = 0;
+ UInt wLO = 0;
+ UInt wHI = 0;
+ switch (scclass) {
+ case VG_DARWIN_SYSCALL_CLASS_UNIX:
+ err = carry;
+ wLO = ss->__eax;
+ wHI = ss->__edx;
+ break;
+ case VG_DARWIN_SYSCALL_CLASS_MACH:
+ wLO = ss->__eax;
+ break;
+ case VG_DARWIN_SYSCALL_CLASS_MDEP:
+ wLO = ss->__eax;
+ break;
+ default:
+ vg_assert(0);
+ break;
+ }
+ return VG_(mk_SysRes_x86_darwin)( scclass, err ? True : False,
+ wHI, wLO );
}
static inline Addr VG_UCONTEXT_LINK_REG( void* ucV ) {
return 0; /* No, really. We have no LRs today. */
@@ -363,9 +370,6 @@
static inline Addr VG_UCONTEXT_STACK_PTR( void* ucV ) {
I_die_here;
}
- static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
- I_die_here;
- }
static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
I_die_here;
}
@@ -1737,9 +1741,14 @@
void async_signalhandler ( Int sigNo,
vki_siginfo_t *info, struct vki_ucontext *uc )
{
- ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
- ThreadState *tst = VG_(get_ThreadState)(tid);
+ ThreadId tid = VG_(lwpid_to_vgtid)(VG_(gettid)());
+ ThreadState* tst = VG_(get_ThreadState)(tid);
+ SysRes sres;
+ /* The thread isn't currently running, make it so before going on */
+ vg_assert(tst->status == VgTs_WaitSys);
+ VG_(acquire_BigLock)(tid, "async_signalhandler");
+
# if defined(VGO_linux)
/* The linux kernel uses the top 16 bits of si_code for it's own
use and only exports the bottom 16 bits to user space - at least
@@ -1756,24 +1765,68 @@
VG_(message)(Vg_DebugMsg, "Async handler got signal %d for tid %d info %d",
sigNo, tid, info->si_code);
- vg_assert(tst->status == VgTs_WaitSys);
+ /* Update thread state properly. The signal can only have been
+ delivered whilst we were in
+ coregrind/m_syswrap/syscall-<PLAT>.S, and only then in the
+ window between the two sigprocmask calls, since at all other
+ times, we run with async signals on the host blocked. Hence
+ make enquiries on the basis that we were in or very close to a
+ syscall, and attempt to fix up the guest state accordingly.
- /* The thread isn't currently running, make it so before going on */
- VG_(acquire_BigLock)(tid, "async_signalhandler");
+ (normal async signals occurring during computation are blocked,
+ but periodically polled for using VG_(sigtimedwait_zero), and
+ delivered at a point convenient for us. Hence this routine only
+ deals with signals that are delivered to a thread during a
+ syscall.) */
- /* Update thread state properly */
+ /* First, extract a SysRes from the ucontext_t* given to this
+ handler. If it is subsequently established by
+ VG_(fixup_guest_state_after_syscall_interrupted) that the
+ syscall was complete but the results had not been committed yet
+ to the guest state, then it'll have to commit the results itself
+ "by hand", and so we need to extract the SysRes. Of course if
+ the thread was not in that particular window then the
+ SysRes will be meaningless, but that's OK too because
+ VG_(fixup_guest_state_after_syscall_interrupted) will detect
+ that the thread was not in said window and ignore the SysRes. */
+
+ /* To make matters more complex still, on Darwin we need to know
+ the "class" of the syscall under consideration in order to be
+ able to extract the a correct SysRes. The class will have been
+ saved just before the syscall, by VG_(client_syscall), into this
+ thread's tst->arch.vex.guest_SC_CLASS. Hence: */
+# if defined(VGO_darwin)
+ sres = VG_UCONTEXT_SYSCALL_SYSRES(uc, tst->arch.vex.guest_SC_CLASS);
+# else
+ sres = VG_UCONTEXT_SYSCALL_SYSRES(uc);
+# endif
+
+ /* (1) */
VG_(fixup_guest_state_after_syscall_interrupted)(
tid,
VG_UCONTEXT_INSTR_PTR(uc),
- VG_UCONTEXT_SYSCALL_NUM(uc),
- VG_UCONTEXT_SYSCALL_SYSRES(uc),
+ sres,
!!(scss.scss_per_sig[sigNo].scss_flags & VKI_SA_RESTART)
);
+ /* (2) */
/* Set up the thread's state to deliver a signal */
if (!is_sig_ign(info->si_signo))
deliver_signal(tid, info, uc);
+ /* It's crucial that (1) and (2) happen in the order (1) then (2)
+ and not the other way around. (1) fixes up the guest thread
+ state to reflect the fact that the syscall was interrupted --
+ either to restart the syscall or to return EINTR. (2) then sets
+ up the thread state to deliver the signal. Then we resume
+ execution. First, the signal handler is run, since that's the
+ second adjustment we made to the thread state. If that returns,
+ then we resume at the guest state created by (1), viz, either
+ the syscall returns EINTR or is restarted.
+
+ If (2) was done before (1) the outcome would be completely
+ different, and wrong. */
+
/* longjmp back to the thread's main loop to start executing the
handler. */
resume_scheduler(tid);
|
|
From: <sv...@va...> - 2009-03-19 22:47:02
|
Author: sewardj
Date: 2009-03-19 22:46:58 +0000 (Thu, 19 Mar 2009)
New Revision: 9464
Log:
Fill in the various slots required to make handling of syscalls
interrupted by signals work properly on Darwin. This uses the
existing mechanisms/schemes as developed for Linux and AIX, so nothing
terribly surprising, but it is nevertheless not simple, mostly because
Darwin has 3 different syscall return conventions, and somewhat
because of the need to back up over x86 sysenter instructions,
something we didn't need to do on x86-linux. Requires vex r1886, and
will also not build without the next commit.
Added many comments, since this is one of the hairiest parts of
Valgrind.
Modified:
branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/pub_core_syswrap.h
Modified: branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S 2009-03-19 22:06:54 UTC (rev 9463)
+++ branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S 2009-03-19 22:46:58 UTC (rev 9464)
@@ -206,19 +206,47 @@
/* export the ranges so that
VG_(fixup_guest_state_after_syscall_interrupted) can do the
right thing */
-
-/* GrP fixme wrong */
-.globl _ML_(blksys_setup)
-.globl _ML_(blksys_restart)
-.globl _ML_(blksys_complete)
-.globl _ML_(blksys_committed)
-.globl _ML_(blksys_finished)
-_ML_(blksys_setup): .long L_1_1
-_ML_(blksys_restart): .long L_1_2
-_ML_(blksys_complete): .long L_1_3
-_ML_(blksys_committed): .long L_1_4
-_ML_(blksys_finished): .long L_1_5
+/* eg MK_L_SCLASS_N(UNIX,99) produces L_3_99
+ since UNIX is #defined to 3 at the top of this file */
+#define FOO(scclass,labelno) L_##scclass##_##labelno
+#define MK_L_SCCLASS_N(scclass,labelno) FOO(scclass,labelno)
+
+.globl _ML_(blksys_setup_MACH)
+.globl _ML_(blksys_restart_MACH)
+.globl _ML_(blksys_complete_MACH)
+.globl _ML_(blksys_committed_MACH)
+.globl _ML_(blksys_finished_MACH)
+_ML_(blksys_setup_MACH): .long MK_L_SCCLASS_N(MACH,1)
+_ML_(blksys_restart_MACH): .long MK_L_SCCLASS_N(MACH,2)
+_ML_(blksys_complete_MACH): .long MK_L_SCCLASS_N(MACH,3)
+_ML_(blksys_committed_MACH): .long MK_L_SCCLASS_N(MACH,4)
+_ML_(blksys_finished_MACH): .long MK_L_SCCLASS_N(MACH,5)
+
+.globl _ML_(blksys_setup_MDEP)
+.globl _ML_(blksys_restart_MDEP)
+.globl _ML_(blksys_complete_MDEP)
+.globl _ML_(blksys_committed_MDEP)
+.globl _ML_(blksys_finished_MDEP)
+_ML_(blksys_setup_MDEP): .long MK_L_SCCLASS_N(MDEP,1)
+_ML_(blksys_restart_MDEP): .long MK_L_SCCLASS_N(MDEP,2)
+_ML_(blksys_complete_MDEP): .long MK_L_SCCLASS_N(MDEP,3)
+_ML_(blksys_committed_MDEP): .long MK_L_SCCLASS_N(MDEP,4)
+_ML_(blksys_finished_MDEP): .long MK_L_SCCLASS_N(MDEP,5)
+
+.globl _ML_(blksys_setup_UNIX)
+.globl _ML_(blksys_restart_UNIX)
+.globl _ML_(blksys_complete_UNIX)
+.globl _ML_(blksys_committed_UNIX)
+.globl _ML_(blksys_finished_UNIX)
+_ML_(blksys_setup_UNIX): .long MK_L_SCCLASS_N(UNIX,1)
+_ML_(blksys_restart_UNIX): .long MK_L_SCCLASS_N(UNIX,2)
+_ML_(blksys_complete_UNIX): .long MK_L_SCCLASS_N(UNIX,3)
+_ML_(blksys_committed_UNIX): .long MK_L_SCCLASS_N(UNIX,4)
+_ML_(blksys_finished_UNIX): .long MK_L_SCCLASS_N(UNIX,5)
+
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-03-19 22:06:54 UTC (rev 9463)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-03-19 22:46:58 UTC (rev 9464)
@@ -755,6 +755,7 @@
canonical->what = SsComplete;
# elif defined(VGP_x86_darwin)
+ /* duplicates logic in m_signals.VG_UCONTEXT_SYSCALL_SYSRES */
VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla;
UInt carry = 1 & LibVEX_GuestX86_get_eflags(gst);
UInt err = 0;
@@ -1378,10 +1379,18 @@
is interrupted by a signal. */
sysno = sci->orig_args.sysno;
-#if defined(VGO_darwin)
- // Record syscall class.
+# if defined(VGO_darwin)
+ /* Record syscall class. But why? Because the syscall might be
+ interrupted by a signal, and in the signal handler (which will
+ be m_signals.async_signalhandler) we will need to build a SysRes
+ reflecting the syscall return result. In order to do that we
+ need to know the syscall class. Hence stash it in the guest
+ state of this thread. This madness is not needed on Linux or
+ AIX5, because those OSs only have a single syscall return
+ convention and so there is no ambiguity involved in converting
+ the post-signal machine state into a SysRes. */
tst->arch.vex.guest_SC_CLASS = VG_DARWIN_SYSNO_CLASS(sysno);
-#endif
+# endif
/* The default what-to-do-next thing is hand the syscall to the
kernel, so we pre-set that here. Set .sres to something
@@ -1775,11 +1784,32 @@
/* These are addresses within ML_(do_syscall_for_client_WRK). See
syscall-$PLAT.S for details.
*/
-extern const Addr ML_(blksys_setup);
-extern const Addr ML_(blksys_restart);
-extern const Addr ML_(blksys_complete);
-extern const Addr ML_(blksys_committed);
-extern const Addr ML_(blksys_finished);
+#if defined(VGO_linux) || defined(VGO_aix5)
+ extern const Addr ML_(blksys_setup);
+ extern const Addr ML_(blksys_restart);
+ extern const Addr ML_(blksys_complete);
+ extern const Addr ML_(blksys_committed);
+ extern const Addr ML_(blksys_finished);
+#elif defined(VGO_darwin)
+ /* Darwin requires extra uglyness */
+ extern const Addr ML_(blksys_setup_MACH);
+ extern const Addr ML_(blksys_restart_MACH);
+ extern const Addr ML_(blksys_complete_MACH);
+ extern const Addr ML_(blksys_committed_MACH);
+ extern const Addr ML_(blksys_finished_MACH);
+ extern const Addr ML_(blksys_setup_MDEP);
+ extern const Addr ML_(blksys_restart_MDEP);
+ extern const Addr ML_(blksys_complete_MDEP);
+ extern const Addr ML_(blksys_committed_MDEP);
+ extern const Addr ML_(blksys_finished_MDEP);
+ extern const Addr ML_(blksys_setup_UNIX);
+ extern const Addr ML_(blksys_restart_UNIX);
+ extern const Addr ML_(blksys_complete_UNIX);
+ extern const Addr ML_(blksys_committed_UNIX);
+ extern const Addr ML_(blksys_finished_UNIX);
+#else
+# error "Unknown OS"
+#endif
/* Back up guest state to restart a system call. */
@@ -1870,24 +1900,27 @@
}
#elif defined(VGP_x86_darwin)
- arch->vex.guest_EIP -= 2; // sizeof(int $0x80)
+ arch->vex.guest_EIP = arch->vex.guest_IP_AT_SYSCALL;
/* Make sure our caller is actually sane, and we're really backing
back over a syscall.
int $0x80 == CD 80
- int $0x80 == CD 81
+ int $0x81 == CD 81
+ int $0x82 == CD 82
+ sysenter == 0F 34
*/
- // DDD: #warning GrP fixme sysenter, int $0x81, int $0x82
{
UChar *p = (UChar *)arch->vex.guest_EIP;
-
- if (p[0] != 0xcd || (p[1] != 0x80 && p[1] != 0x81))
+ Bool ok = (p[0] == 0xCD && p[1] == 0x80)
+ || (p[0] == 0xCD && p[1] == 0x81)
+ || (p[0] == 0xCD && p[1] == 0x82)
+ || (p[0] == 0x0F && p[1] == 0x34);
+ if (!ok)
VG_(message)(Vg_DebugMsg,
"?! restarting over syscall at %#x %02x %02x\n",
arch->vex.guest_EIP, p[0], p[1]);
-
- vg_assert(p[0] == 0xcd && (p[1] == 0x80 || p[1] == 0x81));
+ vg_assert(ok);
}
#elif defined(VGP_amd64_darwin)
@@ -1932,18 +1965,19 @@
void
VG_(fixup_guest_state_after_syscall_interrupted)( ThreadId tid,
Addr ip,
- UWord sysnum,
SysRes sres,
Bool restart)
{
- /* Note that the sysnum arg seems to contain not-dependable-on info
- (I think it depends on the state the real syscall was in at
- interrupt) and so is ignored, apart from in the following
- printf.
+ /* Note that we don't know the syscall number here, since (1) in
+ general there's no reliable way to get hold of it short of
+ stashing it in the guest state before the syscall, and (2) in
+ any case we don't need to know it for the actions done by this
+ routine.
Furthermore, 'sres' is only used in the case where the syscall
is complete, but the result has not been committed to the guest
- state yet. */
+ state yet. In any other situation it will be meaningless and
+ therefore ignored. */
static const Bool debug = False;
@@ -1952,16 +1986,60 @@
ThreadArchState* th_regs;
SyscallInfo* sci;
- if (debug)
- VG_(printf)( "interrupted_syscall %d: tid=%d, IP=0x%llx, "
- "restart=%s, sysret.isError=%s, sysret.val=%lld\n",
- (Int)sysnum,
- (Int)tid,
- (ULong)ip,
- restart ? "True" : "False",
- sr_isError(sres) ? "True" : "False",
- (Long)(sr_isError(sres) ? sr_Err(sres) : sr_Res(sres)) );
+ /* Compute some Booleans indicating which range we're in. */
+ Bool outside_range,
+ in_setup_to_restart, // [1,2) in the .S files
+ at_restart, // [2] in the .S files
+ in_complete_to_committed, // [3,4) in the .S files
+ in_committed_to_finished; // [4,5) in the .S files
+# if defined(VGO_linux) || defined(VGO_aix5)
+ outside_range
+ = ip < ML_(blksys_setup) || ip >= ML_(blksys_finished);
+ in_setup_to_restart
+ = ip >= ML_(blksys_setup) && ip < ML_(blksys_restart);
+ at_restart
+ = ip == ML_(blksys_restart);
+ in_complete_to_committed
+ = ip >= ML_(blksys_complete) && ip < ML_(blksys_committed);
+ in_committed_to_finished
+ = ip >= ML_(blksys_committed) && ip < ML_(blksys_finished);
+# elif defined(VGO_darwin)
+ outside_range
+ = (ip < ML_(blksys_setup_MACH) || ip >= ML_(blksys_finished_MACH))
+ && (ip < ML_(blksys_setup_MDEP) || ip >= ML_(blksys_finished_MDEP))
+ && (ip < ML_(blksys_setup_UNIX) || ip >= ML_(blksys_finished_UNIX));
+ in_setup_to_restart
+ = (ip >= ML_(blksys_setup_MACH) && ip < ML_(blksys_restart_MACH))
+ || (ip >= ML_(blksys_setup_MDEP) && ip < ML_(blksys_restart_MDEP))
+ || (ip >= ML_(blksys_setup_UNIX) && ip < ML_(blksys_restart_UNIX));
+ at_restart
+ = (ip == ML_(blksys_restart_MACH))
+ || (ip == ML_(blksys_restart_MDEP))
+ || (ip == ML_(blksys_restart_UNIX));
+ in_complete_to_committed
+ = (ip >= ML_(blksys_complete_MACH) && ip < ML_(blksys_committed_MACH))
+ || (ip >= ML_(blksys_complete_MDEP) && ip < ML_(blksys_committed_MDEP))
+ || (ip >= ML_(blksys_complete_UNIX) && ip < ML_(blksys_committed_UNIX));
+ in_committed_to_finished
+ = (ip >= ML_(blksys_committed_MACH) && ip < ML_(blksys_finished_MACH))
+ || (ip >= ML_(blksys_committed_MDEP) && ip < ML_(blksys_finished_MDEP))
+ || (ip >= ML_(blksys_committed_UNIX) && ip < ML_(blksys_finished_UNIX));
+ /* Wasn't that just So Much Fun? Does your head hurt yet? Mine does. */
+# else
+# error "Unknown OS"
+# endif
+
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg,
+ "interrupted_syscall: tid=%d, ip=0x%llx, "
+ "restart=%s, sres.isErr=%s, sres.val=%lld",
+ (Int)tid,
+ (ULong)ip,
+ restart ? "True" : "False",
+ sr_isError(sres) ? "True" : "False",
+ (Long)(sr_isError(sres) ? sr_Err(sres) : sr_Res(sres)) );
+
vg_assert(VG_(is_valid_tid)(tid));
vg_assert(tid >= 1 && tid < VG_N_THREADS);
vg_assert(VG_(is_running_thread)(tid));
@@ -1972,10 +2050,10 @@
/* Figure out what the state of the syscall was by examining the
(real) IP at the time of the signal, and act accordingly. */
-
- if (ip < ML_(blksys_setup) || ip >= ML_(blksys_finished)) {
- VG_(printf)(" not in syscall (%#lx - %#lx)\n",
- ML_(blksys_setup), ML_(blksys_finished));
+ if (outside_range) {
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg,
+ " not in syscall at all: hmm, very suspicious" );
/* Looks like we weren't in a syscall at all. Hmm. */
vg_assert(sci->status.what != SsIdle);
return;
@@ -1986,22 +2064,29 @@
Hence: */
vg_assert(sci->status.what != SsIdle);
- if (ip >= ML_(blksys_setup) && ip < ML_(blksys_restart)) {
+ /* now, do one of four fixup actions, depending on where the IP has
+ got to. */
+
+ if (in_setup_to_restart) {
/* syscall hasn't even started; go around again */
- if (debug)
- VG_(printf)(" not started: restart\n");
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg, " not started: restarting");
vg_assert(sci->status.what == SsHandToKernel);
ML_(fixup_guest_state_to_restart_syscall)(th_regs);
}
else
- if (ip == ML_(blksys_restart)) {
+ if (at_restart) {
/* We're either about to run the syscall, or it was interrupted
and the kernel restarted it. Restart if asked, otherwise
EINTR it. */
- if (restart)
+ if (restart) {
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg, " at syscall instr: restarting");
ML_(fixup_guest_state_to_restart_syscall)(th_regs);
- else {
+ } else {
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg, " at syscall instr: returning EINTR");
canonical = convert_SysRes_to_SyscallStatus(
VG_(mk_SysRes_Error)( VKI_EINTR )
);
@@ -2013,12 +2098,13 @@
}
else
- if (ip >= ML_(blksys_complete) && ip < ML_(blksys_committed)) {
+ if (in_complete_to_committed) {
/* Syscall complete, but result hasn't been written back yet.
Write the SysRes we were supplied with back to the guest
state. */
- if (debug)
- VG_(printf)(" completed\n");
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg,
+ " completed, but uncommitted: committing");
canonical = convert_SysRes_to_SyscallStatus( sres );
if (!(sci->flags & SfNoWriteResult))
putSyscallStatusIntoGuestState( tid, &canonical, &th_regs->vex );
@@ -2026,13 +2112,14 @@
VG_(post_syscall)(tid);
}
- else
- if (ip >= ML_(blksys_committed) && ip < ML_(blksys_finished)) {
+ else
+ if (in_committed_to_finished) {
/* Result committed, but the signal mask has not been restored;
we expect our caller (the signal handler) will have fixed
this up. */
- if (debug)
- VG_(printf)(" all done\n");
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg,
+ " completed and committed: nothing to do");
VG_(post_syscall)(tid);
}
Modified: branches/DARWIN/coregrind/pub_core_syswrap.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_syswrap.h 2009-03-19 22:06:54 UTC (rev 9463)
+++ branches/DARWIN/coregrind/pub_core_syswrap.h 2009-03-19 22:46:58 UTC (rev 9464)
@@ -51,7 +51,6 @@
extern void VG_(fixup_guest_state_after_syscall_interrupted)(
ThreadId tid,
Addr ip,
- UWord sysnum,
SysRes sysret,
Bool restart
);
|
|
From: <sv...@va...> - 2009-03-19 22:21:49
|
Author: sewardj
Date: 2009-03-19 22:21:40 +0000 (Thu, 19 Mar 2009)
New Revision: 1886
Log:
In order to make it possible for Valgrind to restart client syscalls
that have been interrupted by signals, on Darwin, generalise an idea
which first emerged in the guest ppc32/64 stuff, in order to solve the
same problem on AIX.
Idea is: make all guests have a pseudo-register "IP_AT_SYSCALL", which
records the address of the most recently executed system call
instruction. Then, to back up the guest over the most recent syscall,
simply make its program counter equal to this value. This idea
already existing in the for ppc32/64 guests, but the register was
called "CIA_AT_SC".
Currently is not set in guest-amd64.
This commit will break the Valgrind svn trunk (temporarily).
Modified:
trunk/priv/guest-amd64/ghelpers.c
trunk/priv/guest-ppc/ghelpers.c
trunk/priv/guest-ppc/toIR.c
trunk/priv/guest-x86/ghelpers.c
trunk/priv/guest-x86/toIR.c
trunk/pub/libvex.h
trunk/pub/libvex_guest_amd64.h
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
trunk/pub/libvex_guest_x86.h
trunk/pub/libvex_ir.h
Modified: trunk/priv/guest-amd64/ghelpers.c
===================================================================
--- trunk/priv/guest-amd64/ghelpers.c 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/priv/guest-amd64/ghelpers.c 2009-03-19 22:21:40 UTC (rev 1886)
@@ -2315,6 +2315,7 @@
vex_state->guest_SC_CLASS = 0;
vex_state->guest_GS_0x60 = 0;
+ vex_state->guest_IP_AT_SYSCALL = 0;
vex_state->padding = 0;
}
@@ -2383,7 +2384,7 @@
/* Describe any sections to be regarded by Memcheck as
'always-defined'. */
- .n_alwaysDefd = 14,
+ .n_alwaysDefd = 16,
/* flags thunk: OP and NDEP are always defd, whereas DEP1
and DEP2 have to be tracked. See detailed comment in
@@ -2410,7 +2411,9 @@
/* 10 */ ALWAYSDEFD(guest_EMWARN),
/* 11 */ ALWAYSDEFD(guest_SSEROUND),
/* 12 */ ALWAYSDEFD(guest_TISTART),
- /* 13 */ ALWAYSDEFD(guest_TILEN)
+ /* 13 */ ALWAYSDEFD(guest_TILEN),
+ /* 14 */ ALWAYSDEFD(guest_SC_CLASS),
+ /* 15 */ ALWAYSDEFD(guest_IP_AT_SYSCALL)
}
};
Modified: trunk/priv/guest-ppc/ghelpers.c
===================================================================
--- trunk/priv/guest-ppc/ghelpers.c 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/priv/guest-ppc/ghelpers.c 2009-03-19 22:21:40 UTC (rev 1886)
@@ -489,7 +489,7 @@
for (i = 0; i < VEX_GUEST_PPC32_REDIR_STACK_SIZE; i++)
vex_state->guest_REDIR_STACK[i] = 0;
- vex_state->guest_CIA_AT_SC = 0;
+ vex_state->guest_IP_AT_SYSCALL = 0;
vex_state->guest_SPRG3_RO = 0;
}
@@ -648,7 +648,7 @@
for (i = 0; i < VEX_GUEST_PPC64_REDIR_STACK_SIZE; i++)
vex_state->guest_REDIR_STACK[i] = 0;
- vex_state->guest_CIA_AT_SC = 0;
+ vex_state->guest_IP_AT_SYSCALL = 0;
vex_state->guest_SPRG3_RO = 0;
}
@@ -781,7 +781,7 @@
/* 8 */ ALWAYSDEFD32(guest_NRADDR_GPR2),
/* 9 */ ALWAYSDEFD32(guest_REDIR_SP),
/* 10 */ ALWAYSDEFD32(guest_REDIR_STACK),
- /* 11 */ ALWAYSDEFD32(guest_CIA_AT_SC)
+ /* 11 */ ALWAYSDEFD32(guest_IP_AT_SYSCALL)
}
};
@@ -823,7 +823,7 @@
/* 8 */ ALWAYSDEFD64(guest_NRADDR_GPR2),
/* 9 */ ALWAYSDEFD64(guest_REDIR_SP),
/* 10 */ ALWAYSDEFD64(guest_REDIR_STACK),
- /* 11 */ ALWAYSDEFD64(guest_CIA_AT_SC)
+ /* 11 */ ALWAYSDEFD64(guest_IP_AT_SYSCALL)
}
};
Modified: trunk/priv/guest-ppc/toIR.c
===================================================================
--- trunk/priv/guest-ppc/toIR.c 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/priv/guest-ppc/toIR.c 2009-03-19 22:21:40 UTC (rev 1886)
@@ -218,7 +218,7 @@
offsetof(VexGuestPPC32State, _x))
#define OFFB_CIA offsetofPPCGuestState(guest_CIA)
-#define OFFB_CIA_AT_SC offsetofPPCGuestState(guest_CIA_AT_SC)
+#define OFFB_IP_AT_SYSCALL offsetofPPCGuestState(guest_IP_AT_SYSCALL)
#define OFFB_SPRG3_RO offsetofPPCGuestState(guest_SPRG3_RO)
#define OFFB_LR offsetofPPCGuestState(guest_LR)
#define OFFB_CTR offsetofPPCGuestState(guest_CTR)
@@ -327,7 +327,7 @@
PPC_GST_TISTART,// For icbi: start of area to invalidate
PPC_GST_TILEN, // For icbi: length of area to invalidate
PPC_GST_RESVN, // For lwarx/stwcx.
- PPC_GST_CIA_AT_SC, // the CIA of the most recently executed SC insn
+ PPC_GST_IP_AT_SYSCALL, // the CIA of the most recently executed SC insn
PPC_GST_SPRG3_RO, // SPRG3
PPC_GST_MAX
} PPC_GST;
@@ -2208,9 +2208,9 @@
IRType ty_src = typeOfIRExpr(irsb->tyenv,src );
vassert( reg < PPC_GST_MAX );
switch (reg) {
- case PPC_GST_CIA_AT_SC:
+ case PPC_GST_IP_AT_SYSCALL:
vassert( ty_src == ty );
- stmt( IRStmt_Put( OFFB_CIA_AT_SC, src ) );
+ stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL, src ) );
break;
case PPC_GST_CIA:
vassert( ty_src == ty );
@@ -4776,10 +4776,10 @@
// sc (System Call, PPC32 p504)
DIP("sc\n");
- /* Copy CIA into the CIA_AT_SC pseudo-register, so that on AIX
+ /* Copy CIA into the IP_AT_SYSCALL pseudo-register, so that on AIX
Valgrind can back the guest up to this instruction if it needs
to restart the syscall. */
- putGST( PPC_GST_CIA_AT_SC, getGST( PPC_GST_CIA ) );
+ putGST( PPC_GST_IP_AT_SYSCALL, getGST( PPC_GST_CIA ) );
/* It's important that all ArchRegs carry their up-to-date value
at this point. So we declare an end-of-block here, which
Modified: trunk/priv/guest-x86/ghelpers.c
===================================================================
--- trunk/priv/guest-x86/ghelpers.c 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/priv/guest-x86/ghelpers.c 2009-03-19 22:21:40 UTC (rev 1886)
@@ -2635,6 +2635,11 @@
vex_state->guest_NRADDR = 0;
vex_state->guest_SC_CLASS = 0;
+ vex_state->guest_IP_AT_SYSCALL = 0;
+
+ vex_state->padding1 = 0;
+ vex_state->padding2 = 0;
+ vex_state->padding3 = 0;
}
@@ -2702,7 +2707,7 @@
/* Describe any sections to be regarded by Memcheck as
'always-defined'. */
- .n_alwaysDefd = 22,
+ .n_alwaysDefd = 24,
/* flags thunk: OP and NDEP are always defd, whereas DEP1
and DEP2 have to be tracked. See detailed comment in
@@ -2729,7 +2734,9 @@
/* 18 */ ALWAYSDEFD(guest_EMWARN),
/* 19 */ ALWAYSDEFD(guest_SSEROUND),
/* 20 */ ALWAYSDEFD(guest_TISTART),
- /* 21 */ ALWAYSDEFD(guest_TILEN)
+ /* 21 */ ALWAYSDEFD(guest_TILEN),
+ /* 22 */ ALWAYSDEFD(guest_SC_CLASS),
+ /* 23 */ ALWAYSDEFD(guest_IP_AT_SYSCALL)
}
};
Modified: trunk/priv/guest-x86/toIR.c
===================================================================
--- trunk/priv/guest-x86/toIR.c 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/priv/guest-x86/toIR.c 2009-03-19 22:21:40 UTC (rev 1886)
@@ -254,7 +254,9 @@
#define OFFB_TILEN offsetof(VexGuestX86State,guest_TILEN)
#define OFFB_NRADDR offsetof(VexGuestX86State,guest_NRADDR)
+#define OFFB_IP_AT_SYSCALL offsetof(VexGuestX86State,guest_IP_AT_SYSCALL)
+
/*------------------------------------------------------------*/
/*--- Helper bits and pieces for deconstructing the ---*/
/*--- x86 insn stream. ---*/
@@ -12592,20 +12594,28 @@
}
/* Handle int $0x80 (linux syscalls), int $0x81 and $0x82
- (darwin syscalls). */
+ (darwin syscalls). As part of this, note where we are, so we
+ can back up the guest to this point if the syscall needs to
+ be restarted. */
if (d32 == 0x80) {
+ stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
+ mkU32(guest_EIP_curr_instr) ) );
jmp_lit(Ijk_Sys_int128,((Addr32)guest_EIP_bbstart)+delta);
dres.whatNext = Dis_StopHere;
DIP("int $0x80\n");
break;
}
if (d32 == 0x81) {
+ stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
+ mkU32(guest_EIP_curr_instr) ) );
jmp_lit(Ijk_Sys_int129,((Addr32)guest_EIP_bbstart)+delta);
dres.whatNext = Dis_StopHere;
DIP("int $0x81\n");
break;
}
if (d32 == 0x82) {
+ stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
+ mkU32(guest_EIP_curr_instr) ) );
jmp_lit(Ijk_Sys_int130,((Addr32)guest_EIP_bbstart)+delta);
dres.whatNext = Dis_StopHere;
DIP("int $0x82\n");
@@ -14275,7 +14285,12 @@
before resuming execution. If that doesn't happen, the
thread will jump to address zero, which is probably
fatal.
- */
+ */
+
+ /* Note where we are, so we can back up the guest to this
+ point if the syscall needs to be restarted. */
+ stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
+ mkU32(guest_EIP_curr_instr) ) );
jmp_lit(Ijk_Sys_sysenter, 0/*bogus next EIP value*/);
dres.whatNext = Dis_StopHere;
DIP("sysenter");
Modified: trunk/pub/libvex.h
===================================================================
--- trunk/pub/libvex.h 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/pub/libvex.h 2009-03-19 22:21:40 UTC (rev 1886)
@@ -329,7 +329,7 @@
/* The max number of guest state chunks which we can describe as
always defined (for the benefit of Memcheck). */
-#define VEXGLO_N_ALWAYSDEFD 22
+#define VEXGLO_N_ALWAYSDEFD 24
typedef
struct {
Modified: trunk/pub/libvex_guest_amd64.h
===================================================================
--- trunk/pub/libvex_guest_amd64.h 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/pub/libvex_guest_amd64.h 2009-03-19 22:21:40 UTC (rev 1886)
@@ -161,6 +161,12 @@
of the %fs-zero hack for amd64-linux). */
ULong guest_GS_0x60;
+ /* Needed for Darwin (but mandated for all guest architectures):
+ RIP at the last syscall insn (int 0x80/81/82, sysenter,
+ syscall). Used when backing up to restart a syscall that has
+ been interrupted by a signal. */
+ ULong guest_IP_AT_SYSCALL;
+
/* Padding to make it have an 16-aligned size */
ULong padding;
}
Modified: trunk/pub/libvex_guest_ppc32.h
===================================================================
--- trunk/pub/libvex_guest_ppc32.h 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/pub/libvex_guest_ppc32.h 2009-03-19 22:21:40 UTC (rev 1886)
@@ -228,9 +228,10 @@
/* 964 */ UInt guest_REDIR_SP;
/* 968 */ UInt guest_REDIR_STACK[VEX_GUEST_PPC32_REDIR_STACK_SIZE];
- /* Needed for AIX: CIA at the last SC insn. Used when backing up
- to restart a syscall that has been interrupted by a signal. */
- /* ??? */ UInt guest_CIA_AT_SC;
+ /* Needed for AIX (but mandated for all guest architectures):
+ CIA at the last SC insn. Used when backing up to restart a
+ syscall that has been interrupted by a signal. */
+ /* ??? */ UInt guest_IP_AT_SYSCALL;
/* SPRG3, which AIUI is readonly in user space. Needed for
threading on AIX. */
Modified: trunk/pub/libvex_guest_ppc64.h
===================================================================
--- trunk/pub/libvex_guest_ppc64.h 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/pub/libvex_guest_ppc64.h 2009-03-19 22:21:40 UTC (rev 1886)
@@ -271,7 +271,7 @@
/* Needed for AIX: CIA at the last SC insn. Used when backing up
to restart a syscall that has been interrupted by a signal. */
- /* 1392 */ ULong guest_CIA_AT_SC;
+ /* 1392 */ ULong guest_IP_AT_SYSCALL;
/* SPRG3, which AIUI is readonly in user space. Needed for
threading on AIX. */
Modified: trunk/pub/libvex_guest_x86.h
===================================================================
--- trunk/pub/libvex_guest_x86.h 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/pub/libvex_guest_x86.h 2009-03-19 22:21:40 UTC (rev 1886)
@@ -223,8 +223,16 @@
/* Used for Darwin syscall dispatching. */
UInt guest_SC_CLASS;
+ /* Needed for Darwin (but mandated for all guest architectures):
+ EIP at the last syscall insn (int 0x80/81/82, sysenter,
+ syscall). Used when backing up to restart a syscall that has
+ been interrupted by a signal. */
+ UInt guest_IP_AT_SYSCALL;
+
/* Padding to make it have an 16-aligned size */
- /* UInt padding; */
+ UInt padding1;
+ UInt padding2;
+ UInt padding3;
}
VexGuestX86State;
Modified: trunk/pub/libvex_ir.h
===================================================================
--- trunk/pub/libvex_ir.h 2009-03-02 09:57:11 UTC (rev 1885)
+++ trunk/pub/libvex_ir.h 2009-03-19 22:21:40 UTC (rev 1886)
@@ -1196,6 +1196,13 @@
In the case of Ijk_EmFail, the exit is fatal (Vex-generated code
cannot continue) and so the jump destination can be anything.
+
+ Re Ijk_Sys_ (syscall jumps): the guest state must have a
+ pseudo-register guest_IP_AT_SYSCALL, which is the size of a guest
+ word. Front ends should set this to be the IP at the most recently
+ executed kernel-entering (system call) instruction. This makes it
+ very much easier (viz, actually possible at all) to back up the
+ guest to restart a syscall that has been interrupted by a signal.
*/
typedef
enum {
|
|
From: <sv...@va...> - 2009-03-19 22:07:02
|
Author: sewardj
Date: 2009-03-19 22:06:54 +0000 (Thu, 19 Mar 2009)
New Revision: 9463
Log:
Update expected output following the removal of the UX64 syscall class
in r9461.
Modified:
branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp
Modified: branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp
===================================================================
--- branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp 2009-03-19 12:59:51 UTC (rev 9462)
+++ branches/DARWIN/memcheck/tests/darwin/scalar.stderr.exp 2009-03-19 22:06:54 UTC (rev 9463)
@@ -137,7 +137,7 @@
-----------------------------------------------------
9999: 9999 1e
-----------------------------------------------------
-WARNING: unhandled syscall: 1660954383
+WARNING: unhandled syscall: 33564431
a.k.a.: 9999
You may be able to write your own handler.
Read the file README_MISSING_SYSCALL_OR_IOCTL.
|
Author: sewardj
Date: 2009-03-19 12:59:51 +0000 (Thu, 19 Mar 2009)
New Revision: 9462
Log:
Un-break x86-linux and amd64-linux following r9461 (abstractification
of SysRes, essentially)
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/DARWIN/coregrind/m_coredump/coredump-elf.c
branches/DARWIN/coregrind/m_debuginfo/readelf.c
branches/DARWIN/coregrind/m_initimg/initimg-linux.c
branches/DARWIN/coregrind/m_libcproc.c
branches/DARWIN/coregrind/m_libcsignal.c
branches/DARWIN/coregrind/m_syscall.c
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c
branches/DARWIN/coregrind/m_ume/elf.c
branches/DARWIN/coregrind/pub_core_syscall.h
branches/DARWIN/include/pub_tool_basics.h
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -3098,18 +3098,18 @@
/* Read the initial memory mapping from the /proc filesystem. */
fd = ML_(am_open)( "/proc/self/maps", VKI_O_RDONLY, 0 );
- if (fd.isError)
+ if (sr_isError(fd))
ML_(am_barf)("can't open /proc/self/maps");
buf_n_tot = 0;
do {
- n_chunk = ML_(am_read)( fd.res, &procmap_buf[buf_n_tot],
+ n_chunk = ML_(am_read)( sr_Res(fd), &procmap_buf[buf_n_tot],
M_PROCMAP_BUF - buf_n_tot );
if (n_chunk >= 0)
buf_n_tot += n_chunk;
} while ( n_chunk > 0 && buf_n_tot < M_PROCMAP_BUF );
- ML_(am_close)(fd.res);
+ ML_(am_close)(sr_Res(fd));
if (buf_n_tot >= M_PROCMAP_BUF-5)
ML_(am_barf_toolow)("M_PROCMAP_BUF");
Modified: branches/DARWIN/coregrind/m_coredump/coredump-elf.c
===================================================================
--- branches/DARWIN/coregrind/m_coredump/coredump-elf.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_coredump/coredump-elf.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -332,12 +332,12 @@
sres = VG_(open)(buf,
VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_TRUNC,
VKI_S_IRUSR|VKI_S_IWUSR);
- if (!sres.isError) {
- core_fd = sres.res;
+ if (!sr_isError(sres)) {
+ core_fd = sr_Res(sres);
break;
}
- if (sres.isError && sres.err != VKI_EEXIST)
+ if (sr_isError(sres) && sr_Err(sres) != VKI_EEXIST)
return; /* can't create file */
}
Modified: branches/DARWIN/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/readelf.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_debuginfo/readelf.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -894,11 +894,11 @@
UInt calccrc;
fd = VG_(open)(name, VKI_O_RDONLY, 0);
- if (fd.isError)
+ if (sr_isError(fd))
return 0;
- if (VG_(fstat)(fd.res, &stat_buf) != 0) {
- VG_(close)(fd.res);
+ if (VG_(fstat)(sr_Res(fd), &stat_buf) != 0) {
+ VG_(close)(sr_Res(fd));
return 0;
}
@@ -908,24 +908,24 @@
*size = stat_buf.size;
sres = VG_(am_mmap_file_float_valgrind)
- ( *size, VKI_PROT_READ, fd.res, 0 );
+ ( *size, VKI_PROT_READ, sr_Res(fd), 0 );
- VG_(close)(fd.res);
+ VG_(close)(sr_Res(fd));
- if (sres.isError)
+ if (sr_isError(sres))
return 0;
- calccrc = calc_gnu_debuglink_crc32(0, (UChar*)sres.res, *size);
+ calccrc = calc_gnu_debuglink_crc32(0, (UChar*)sr_Res(sres), *size);
if (calccrc != crc) {
- SysRes res = VG_(am_munmap_valgrind)(sres.res, *size);
- vg_assert(!res.isError);
+ SysRes res = VG_(am_munmap_valgrind)(sr_Res(sres), *size);
+ vg_assert(!sr_isError(res));
if (VG_(clo_verbosity) > 1)
VG_(message)(Vg_DebugMsg,
".. CRC mismatch (computed %08x wanted %08x)", calccrc, crc);
return 0;
}
- return sres.res;
+ return sr_Res(sres);
}
/*
@@ -1099,32 +1099,32 @@
thereafter; it is only aboard transiently. */
fd = VG_(open)(di->filename, VKI_O_RDONLY, 0);
- if (fd.isError) {
+ if (sr_isError(fd)) {
ML_(symerr)(di, True, "Can't open .so/.exe to read symbols?!");
return False;
}
- { Long n_oimageLL = VG_(fsize)(fd.res);
+ { Long n_oimageLL = VG_(fsize)(sr_Res(fd));
if (n_oimageLL <= 0) {
ML_(symerr)(di, True, "Can't stat .so/.exe (to determine its size)?!");
- VG_(close)(fd.res);
+ VG_(close)(sr_Res(fd));
return False;
}
n_oimage = (UWord)(ULong)n_oimageLL;
}
sres = VG_(am_mmap_file_float_valgrind)
- ( n_oimage, VKI_PROT_READ, fd.res, 0 );
+ ( n_oimage, VKI_PROT_READ, sr_Res(fd), 0 );
- VG_(close)(fd.res);
+ VG_(close)(sr_Res(fd));
- if (sres.isError) {
+ if (sr_isError(sres)) {
VG_(message)(Vg_UserMsg, "warning: mmap failed on %s", di->filename );
VG_(message)(Vg_UserMsg, " no symbols or debug info loaded" );
return False;
}
- oimage = sres.res;
+ oimage = sr_Res(sres);
/* Check against wraparound. am_mmap_file_float_valgrind should
not produce a wrapped-around mapping. */
vg_assert(n_oimage > 0);
@@ -1947,10 +1947,10 @@
/* Last, but not least, heave the image(s) back overboard. */
if (dimage) {
m_res = VG_(am_munmap_valgrind) ( dimage, n_dimage );
- vg_assert(!m_res.isError);
+ vg_assert(!sr_isError(m_res));
}
m_res = VG_(am_munmap_valgrind) ( oimage, n_oimage );
- vg_assert(!m_res.isError);
+ vg_assert(!sr_isError(m_res));
return res;
}
}
Modified: branches/DARWIN/coregrind/m_initimg/initimg-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_initimg/initimg-linux.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_initimg/initimg-linux.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -189,8 +189,8 @@
/* Get hold of a file descriptor which refers to the client
executable. This is needed for attaching to GDB. */
res = VG_(open)(exe_name, VKI_O_RDONLY, VKI_S_IRUSR);
- if (!res.isError)
- VG_(cl_exec_fd) = res.res;
+ if (!sr_isError(res))
+ VG_(cl_exec_fd) = sr_Res(res);
/* Copy necessary bits of 'info' that were filled in */
*client_ip = info->init_ip;
@@ -625,7 +625,7 @@
VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC
);
}
- if ((!ok) || res.isError) {
+ if ((!ok) || sr_isError(res)) {
/* Allocation of the stack failed. We have to stop. */
VG_(printf)("valgrind: "
"I failed to allocate space for the application's stack.\n");
@@ -636,7 +636,7 @@
}
vg_assert(ok);
- vg_assert(!res.isError);
+ vg_assert(!sr_isError(res));
}
/* ==================== create client stack ==================== */
@@ -866,8 +866,8 @@
anon_size,
VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC
);
- vg_assert(!sres.isError);
- vg_assert(sres.res == anon_start);
+ vg_assert(!sr_isError(sres));
+ vg_assert(sr_Res(sres) == anon_start);
}
Modified: branches/DARWIN/coregrind/m_libcproc.c
===================================================================
--- branches/DARWIN/coregrind/m_libcproc.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_libcproc.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -433,7 +433,7 @@
if (!sr_isError(res) && sr_Res(res) > 0) {
Char* s;
pid[sr_Res(res)] = '\0';
- sr_Res(res) = VG_(strtoll10)(pid, &s);
+ res = VG_(mk_SysRes_Success)( VG_(strtoll10)(pid, &s) );
if (*s != '\0') {
VG_(message)(Vg_DebugMsg,
"Warning: invalid file name linked to by /proc/self: %s", pid);
Modified: branches/DARWIN/coregrind/m_libcsignal.c
===================================================================
--- branches/DARWIN/coregrind/m_libcsignal.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_libcsignal.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -293,7 +293,7 @@
# if defined(__NR_tkill)
SysRes res = VG_(mk_SysRes_Error)(VKI_ENOSYS);
res = VG_(do_syscall2)(__NR_tkill, tid, signo);
- if (sr_isError(res) && res.err == VKI_ENOSYS)
+ if (sr_isError(res) && sr_Err(res) == VKI_ENOSYS)
res = VG_(do_syscall2)(__NR_kill, tid, signo);
return sr_isError(res) ? -1 : 0;
@@ -335,7 +335,7 @@
static const struct vki_timespec zero = { 0, 0 };
SysRes res = VG_(do_syscall4)(__NR_rt_sigtimedwait, (UWord)set, (UWord)info,
(UWord)&zero, sizeof(*set));
- return sr_isError(res) ? -1 : res.res;
+ return sr_isError(res) ? -1 : sr_Res(res);
}
/* ---------- sigtimedwait_zero: AIX5 ----------- */
Modified: branches/DARWIN/coregrind/m_syscall.c
===================================================================
--- branches/DARWIN/coregrind/m_syscall.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_syscall.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -60,29 +60,25 @@
safely test with -4095.
*/
-SysRes VG_(mk_SysRes_x86_linux) ( UInt val ) {
+SysRes VG_(mk_SysRes_x86_linux) ( Int val ) {
SysRes res;
- res.isError = val >= -4095 && val <= -1;
- if (res.isError) {
- res.err = -val;
- res.res = 0;
+ res._isError = val >= -4095 && val <= -1;
+ if (res._isError) {
+ res._val = (UInt)(-val);
} else {
- res.err = 0;
- res.res = val;
+ res._val = (UInt)val;
}
return res;
}
/* Similarly .. */
-SysRes VG_(mk_SysRes_amd64_linux) ( ULong val ) {
+SysRes VG_(mk_SysRes_amd64_linux) ( Long val ) {
SysRes res;
- res.isError = val >= -4095 && val <= -1;
- if (res.isError) {
- res.err = -val;
- res.res = 0;
+ res._isError = val >= -4095 && val <= -1;
+ if (res._isError) {
+ res._val = (ULong)(-val);
} else {
- res.err = 0;
- res.res = val;
+ res._val = (ULong)val;
}
return res;
}
@@ -91,43 +87,31 @@
/* Note this must be in the bottom bit of the second arg */
SysRes VG_(mk_SysRes_ppc32_linux) ( UInt val, UInt cr0so ) {
SysRes res;
- res.isError = (cr0so & 1) != 0;
- if (res.isError) {
- res.err = val;
- res.res = 0;
- } else {
- res.err = 0;
- res.res = val;
- }
+ res._isError = (cr0so & 1) != 0;
+ res._val = val;
return res;
}
/* As per ppc32 version, cr0.so must be in l.s.b. of 2nd arg */
SysRes VG_(mk_SysRes_ppc64_linux) ( ULong val, ULong cr0so ) {
SysRes res;
- res.isError = (cr0so & 1) != 0;
- if (res.isError) {
- res.err = val;
- res.res = 0;
- } else {
- res.err = 0;
- res.res = val;
- }
+ res._isError = (cr0so & 1) != 0;
+ res._val = val;
return res;
}
/* Generic constructors. */
SysRes VG_(mk_SysRes_Error) ( UWord err ) {
SysRes r;
- r._val = err;
r._isError = True;
+ r._val = err;
return r;
}
SysRes VG_(mk_SysRes_Success) ( UWord res ) {
SysRes r;
- r._val = res;
r._isError = False;
+ r._val = res;
return r;
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -297,7 +297,7 @@
VG_(sigprocmask)(VKI_SIG_SETMASK, &savedmask, NULL);
out:
- if (res.isError) {
+ if (sr_isError(res)) {
/* clone failed */
VG_(cleanup_thread)(&ctst->arch);
ctst->status = VgTs_Empty;
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -490,7 +490,7 @@
shrink_in_place:
{
SysRes sres = VG_(am_munmap_client)( &d, old_addr+new_len, old_len-new_len );
- if (sres.isError)
+ if (sr_isError(sres))
return sres;
VG_TRACK( die_mem_munmap, old_addr+new_len, old_len-new_len );
if (d)
@@ -779,12 +779,12 @@
SysRes f;
f = VG_(open)("/proc/self/fd", VKI_O_RDONLY, 0);
- if (f.isError) {
+ if (sr_isError(f)) {
do_hacky_preopened();
return;
}
- while ((ret = VG_(getdents)(f.res, &d, sizeof(d))) != 0) {
+ while ((ret = VG_(getdents)(sr_Res(f), &d, sizeof(d))) != 0) {
if (ret == -1)
goto out;
@@ -792,7 +792,7 @@
Char* s;
Int fno = VG_(strtoll10)(d.d_name, &s);
if (*s == '\0') {
- if (fno != f.res)
+ if (fno != sr_Res(f))
if (VG_(clo_track_fds))
ML_(record_fd_open_named)(-1, fno);
} else {
@@ -801,11 +801,11 @@
}
}
- VG_(lseek)(f.res, d.d_off, VKI_SEEK_SET);
+ VG_(lseek)(sr_Res(f), d.d_off, VKI_SEEK_SET);
}
out:
- VG_(close)(f.res);
+ VG_(close)(sr_Res(f));
#endif
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-linux.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -331,7 +331,7 @@
# error Unknown platform
#endif
- if (!res.isError && res.res == 0) {
+ if (!sr_isError(res) && sr_Res(res) == 0) {
/* child */
VG_(do_atfork_child)(tid);
@@ -346,13 +346,13 @@
VG_(clo_log_fd) = -1;
}
else
- if (!res.isError && res.res > 0) {
+ if (!sr_isError(res) && sr_Res(res) > 0) {
/* parent */
VG_(do_atfork_parent)(tid);
if (VG_(clo_trace_syscalls))
VG_(printf)(" clone(fork): process %d created child %ld\n",
- VG_(getpid)(), res.res);
+ VG_(getpid)(), sr_Res(res));
/* restore signal mask */
VG_(sigprocmask)(VKI_SIG_SETMASK, &fork_saved_mask, NULL);
@@ -1744,9 +1744,9 @@
if (result == -1) {
res = VG_(open)("/proc/sys/kernel/osrelease", 0, 0);
- if (res.isError)
+ if (sr_isError(res))
return False;
- fd = res.res;
+ fd = sr_Res(res);
read = VG_(read)(fd, release, sizeof(release) - 1);
vg_assert(read >= 0);
release[read] = 0;
@@ -2735,8 +2735,8 @@
|| VG_(strcmp)((Char *)ARG2, "/proc/self/cmdline") == 0)) {
sres = VG_(dup)( VG_(cl_cmdline_fd) );
SET_STATUS_from_SysRes( sres );
- if (!sres.isError) {
- OffT off = VG_(lseek)( sres.res, 0, VKI_SEEK_SET );
+ if (!sr_isError(sres)) {
+ OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET );
if (off < 0)
SET_STATUS_Failure( VKI_EMFILE );
}
@@ -5162,7 +5162,7 @@
{
Addr optval_p = arg3;
Addr optlen_p = arg4;
- vg_assert(!res.isError); /* guaranteed by caller */
+ vg_assert(!sr_isError(res)); /* guaranteed by caller */
if (optval_p != (Addr)NULL) {
ML_(buf_and_len_post_check) ( tid, res, optval_p, optlen_p,
"socketcall.getsockopt(optlen_out)" );
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -380,12 +380,18 @@
static
Bool eq_SyscallStatus ( SyscallStatus* s1, SyscallStatus* s2 )
{
- // return s1->what == s2->what && sr_EQ( s1->sres, s2->sres );
- if (s1->what == s2->what && sr_EQ( s1->sres, s2->sres )) return True;
- vg_assert(s1->what == s2->what);
- VG_(printf)("{%lu %lu %u}\n", s1->sres._wLO, s1->sres._wHI, s1->sres._mode);
- VG_(printf)("{%lu %lu %u}\n", s2->sres._wLO, s2->sres._wHI, s2->sres._mode);
- vg_assert(0);
+ /* was: return s1->what == s2->what && sr_EQ( s1->sres, s2->sres ); */
+ if (s1->what == s2->what && sr_EQ( s1->sres, s2->sres ))
+ return True;
+# if defined(VGO_darwin)
+ /* Darwin-specific debugging guff */
+ vg_assert(s1->what == s2->what);
+ VG_(printf)("eq_SyscallStatus:\n");
+ VG_(printf)(" {%lu %lu %u}\n", s1->sres._wLO, s1->sres._wHI, s1->sres._mode);
+ VG_(printf)(" {%lu %lu %u}\n", s2->sres._wLO, s2->sres._wHI, s2->sres._mode);
+ vg_assert(0);
+# endif
+ return False;
}
/* Convert between SysRes and SyscallStatus, to the extent possible. */
@@ -842,13 +848,13 @@
# if defined(VGP_x86_linux)
VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla;
vg_assert(canonical->what == SsComplete);
- if (canonical->sres.isError) {
+ if (sr_isError(canonical->sres)) {
/* This isn't exactly right, in that really a Failure with res
not in the range 1 .. 4095 is unrepresentable in the
Linux-x86 scheme. Oh well. */
- gst->guest_EAX = - (Int)canonical->sres.err;
+ gst->guest_EAX = - (Int)sr_Err(canonical->sres);
} else {
- gst->guest_EAX = canonical->sres.res;
+ gst->guest_EAX = sr_Res(canonical->sres);
}
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
OFFSET_x86_EAX, sizeof(UWord) );
@@ -856,13 +862,13 @@
# elif defined(VGP_amd64_linux)
VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla;
vg_assert(canonical->what == SsComplete);
- if (canonical->sres.isError) {
+ if (sr_isError(canonical->sres)) {
/* This isn't exactly right, in that really a Failure with res
not in the range 1 .. 4095 is unrepresentable in the
Linux-x86 scheme. Oh well. */
- gst->guest_RAX = - (Long)canonical->sres.err;
+ gst->guest_RAX = - (Long)sr_Err(canonical->sres);
} else {
- gst->guest_RAX = canonical->sres.res;
+ gst->guest_RAX = sr_Res(canonical->sres);
}
VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
OFFSET_amd64_RAX, sizeof(UWord) );
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-linux.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -299,7 +299,7 @@
ptst->arch.vex.guest_ESP,
ctst->arch.vex.guest_FS, ctst->arch.vex.guest_GS);
res = sys_set_thread_area(ctid, tlsinfo);
- if (res.isError)
+ if (sr_isError(res))
goto out;
}
@@ -318,7 +318,7 @@
VG_(sigprocmask)(VKI_SIG_SETMASK, &savedmask, NULL);
out:
- if (res.isError) {
+ if (sr_isError(res)) {
/* clone failed */
VG_(cleanup_thread)(&ctst->arch);
ctst->status = VgTs_Empty;
Modified: branches/DARWIN/coregrind/m_ume/elf.c
===================================================================
--- branches/DARWIN/coregrind/m_ume/elf.c 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/m_ume/elf.c 2009-03-19 12:59:51 UTC (rev 9462)
@@ -74,12 +74,12 @@
static void check_mmap(SysRes res, Addr base, SizeT len)
{
- if (res.isError) {
+ if (sr_isError(res)) {
VG_(printf)("valgrind: mmap(0x%llx, %lld) failed in UME "
"with error %lu (%s).\n",
(ULong)base, (Long)len,
- res.err, VG_(strerror)(res.err) );
- if (res.err == VKI_EINVAL) {
+ sr_Err(res), VG_(strerror)(sr_Err(res)) );
+ if (sr_Err(res) == VKI_EINVAL) {
VG_(printf)("valgrind: this can be caused by executables with "
"very large text, data or bss segments.\n");
}
@@ -102,9 +102,9 @@
e->fd = fd;
sres = VG_(pread)(fd, &e->e, sizeof(e->e), 0);
- if (sres.isError || sres.res != sizeof(e->e)) {
+ if (sr_isError(sres) || sr_Res(sres) != sizeof(e->e)) {
VG_(printf)("valgrind: %s: can't read ELF header: %s\n",
- filename, VG_(strerror)(sres.err));
+ filename, VG_(strerror)(sr_Err(sres)));
goto bad;
}
@@ -142,9 +142,9 @@
vg_assert(e->p);
sres = VG_(pread)(fd, e->p, phsz, e->e.e_phoff);
- if (sres.isError || sres.res != phsz) {
+ if (sr_isError(sres) || sr_Res(sres) != phsz) {
VG_(printf)("valgrind: can't read phdr: %s\n",
- VG_(strerror)(sres.err));
+ VG_(strerror)(sr_Err(sres)));
VG_(free)(e->p);
goto bad;
}
@@ -375,11 +375,11 @@
buf[ph->p_filesz] = '\0';
sres = VG_(open)(buf, VKI_O_RDONLY, 0);
- if (sres.isError) {
+ if (sr_isError(sres)) {
VG_(printf)("valgrind: m_ume.c: can't open interpreter\n");
VG_(exit)(1);
}
- intfd = sres.res;
+ intfd = sr_Res(sres);
interp = readelf(intfd, buf);
if (interp == NULL) {
Modified: branches/DARWIN/coregrind/pub_core_syscall.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_syscall.h 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/coregrind/pub_core_syscall.h 2009-03-19 12:59:51 UTC (rev 9462)
@@ -69,8 +69,8 @@
#define vgPlain_do_syscall8(s,a,b,c,d,e,f,g,h) VG_(do_syscall)((s),(a),(b),\
(c),(d),(e),(f),(g),(h))
-extern SysRes VG_(mk_SysRes_x86_linux) ( UInt val );
-extern SysRes VG_(mk_SysRes_amd64_linux) ( ULong val );
+extern SysRes VG_(mk_SysRes_x86_linux) ( Int val );
+extern SysRes VG_(mk_SysRes_amd64_linux) ( Long val );
extern SysRes VG_(mk_SysRes_ppc32_linux) ( UInt val, UInt cr0so );
extern SysRes VG_(mk_SysRes_ppc64_linux) ( ULong val, ULong cr0so );
extern SysRes VG_(mk_SysRes_ppc32_aix5) ( UInt val, UInt err );
Modified: branches/DARWIN/include/pub_tool_basics.h
===================================================================
--- branches/DARWIN/include/pub_tool_basics.h 2009-03-19 09:39:52 UTC (rev 9461)
+++ branches/DARWIN/include/pub_tool_basics.h 2009-03-19 12:59:51 UTC (rev 9462)
@@ -191,7 +191,36 @@
# error "Unknown OS"
#endif
+
+/* ---- And now some basic accessor functions for it. ---- */
+
+#if defined(VGO_linux)
+
static inline Bool sr_isError ( SysRes sr ) {
+ return sr._isError;
+}
+static inline UWord sr_Res ( SysRes sr ) {
+ return sr._isError ? 0 : sr._val;
+}
+static inline UWord sr_ResHI ( SysRes sr ) {
+ return 0;
+}
+static inline UWord sr_Err ( SysRes sr ) {
+ return sr._isError ? sr._val : 0;
+}
+static inline Bool sr_EQ ( SysRes sr1, SysRes sr2 ) {
+ return sr1._val == sr2._val
+ && ((sr1._isError && sr2._isError)
+ || (!sr1._isError && !sr2._isError));
+}
+
+#elif defined(VGO_aix5)
+# error "need to define SysRes accessors on AIX5 (copy from 3.4.1 sources)"
+
+
+#elif defined(VGO_darwin)
+
+static inline Bool sr_isError ( SysRes sr ) {
switch (sr._mode) {
case SysRes_UNIX_ERR: return True;
default: return False;
@@ -227,7 +256,11 @@
&& sr1._wLO == sr2._wLO && sr1._wHI == sr2._wHI;
}
+#else
+# error "Unknown OS"
+#endif
+
/* ---------------------------------------------------------------------
Miscellaneous (word size, endianness, regparmness, stringification)
------------------------------------------------------------------ */
|
Author: sewardj
Date: 2009-03-19 09:39:52 +0000 (Thu, 19 Mar 2009)
New Revision: 9461
Log:
A big commit. The original aim was merely the following:
* coregrind/m_syswrap/syscall-x86-darwin.S: apply correct signal
mask when doing a syscall on behalf of the client. This gets
us some of the way to correct handling of signals that are
delivered to threads that are blocked in syscalls.
This causes 3 new regtest failures:
memcheck/tests/darwin/scalar
none/tests/coolo_sigaction
none/tests/syscall-restart2
because they are now interrupted in syscalls, but V then
asserts while trying to do the post-syscall-interrupted
guest-state fixup. To be fixed.
However, as a result of the sigmask changes, the following much
larger changes also happened:
* Make the type SysRes (which holds return values from system
calls) into an abstract type, and use accessor functions to
deal with it (almost) everywhere. This is something that
should have been done long ago. It makes it almost trivial to
change the representation of a SysRes.
As a result of this, create implementations of SysRes
specialised for Linux, AIX and Darwin. This means we don't
have to try any more to use the same representation to carry
the different semantics of the Linux, AIX and Darwin syscall
return values.
* Remove all mention of the Darwin syscall class UX64. I believe
this to be mythical: the standard UNIX syscall on Darwin always
returns a doubleword result, both in 32- and 64-bit modes.
This change appears to have no ill effects on the various
programs I have tried.
* Be clearer about the syscall call and return conventions in
Darwin, and add this info in comments.
* Major tidying up, mostly to do with #ifdeffery, in m_libcproc.c
(including removal of VG_(popen_read) and VG_(pclose), they are
unused) and in m_libcfile.c.
Modified:
branches/DARWIN/cachegrind/cg_main.c
branches/DARWIN/callgrind/command.c
branches/DARWIN/callgrind/dump.c
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-common.c
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/DARWIN/coregrind/m_commandline.c
branches/DARWIN/coregrind/m_debuginfo/debuginfo.c
branches/DARWIN/coregrind/m_debuginfo/readmacho.c
branches/DARWIN/coregrind/m_errormgr.c
branches/DARWIN/coregrind/m_initimg/initimg-darwin.c
branches/DARWIN/coregrind/m_libcfile.c
branches/DARWIN/coregrind/m_libcproc.c
branches/DARWIN/coregrind/m_libcsignal.c
branches/DARWIN/coregrind/m_main.c
branches/DARWIN/coregrind/m_mallocfree.c
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/m_signals.c
branches/DARWIN/coregrind/m_syscall.c
branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S
branches/DARWIN/coregrind/m_syswrap/syscall-amd64-linux.S
branches/DARWIN/coregrind/m_syswrap/syscall-ppc32-aix5.S
branches/DARWIN/coregrind/m_syswrap/syscall-ppc32-linux.S
branches/DARWIN/coregrind/m_syswrap/syscall-ppc64-aix5.S
branches/DARWIN/coregrind/m_syswrap/syscall-ppc64-linux.S
branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
branches/DARWIN/coregrind/m_syswrap/syscall-x86-linux.S
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/m_transtab.c
branches/DARWIN/coregrind/m_ume/macho.c
branches/DARWIN/coregrind/m_ume/main.c
branches/DARWIN/coregrind/m_ume/script.c
branches/DARWIN/coregrind/m_vki.c
branches/DARWIN/coregrind/pub_core_libcfile.h
branches/DARWIN/coregrind/pub_core_libcproc.h
branches/DARWIN/coregrind/pub_core_syscall.h
branches/DARWIN/exp-ptrcheck/h_main.c
branches/DARWIN/include/pub_tool_basics.h
branches/DARWIN/include/pub_tool_libcproc.h
branches/DARWIN/include/vki/vki-darwin.h
branches/DARWIN/include/vki/vki-scnums-darwin.h
branches/DARWIN/massif/ms_main.c
[... diff too large to include ...]
|
|
From: <sv...@va...> - 2009-03-19 09:11:39
|
Author: sewardj Date: 2009-03-19 09:11:33 +0000 (Thu, 19 Mar 2009) New Revision: 9460 Log: Update, following a very long day of investigating the behavior of system call handling on Darwin. Modified: branches/DARWIN/docs/internals/Darwin-notes.txt Modified: branches/DARWIN/docs/internals/Darwin-notes.txt =================================================================== --- branches/DARWIN/docs/internals/Darwin-notes.txt 2009-03-17 19:57:04 UTC (rev 9459) +++ branches/DARWIN/docs/internals/Darwin-notes.txt 2009-03-19 09:11:33 UTC (rev 9460) @@ -13,6 +13,8 @@ "valgrind env" on Darwin and Linux. On the former there are settings VALGRIND_LIB and VALGRIND_LIB_INNER, but not for the former. + There's a suspicious-looking "#if defined(VGO_darwin)" in + VG_(env_remove_valgrind_env_stuff). Maybe related? * Cleanups: sort wrappers in syswrap-darwin.c and priv_syswrap-darwin.h alphabetically. Also, some aren't properly implemented -- check and @@ -33,6 +35,11 @@ * Cleanups (ALL PLATFORMS): m_signals.c: are the _MY_SIGRETURN assembly stubs actually necessary for anything? I don't know. +* Cleanups: check that changes to VG_(stat) and VG_(stat64) have + not broken 64-bit statting on 32-bit Linux + +* Cleanups: #if !HAVE_PROC in m_main (to do with /proc/<pid>/cmdline + -------- Urr. Nastyness. There seem to be 4 different syscall types on @@ -48,8 +55,25 @@ with the Linux or AIX ports. +m_main: relatedly, Darwin version does not collect/give out +initial debuginfo handles; hence ptrcheck won't work + + m_main: Darwin port relies on blocking out big sections of address space with mmap at startup. We know from history that this is a bad idea. (It's also really slow on 64-bit builds, taking 3--4 seconds.) Also, startup is not done on the interim startup stack -- why not? + +VG_(post_syscall): contains important-looking code that is #if 0'd +out. Said code does VG_TRACK( post_reg_write). Needs looking into. + + +VG_(di_notify_mmap): Linux version is also used for Darwin, and +contains some ifdeffery. Clean up. + + +Get rid of priv_types_n_macros.h: RES2, getRES2, etc + + +PRE(sys_fork), #ifdeffery |
|
From: Bart V. A. <bar...@gm...> - 2009-03-19 08:21:18
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) started at 2009-03-19 02:00:01 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 407 tests, 36 stderr failures, 9 stdout failures, 0 post failures == exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) helgrind/tests/hg05_race2 (stderr) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/linux/mremap (stderr) none/tests/linux/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) |
|
From: Windows <win...@ya...> - 2009-03-19 08:04:27
|
hi all,I am a new comer to Valgrind.
Being interested in the translate modul of Valgrind. I need to fast locate the interface of Valgrind and the other tools, so I can print the translated code and go deep into it.
anyone can help? thanks.
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/ |
|
From: Tom H. <th...@cy...> - 2009-03-19 04:20:39
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-03-19 03:20:10 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 487 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-03-19 04:10:20
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-03-19 03:05:11 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 478 tests, 4 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) |
|
From: Tom H. <th...@cy...> - 2009-03-19 03:47:46
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-03-19 03:10:07 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 484 tests, 4 stderr failures, 1 stdout failure, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) none/tests/linux/mremap2 (stdout) |