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
(5) |
2
(5) |
|
3
(5) |
4
(6) |
5
(6) |
6
(10) |
7
(10) |
8
(10) |
9
(10) |
|
10
(6) |
11
(6) |
12
(8) |
13
(33) |
14
(19) |
15
(6) |
16
(15) |
|
17
(8) |
18
(29) |
19
(23) |
20
(20) |
21
(8) |
22
(6) |
23
(6) |
|
24
(6) |
25
(22) |
26
(21) |
27
(9) |
28
(21) |
29
(11) |
30
(7) |
|
31
(16) |
|
|
|
|
|
|
|
From: Tom H. <th...@cy...> - 2004-10-18 23:03:28
|
CVS commit by thughes:
Really fix statically initialised read-write locks this time...
BUG: 91604
M +1 -1 vg_libpthread.c 1.172
--- valgrind/coregrind/vg_libpthread.c #1.171:1.172
@@ -3064,5 +3064,5 @@ static vg_rwlock_t* rw_lookup ( pthread_
if (vg_orig->__vg_rw_writer == NULL)
- rwl = rw_new ((pthread_rwlock_t*)orig);
+ rwl = rw_new ((pthread_rwlock_t*)vg_orig);
else if (((Addr)vg_orig->__vg_rw_writer ^ RWLOCK_CHECK_MAGIC) == (Addr)vg_orig->__vg_rw_read_waiting)
rwl = vg_orig->__vg_rw_writer;
|
|
From: Tom H. <th...@cy...> - 2004-10-18 18:56:28
|
CVS commit by thughes:
Use tgkill instead of tkill if it is available. This is the newer and
safer kernel interface to signalling a particular thread and it ensures
you can only send a signal to one of your own threads.
M +6 -1 vg_mylibc.c 1.95
--- valgrind/coregrind/vg_mylibc.c #1.94:1.95
@@ -204,5 +204,10 @@ Int VG_(ktkill)( Int tid, Int signo )
Int ret = -VKI_ENOSYS;
+#ifdef __NR_tgkill
+ ret = VG_(do_syscall)(__NR_tgkill, VG_(main_pid), tid, signo);
+#endif /* __NR_tgkill */
+
#ifdef __NR_tkill
+ if (ret == -VKI_ENOSYS)
ret = VG_(do_syscall)(__NR_tkill, tid, signo);
#endif /* __NR_tkill */
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 18:07:52
|
CVS commit by nethercote:
Arch-abstraction: fix up valgrind.h for future inclusion of other
architectures. Had to recast it as valgrind.h.in; now at configure time the
appropriate #define is set so that the appropriate snippet of assembly code is
chosen. It's done this way rather than with x86/ etc. directories like the
rest of Valgrind, because this header file must stand alone for inclusion by
other programs.
A include/valgrind.h.in 1.1
M +1 -0 configure.in 1.129
M +5 -4 include/Makefile.am 1.9
R include/valgrind.h 1.27
--- valgrind/configure.in #1.128:1.129
@@ -397,4 +397,5 @@
tests/vg_regtest
tests/unused/Makefile
+ include/valgrind.h
include/Makefile
include/x86/Makefile
--- valgrind/include/Makefile.am #1.8:1.9
@@ -3,6 +3,7 @@
EXTRA_DIST = \
- vg_profile.c \
- tool.h.base
+ tool.h.base \
+ valgrind.h.in \
+ vg_profile.c
incincdir = $(includedir)/valgrind
@@ -15,6 +16,6 @@
vg_skin.h
-BUILT_SOURCES = tool.h
-CLEANFILES = tool.h
+BUILT_SOURCES = tool.h valgrind.h
+CLEANFILES = tool.h valgrind.h
tool.h: $(srcdir)/tool.h.base \
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 17:41:38
|
CVS commit by nethercote:
Tweak type of VGA_(thread_syscall), and related variable name changes.
M +2 -2 core.h 1.42
M +2 -1 vg_proxylwp.c 1.25
M +15 -15 x86-linux/syscalls.c 1.3
--- valgrind/coregrind/core.h #1.41:1.42
@@ -1540,7 +1540,7 @@ extern const Addr vga_sys_before, vga_sy
vga_sys_after, vga_sys_done;
-extern void VGA_(restart_syscall)(arch_thread_t* tst);
+extern void VGA_(restart_syscall)(arch_thread_t* arch);
-extern void VGA_(thread_syscall)(Int syscallno, ThreadState* tst,
+extern void VGA_(thread_syscall)(Int syscallno, arch_thread_t* arch,
enum PXState* state, enum PXState poststate);
--- valgrind/coregrind/vg_proxylwp.c #1.24:1.25
@@ -621,5 +621,6 @@ static Int proxylwp(void *v)
/* ST:4 */
- VGA_(thread_syscall)(syscallno, tst, &px->state, PXS_SysDone);
+ VGA_(thread_syscall)(syscallno, &tst->arch,
+ &px->state, PXS_SysDone);
/* ST:5 */
--- valgrind/coregrind/x86-linux/syscalls.c #1.2:1.3
@@ -131,17 +131,17 @@ asm(
%eax-%ebp and the return value in %eax.
*/
-void VGA_(thread_syscall)(Int syscallno, ThreadState *tst,
+void VGA_(thread_syscall)(Int syscallno, arch_thread_t *arch,
enum PXState *state , enum PXState poststate)
{
- do_thread_syscall(syscallno, /* syscall no. */
- tst->arch.m_ebx, /* arg 1 */
- tst->arch.m_ecx, /* arg 2 */
- tst->arch.m_edx, /* arg 3 */
- tst->arch.m_esi, /* arg 4 */
- tst->arch.m_edi, /* arg 5 */
- tst->arch.m_ebp, /* arg 6 */
- &tst->arch.m_eax, /* result */
- state, /* state to update */
- poststate); /* state when syscall has finished */
+ do_thread_syscall(syscallno, // syscall no.
+ arch->m_ebx, // arg 1
+ arch->m_ecx, // arg 2
+ arch->m_edx, // arg 3
+ arch->m_esi, // arg 4
+ arch->m_edi, // arg 5
+ arch->m_ebp, // arg 6
+ &arch->m_eax, // result
+ state, // state to update
+ poststate); // state when syscall has finished
}
@@ -149,7 +149,7 @@ void VGA_(thread_syscall)(Int syscallno,
// Back up to restart a system call.
-void VGA_(restart_syscall)(arch_thread_t *tst)
+void VGA_(restart_syscall)(arch_thread_t *arch)
{
- tst->m_eip -= 2; // sizeof(int $0x80)
+ arch->m_eip -= 2; // sizeof(int $0x80)
/* Make sure our caller is actually sane, and we're really backing
@@ -159,10 +159,10 @@ void VGA_(restart_syscall)(arch_thread_t
*/
{
- UChar *p = (UChar *)tst->m_eip;
+ UChar *p = (UChar *)arch->m_eip;
if (p[0] != 0xcd || p[1] != 0x80)
VG_(message)(Vg_DebugMsg,
"?! restarting over syscall at %p %02x %02x\n",
- tst->m_eip, p[0], p[1]);
+ arch->m_eip, p[0], p[1]);
vg_assert(p[0] == 0xcd && p[1] == 0x80);
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 17:36:42
|
CVS commit by nethercote:
Arch-abstraction:
- factor out the horrid thread_syscall() function, which is written in assembly
code.
M +19 -1 core.h 1.41
M +3 -123 vg_proxylwp.c 1.24
M +1 -1 x86-linux/ldt.c 1.2
M +118 -1 x86-linux/syscalls.c 1.2
--- valgrind/coregrind/core.h #1.40:1.41
@@ -1340,4 +1340,16 @@ extern REGPARM(1)
------------------------------------------------------------------ */
+enum PXState
+{
+ PXS_BAD = -1,
+ PXS_WaitReq, /* waiting for a request */
+ PXS_RunSyscall, /* running a syscall */
+ PXS_IntReply, /* request interrupted - need to send reply */
+ PXS_SysDone, /* small window between syscall
+ complete and results written out */
+ PXS_SigACK, /* waiting for a signal ACK */
+};
+
+
/* Issue a syscall for thread tid */
extern Int VG_(sys_issue)(int tid);
@@ -1525,5 +1537,11 @@ extern Int VGA_(pop_signal_frame) ( Th
// ---------------------------------------------------------------------
-void VGA_(restart_syscall)(arch_thread_t *tst);
+extern const Addr vga_sys_before, vga_sys_restarted,
+ vga_sys_after, vga_sys_done;
+
+extern void VGA_(restart_syscall)(arch_thread_t* tst);
+
+extern void VGA_(thread_syscall)(Int syscallno, ThreadState* tst,
+ enum PXState* state, enum PXState poststate);
/* ---------------------------------------------------------------------
--- valgrind/coregrind/vg_proxylwp.c #1.23:1.24
@@ -32,51 +32,4 @@
#include "core.h"
-/* We need our own copy of VG_(do_syscall)() to handle a special
- race-condition. If we've got signals unblocked, and we take a
- signal in the gap either just before or after the syscall, we may
- end up not running the syscall at all, or running it more than
- once.
-
- The solution is to make the signal handler derive the proxy's
- precise state by looking to see which eip it is executing at
- exception time.
-
- Ranges:
-
- sys_before ... sys_restarted:
- Setting up register arguments and running state. If
- interrupted, then the syscall should be considered to return
- ERESTARTSYS.
-
- sys_restarted:
- If interrupted and eip==sys_restarted, then either the syscall
- was about to start running, or it has run, was interrupted and
- the kernel wants to restart it. eax still contains the
- syscall number. If interrupted, then the syscall return value
- should be ERESTARTSYS.
-
- sys_after:
- If interrupted and eip==sys_after, the syscall either just
- finished, or it was interrupted and the kernel doesn't want to
- restart it. Either way, eax equals the correct return value
- (either the actual return value, or EINTR).
-
- sys_after ... sys_done:
- System call is complete, but the state hasn't been updated,
- nor has the result been written back. eax contains the return
- value.
-*/
-
-enum PXState
-{
- PXS_BAD = -1,
- PXS_WaitReq, /* waiting for a request */
- PXS_RunSyscall, /* running a syscall */
- PXS_IntReply, /* request interrupted - need to send reply */
- PXS_SysDone, /* small window between syscall
- complete and results written out */
- PXS_SigACK, /* waiting for a signal ACK */
-};
-
enum RequestType {
PX_BAD = -1,
@@ -89,77 +42,4 @@ enum RequestType {
};
-extern void do_thread_syscall(Int sys,
- Int arg1, Int arg2, Int arg3, Int arg4, Int arg5, Int arg6,
- Int *result, enum PXState *statep, enum PXState poststate);
-
-asm(
-".text\n"
-" .type do_thread_syscall,@function\n"
-
-"do_thread_syscall:\n"
-" push %esi\n"
-" push %edi\n"
-" push %ebx\n"
-" push %ebp\n"
-".sys_before:\n"
-" movl 16+ 4(%esp),%eax\n" /* syscall */
-" movl 16+ 8(%esp),%ebx\n" /* arg1 */
-" movl 16+12(%esp),%ecx\n" /* arg2 */
-" movl 16+16(%esp),%edx\n" /* arg3 */
-" movl 16+20(%esp),%esi\n" /* arg4 */
-" movl 16+24(%esp),%edi\n" /* arg5 */
-" movl 16+28(%esp),%ebp\n" /* arg6 */
-".sys_restarted:\n"
-" int $0x80\n"
-".sys_after:\n"
-" movl 16+32(%esp),%ebx\n" /* ebx = Int *res */
-" movl %eax, (%ebx)\n" /* write the syscall retval */
-
-" movl 16+36(%esp),%ebx\n" /* ebx = enum PXState * */
-" testl %ebx, %ebx\n"
-" jz 1f\n"
-
-" movl 16+40(%esp),%ecx\n" /* write the post state (must be after retval write) */
-" movl %ecx,(%ebx)\n"
-
-".sys_done:\n" /* OK, all clear from here */
-"1: popl %ebp\n"
-" popl %ebx\n"
-" popl %edi\n"
-" popl %esi\n"
-" ret\n"
-" .size do_thread_syscall,.-do_thread_syscall\n"
-".previous\n"
-
-".section .rodata\n"
-"sys_before: .long .sys_before\n"
-"sys_restarted: .long .sys_restarted\n"
-"sys_after: .long .sys_after\n"
-"sys_done: .long .sys_done\n"
-".previous\n"
-);
-extern const Addr sys_before, sys_restarted, sys_after, sys_done;
-
-/* Run a syscall for a particular thread, getting the arguments from
- the thread's registers, and returning the result in the thread's
- eax.
-
- Assumes that the only thread state which matters is the contents of
- %eax-%ebp and the return value in %eax.
- */
-static void thread_syscall(Int syscallno, ThreadState *tst,
- enum PXState *state , enum PXState poststate)
-{
- do_thread_syscall(syscallno, /* syscall no. */
- tst->arch.m_ebx, /* arg 1 */
- tst->arch.m_ecx, /* arg 2 */
- tst->arch.m_edx, /* arg 3 */
- tst->arch.m_esi, /* arg 4 */
- tst->arch.m_edi, /* arg 5 */
- tst->arch.m_ebp, /* arg 6 */
- &tst->arch.m_eax, /* result */
- state, /* state to update */
- poststate); /* state when syscall has finished */
-}
#define VG_PROXY_MAGIC 0xef83b192
@@ -421,5 +301,5 @@ void VG_(proxy_handlesig)(const vki_ksig
/* First look to see if the EIP is within our interesting ranges
near a syscall to work out what should happen. */
- if (sys_before <= ip && ip <= sys_restarted) {
+ if (vga_sys_before <= ip && ip <= vga_sys_restarted) {
/* We are before the syscall actually ran, or it did run and
wants to be restarted. Either way, set the return code to
@@ -429,5 +309,5 @@ void VG_(proxy_handlesig)(const vki_ksig
vg_assert(px->state == PXS_RunSyscall);
vg_assert(PLATFORM_SYSCALL_RET(px->tst->arch) == -VKI_ERESTARTSYS);
- } else if (sys_after <= ip && ip <= sys_done) {
+ } else if (vga_sys_after <= ip && ip <= vga_sys_done) {
/* We're after the syscall. Either it was interrupted by the
signal, or the syscall completed normally. In either case
@@ -741,5 +621,5 @@ static Int proxylwp(void *v)
/* ST:4 */
- thread_syscall(syscallno, tst, &px->state, PXS_SysDone);
+ VGA_(thread_syscall)(syscallno, tst, &px->state, PXS_SysDone);
/* ST:5 */
--- valgrind/coregrind/x86-linux/ldt.c #1.1:1.2
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------*/
-/*--- Simulation of Local Descriptor Tables vg_ldt.c ---*/
+/*--- Simulation of Local Descriptor Tables x86-linux/ldt.c ---*/
/*--------------------------------------------------------------------*/
--- valgrind/coregrind/x86-linux/syscalls.c #1.1:1.2
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------*/
-/*--- x86/Linux-specific syscalls, etc. syscalls.c ---*/
+/*--- x86/Linux-specific syscalls, etc. x86-linux/syscalls.c ---*/
/*--------------------------------------------------------------------*/
@@ -31,4 +31,121 @@
#include "core.h"
+
+/* We need our own copy of VG_(do_syscall)() to handle a special
+ race-condition. If we've got signals unblocked, and we take a
+ signal in the gap either just before or after the syscall, we may
+ end up not running the syscall at all, or running it more than
+ once.
+
+ The solution is to make the signal handler derive the proxy's
+ precise state by looking to see which eip it is executing at
+ exception time.
+
+ Ranges:
+
+ vga_sys_before ... vga_sys_restarted:
+ Setting up register arguments and running state. If
+ interrupted, then the syscall should be considered to return
+ ERESTARTSYS.
+
+ vga_sys_restarted:
+ If interrupted and eip==vga_sys_restarted, then either the syscall
+ was about to start running, or it has run, was interrupted and
+ the kernel wants to restart it. eax still contains the
+ syscall number. If interrupted, then the syscall return value
+ should be ERESTARTSYS.
+
+ vga_sys_after:
+ If interrupted and eip==vga_sys_after, the syscall either just
+ finished, or it was interrupted and the kernel doesn't want to
+ restart it. Either way, eax equals the correct return value
+ (either the actual return value, or EINTR).
+
+ vga_sys_after ... vga_sys_done:
+ System call is complete, but the state hasn't been updated,
+ nor has the result been written back. eax contains the return
+ value.
+*/
+extern void do_thread_syscall(Int sys,
+ Int arg1, Int arg2, Int arg3, Int arg4,
+ Int arg5, Int arg6,
+ Int *result, enum PXState *statep,
+ enum PXState poststate);
+
+asm(
+".text\n"
+" .type do_thread_syscall,@function\n"
+
+"do_thread_syscall:\n"
+" push %esi\n"
+" push %edi\n"
+" push %ebx\n"
+" push %ebp\n"
+".vga_sys_before:\n"
+" movl 16+ 4(%esp),%eax\n" /* syscall */
+" movl 16+ 8(%esp),%ebx\n" /* arg1 */
+" movl 16+12(%esp),%ecx\n" /* arg2 */
+" movl 16+16(%esp),%edx\n" /* arg3 */
+" movl 16+20(%esp),%esi\n" /* arg4 */
+" movl 16+24(%esp),%edi\n" /* arg5 */
+" movl 16+28(%esp),%ebp\n" /* arg6 */
+".vga_sys_restarted:\n"
+" int $0x80\n"
+".vga_sys_after:\n"
+" movl 16+32(%esp),%ebx\n" /* ebx = Int *res */
+" movl %eax, (%ebx)\n" /* write the syscall retval */
+
+" movl 16+36(%esp),%ebx\n" /* ebx = enum PXState * */
+" testl %ebx, %ebx\n"
+" jz 1f\n"
+
+" movl 16+40(%esp),%ecx\n" /* write the post state (must be after retval write) */
+" movl %ecx,(%ebx)\n"
+
+".vga_sys_done:\n" /* OK, all clear from here */
+"1: popl %ebp\n"
+" popl %ebx\n"
+" popl %edi\n"
+" popl %esi\n"
+" ret\n"
+" .size do_thread_syscall,.-do_thread_syscall\n"
+".previous\n"
+
+".section .rodata\n"
+" .globl vga_sys_before\n"
+"vga_sys_before: .long .vga_sys_before\n"
+" .globl vga_sys_restarted\n"
+"vga_sys_restarted: .long .vga_sys_restarted\n"
+" .globl vga_sys_after\n"
+"vga_sys_after: .long .vga_sys_after\n"
+" .globl vga_sys_done\n"
+"vga_sys_done: .long .vga_sys_done\n"
+".previous\n"
+);
+
+/* Run a syscall for a particular thread, getting the arguments from
+ the thread's registers, and returning the result in the thread's
+ eax.
+
+ Assumes that the only thread state which matters is the contents of
+ %eax-%ebp and the return value in %eax.
+ */
+void VGA_(thread_syscall)(Int syscallno, ThreadState *tst,
+ enum PXState *state , enum PXState poststate)
+{
+ do_thread_syscall(syscallno, /* syscall no. */
+ tst->arch.m_ebx, /* arg 1 */
+ tst->arch.m_ecx, /* arg 2 */
+ tst->arch.m_edx, /* arg 3 */
+ tst->arch.m_esi, /* arg 4 */
+ tst->arch.m_edi, /* arg 5 */
+ tst->arch.m_ebp, /* arg 6 */
+ &tst->arch.m_eax, /* result */
+ state, /* state to update */
+ poststate); /* state when syscall has finished */
+}
+
+
+
// Back up to restart a system call.
void VGA_(restart_syscall)(arch_thread_t *tst)
|
|
From: Tom H. <th...@cy...> - 2004-10-18 17:35:37
|
CVS commit by thughes:
Back-out accidental commit.
M +0 -6 vg_replace_malloc.c.base 1.8
--- valgrind/coregrind/vg_replace_malloc.c.base #1.7:1.8
@@ -58,10 +58,4 @@
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
visibility("protected"))); \
- ret VG_INTERCEPT(soname:libstdc++*, __##name##_internal) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
- visibility("protected"))); \
- ret VG_INTERCEPT(soname:libc.so.6, __##name##_internal) args \
- __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
- visibility("protected"))); \
ret VG_INTERCEPT(soname:libstdc++*, ##name) args \
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
|
|
From: Tom H. <th...@cy...> - 2004-10-18 17:34:47
|
CVS commit by thughes:
Make statically initialised read-write locks work.
BUG: 91604
M +1 -1 vg_libpthread.c 1.171
M +6 -0 vg_replace_malloc.c.base 1.7
--- valgrind/coregrind/vg_libpthread.c #1.170:1.171
@@ -3064,5 +3064,5 @@ static vg_rwlock_t* rw_lookup ( pthread_
if (vg_orig->__vg_rw_writer == NULL)
- rwl = rw_new (orig);
+ rwl = rw_new ((pthread_rwlock_t*)orig);
else if (((Addr)vg_orig->__vg_rw_writer ^ RWLOCK_CHECK_MAGIC) == (Addr)vg_orig->__vg_rw_read_waiting)
rwl = vg_orig->__vg_rw_writer;
--- valgrind/coregrind/vg_replace_malloc.c.base #1.6:1.7
@@ -58,4 +58,10 @@
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
visibility("protected"))); \
+ ret VG_INTERCEPT(soname:libstdc++*, __##name##_internal) args \
+ __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
+ visibility("protected"))); \
+ ret VG_INTERCEPT(soname:libc.so.6, __##name##_internal) args \
+ __attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
+ visibility("protected"))); \
ret VG_INTERCEPT(soname:libstdc++*, ##name) args \
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 17:00:35
|
CVS commit by nethercote:
Arch-abstraction:
- factor out the setting of syscall results, which can be more complicated
than just putting a value in the result register (eg. PPC has to fiddle with
multiple registers).
M +51 -49 vg_syscalls.c 1.147
M +1 -1 x86-linux/core_platform.h 1.6
--- valgrind/coregrind/vg_syscalls.c #1.146:1.147
@@ -1020,4 +1020,6 @@ static Bool fd_allowed(Int fd, const Cha
#define arg6 PLATFORM_SYSCALL_ARG6(tst->arch)
+#define set_result(val) PLATFORM_SET_SYSCALL_RESULT(tst->arch, (val))
+
PRE(exit_group)
{
@@ -1141,5 +1143,5 @@ PRE(set_thread_area)
/* "do" the syscall ourselves; the kernel never sees it */
- res = VG_(sys_set_thread_area)( tid, (void *)arg1 );
+ set_result( VG_(sys_set_thread_area)( tid, (void *)arg1 ) );
}
@@ -1152,5 +1154,5 @@ PRE(get_thread_area)
/* "do" the syscall ourselves; the kernel never sees it */
- res = VG_(sys_get_thread_area)( tid, (void *)arg1 );
+ set_result( VG_(sys_get_thread_area)( tid, (void *)arg1 ) );
if (!VG_(is_kerror)(res)) {
@@ -1455,5 +1457,5 @@ PRE(mremap)
arg1, arg2, arg3, arg4, arg5);
- res = mremap_segment((Addr)arg1, arg2, (Addr)arg5, arg3, arg4, tid);
+ set_result( mremap_segment((Addr)arg1, arg2, (Addr)arg5, arg3, arg4, tid) );
}
@@ -1762,5 +1764,5 @@ PRE(execve)
if (ret < 0) {
- res = ret;
+ set_result( ret );
return;
}
@@ -1769,5 +1771,5 @@ PRE(execve)
*/
if ((st.st_mode & 0100111) == 0100000) {
- res = -VKI_EACCES;
+ set_result( -VKI_EACCES );
return;
}
@@ -1838,5 +1840,5 @@ PRE(execve)
VG_(setrlimit)(VKI_RLIMIT_DATA, &VG_(client_rlimit_data));
- res = VG_(do_syscall)(__NR_execve, arg1, arg2, arg3);
+ set_result( VG_(do_syscall)(__NR_execve, arg1, arg2, arg3) );
/* If we got here, then the execve failed. We've already made too much of a mess
@@ -1882,5 +1884,5 @@ PRE(brk)
MAYBE_PRINTF("brk ( %p ) --> ",arg1);
- res = do_brk(arg1);
+ set_result( do_brk(arg1) );
MAYBE_PRINTF("0x%x\n", res);
@@ -1934,5 +1936,5 @@ PRE(close)
/* Detect and negate attempts by the client to close Valgrind's log fd */
if (!fd_allowed(arg1, "close", tid, False))
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
}
@@ -1953,5 +1955,5 @@ POST(dup)
if (!fd_allowed(res, "dup", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if(VG_(clo_track_fds))
@@ -1965,5 +1967,5 @@ PRE(dup2)
MAYBE_PRINTF("dup2 ( %d, %d ) ...\n", arg1,arg2);
if (!fd_allowed(arg2, "dup2", tid, True))
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
}
@@ -1990,5 +1992,5 @@ POST(fcntl)
if (!fd_allowed(res, "fcntl(DUPFD)", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -2031,5 +2033,5 @@ POST(fcntl64)
if (!fd_allowed(res, "fcntl64(DUPFD)", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -2103,5 +2105,5 @@ PRE(clone)
{
before_fork(tid, tst);
- res = VG_(do_syscall)(SYSNO, arg1, arg2, arg3, arg4, arg5);
+ set_result( VG_(do_syscall)(SYSNO, arg1, arg2, arg3, arg4, arg5) );
after_fork(tid, tst);
} else {
@@ -2618,10 +2620,10 @@ PRE(ipc)
arg5 = VG_(find_map_space)(0, segmentSize, True);
else if (!valid_client_addr(arg5, segmentSize, tid, "shmat"))
- res = -VKI_EINVAL;
+ set_result( -VKI_EINVAL );
break;
}
case 22: /* IPCOP_shmdt */
if (!valid_client_addr(arg5, 1, tid, "shmdt"))
- res = -VKI_EINVAL;
+ set_result( -VKI_EINVAL );
break;
case 23: /* IPCOP_shmget */
@@ -4056,5 +4058,5 @@ PRE(kill)
MAYBE_PRINTF("kill ( %d, %d )\n", arg1,arg2);
if (arg2 == VKI_SIGVGINT || arg2 == VKI_SIGVGKILL)
- res = -VKI_EINVAL;
+ set_result( -VKI_EINVAL );
}
@@ -4162,9 +4164,9 @@ PRE(mmap2)
if (arg4 & VKI_MAP_FIXED) {
if (!valid_client_addr(arg1, arg2, tid, "mmap2"))
- res = -VKI_ENOMEM;
+ set_result( -VKI_ENOMEM );
} else {
arg1 = VG_(find_map_space)(arg1, arg2, True);
if (arg1 == 0)
- res = -VKI_ENOMEM;
+ set_result( -VKI_ENOMEM );
else
arg4 |= VKI_MAP_FIXED;
@@ -4195,10 +4197,10 @@ PRE(mmap)
if (!valid_client_addr(a1, a2, tid, "mmap")) {
MAYBE_PRINTF("mmap failing: %p-%p\n", a1, a1+a2);
- res = -VKI_ENOMEM;
+ set_result( -VKI_ENOMEM );
}
} else {
a1 = VG_(find_map_space)(a1, a2, True);
if (a1 == 0)
- res = -VKI_ENOMEM;
+ set_result( -VKI_ENOMEM );
else
a4 |= VKI_MAP_FIXED;
@@ -4222,5 +4224,5 @@ PRE(mprotect)
if (!valid_client_addr(arg1, arg2, tid, "mprotect"))
- res = -VKI_ENOMEM;
+ set_result( -VKI_ENOMEM );
}
@@ -4246,5 +4248,5 @@ PRE(munmap)
if (!valid_client_addr(arg1, arg2, tid, "munmap"))
- res = -VKI_EINVAL;
+ set_result( -VKI_EINVAL );
}
@@ -4328,5 +4330,5 @@ POST(open)
if (!fd_allowed(res, "open", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -4342,5 +4344,5 @@ PRE(read)
if (!fd_allowed(arg1, "read", tid, False))
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
else
SYSCALL_TRACK( pre_mem_write, tid, "read(buf)", arg2, arg3 );
@@ -4357,5 +4359,5 @@ PRE(write)
MAYBE_PRINTF("write ( %d, %p, %d )\n", arg1, arg2, arg3);
if (!fd_allowed(arg1, "write", tid, False))
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
else
SYSCALL_TRACK( pre_mem_read, tid, "write(buf)", arg2, arg3 );
@@ -4373,5 +4375,5 @@ POST(creat)
if (!fd_allowed(res, "creat", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -4397,5 +4399,5 @@ POST(pipe)
VG_(close)(p[0]);
VG_(close)(p[1]);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
VG_TRACK( post_mem_write, arg1, 2*sizeof(int) );
@@ -4449,5 +4451,5 @@ POST(epoll_create)
if (!fd_allowed(res, "open", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -4505,5 +4507,5 @@ PRE(readv)
MAYBE_PRINTF("readv ( %d, %p, %d )\n",arg1,arg2,arg3);
if (!fd_allowed(arg1, "readv", tid, False)) {
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
} else {
SYSCALL_TRACK( pre_mem_read, tid, "readv(vector)",
@@ -4712,9 +4714,9 @@ PRE(setrlimit)
if (((vki_rlimit *)arg2)->rlim_cur > VG_(fd_hard_limit) ||
((vki_rlimit *)arg2)->rlim_max != VG_(fd_hard_limit)) {
- res = -VKI_EPERM;
+ set_result( -VKI_EPERM );
}
else {
VG_(fd_soft_limit) = ((vki_rlimit *)arg2)->rlim_cur;
- res = 0;
+ set_result( 0 );
}
}
@@ -4722,9 +4724,9 @@ PRE(setrlimit)
if (((vki_rlimit *)arg2)->rlim_cur > ((vki_rlimit *)arg2)->rlim_max ||
((vki_rlimit *)arg2)->rlim_max > ((vki_rlimit *)arg2)->rlim_max) {
- res = -VKI_EPERM;
+ set_result( -VKI_EPERM );
}
else {
VG_(client_rlimit_data) = *(vki_rlimit *)arg2;
- res = 0;
+ set_result( 0 );
}
}
@@ -4732,10 +4734,10 @@ PRE(setrlimit)
if (((vki_rlimit *)arg2)->rlim_cur > ((vki_rlimit *)arg2)->rlim_max ||
((vki_rlimit *)arg2)->rlim_max > ((vki_rlimit *)arg2)->rlim_max) {
- res = -VKI_EPERM;
+ set_result( -VKI_EPERM );
}
else {
VG_(threads)[tid].stack_size = ((vki_rlimit *)arg2)->rlim_cur;
VG_(client_rlimit_stack) = *(vki_rlimit *)arg2;
- res = 0;
+ set_result( 0 );
}
}
@@ -4964,5 +4966,5 @@ PRE(socketcall)
default:
VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%x",arg1);
- res = -VKI_EINVAL;
+ set_result( -VKI_EINVAL );
break;
}
@@ -4984,5 +4986,5 @@ POST(socketcall)
VG_(close)(fd1);
VG_(close)(fd2);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
VG_TRACK( post_mem_write, ((UInt*)arg2)[3], 2*sizeof(int) );
@@ -4998,5 +5000,5 @@ POST(socketcall)
if (!fd_allowed(res, "socket", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -5018,5 +5020,5 @@ POST(socketcall)
if (!fd_allowed(res, "accept", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
Addr addr_p = ((UInt*)arg2)[1];
@@ -5333,5 +5335,5 @@ PRE(writev)
MAYBE_PRINTF("writev ( %d, %p, %d )\n",arg1,arg2,arg3);
if (!fd_allowed(arg1, "writev", tid, False)) {
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
} else {
SYSCALL_TRACK( pre_mem_read, tid, "writev(vector)",
@@ -5409,5 +5411,5 @@ POST(futex)
if (!fd_allowed(res, "futex", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -5610,5 +5612,5 @@ PRE(io_setup)
VG_(pad_address_space)();
- res = VG_(do_syscall)(SYSNO, arg1, arg2);
+ set_result( VG_(do_syscall)(SYSNO, arg1, arg2) );
VG_(unpad_address_space)();
@@ -5636,5 +5638,5 @@ PRE(io_destroy)
MAYBE_PRINTF("io_destroy ( %ul )\n",arg1);
- res = VG_(do_syscall)(SYSNO, arg1);
+ set_result( VG_(do_syscall)(SYSNO, arg1) );
if (res == 0 && s != NULL && VG_(seg_contains)(s, arg1, size)) {
@@ -5748,5 +5750,5 @@ POST(mq_open)
if (!fd_allowed(res, "mq_open", tid, True)) {
VG_(close)(res);
- res = -VKI_EMFILE;
+ set_result( -VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
@@ -5770,5 +5772,5 @@ PRE(mq_timedsend)
arg1,arg2,arg3,arg4,arg5);
if (!fd_allowed(arg1, "mq_timedsend", tid, False)) {
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
} else {
SYSCALL_TRACK( pre_mem_read, tid, "mq_timedsend(msg_ptr)", arg2, arg3 );
@@ -5787,5 +5789,5 @@ PRE(mq_timedreceive)
arg1,arg2,arg3,arg4,arg5);
if (!fd_allowed(arg1, "mq_timedreceive", tid, False)) {
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
} else {
SYSCALL_TRACK( pre_mem_write, tid, "mq_timedreceive(msg_ptr)", arg2, arg3 );
@@ -5811,5 +5813,5 @@ PRE(mq_notify)
MAYBE_PRINTF("mq_notify( %d, %p )\n", arg1,arg2 );
if (!fd_allowed(arg1, "mq_notify", tid, False))
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
else if (arg2 != 0)
SYSCALL_TRACK( pre_mem_read, tid, "mq_notify", arg2,
@@ -5823,5 +5825,5 @@ PRE(mq_getsetattr)
MAYBE_PRINTF("mq_getsetattr( %d, %p, %p )\n", arg1,arg2,arg3 );
if (!fd_allowed(arg1, "mq_getsetattr", tid, False)) {
- res = -VKI_EBADF;
+ set_result( -VKI_EBADF );
} else {
if (arg2 != 0) {
@@ -5958,5 +5960,5 @@ static void bad_before(ThreadId tid, Thr
(Vg_DebugMsg,"Read the file README_MISSING_SYSCALL_OR_IOCTL.");
- res = -VKI_ENOSYS;
+ set_result( -VKI_ENOSYS );
}
--- valgrind/coregrind/x86-linux/core_platform.h #1.5:1.6
@@ -50,5 +50,5 @@
#define PLATFORM_SYSCALL_ARG6(regs) ((regs).m_ebp)
-#define PLATFORM_PRE_SYSCALL_RESULT(regs, val) ((regs).m_eax = (val))
+#define PLATFORM_SET_SYSCALL_RESULT(regs, val) ((regs).m_eax = (val))
// Interesting register numbers
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 15:56:21
|
CVS commit by nethercote:
Increase the size of M_VG_ERRTXT from 512B to 4KB, increasing the size of C++
names that can be demangled.
MERGED FROM HEAD
M +3 -3 vg_errcontext.c 1.58.2.1
M +1 -1 vg_include.h 1.235.2.3
M +4 -4 vg_symtab2.c 1.85.2.1
M +1 -1 vg_to_ucode.c 1.146.2.1
--- valgrind/coregrind/vg_errcontext.c #1.58:1.58.2.1
@@ -333,5 +333,5 @@ static void gen_suppression(Error* err)
{
Int i;
- UChar buf[M_VG_ERRTXT];
+ static UChar buf[M_VG_ERRTXT];
Bool main_done = False;
ExeContext* ec = VG_(get_error_where)(err);
@@ -986,6 +986,6 @@ static Supp* is_suppressible_error ( Err
Int i;
- Char caller_obj[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
- Char caller_fun[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
+ static Char caller_obj[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
+ static Char caller_fun[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
Supp* su;
--- valgrind/coregrind/vg_include.h #1.235.2.2:1.235.2.3
@@ -75,5 +75,5 @@
/* Max length of a text fragment used to construct error messages. */
-#define M_VG_ERRTXT 512
+#define M_VG_ERRTXT 4096
/* Max length of the string copied from env var VG_ARGS at startup. */
--- valgrind/coregrind/vg_symtab2.c #1.85:1.85.2.1
@@ -2175,7 +2175,7 @@ Char* VG_(describe_eip)(Addr eip, Char*
UChar ibuf[20];
UInt n = 0;
- UChar buf_fn[M_VG_ERRTXT];
- UChar buf_obj[M_VG_ERRTXT];
- UChar buf_srcloc[M_VG_ERRTXT];
+ static UChar buf_fn[M_VG_ERRTXT];
+ static UChar buf_obj[M_VG_ERRTXT];
+ static UChar buf_srcloc[M_VG_ERRTXT];
Bool know_fnname = VG_(get_fnname) (eip, buf_fn, M_VG_ERRTXT);
Bool know_objname = VG_(get_objname)(eip, buf_obj, M_VG_ERRTXT);
@@ -2215,5 +2215,5 @@ void VG_(mini_stack_dump) ( Addr eips[],
{
UInt i;
- UChar buf[M_VG_ERRTXT];
+ static UChar buf[M_VG_ERRTXT];
Bool main_done = False;
--- valgrind/coregrind/vg_to_ucode.c #1.146:1.146.2.1
@@ -3858,5 +3858,5 @@ static Addr disInstr ( UCodeBlock* cb, A
UChar dis_buf[50];
Int am_sz, d_sz;
- Char loc_buf[M_VG_ERRTXT];
+ static Char loc_buf[M_VG_ERRTXT];
/* Holds eip at the start of the insn, so that we can print
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 15:47:28
|
CVS commit by nethercote:
Increase the size of M_VG_ERRTXT from 512B to 4KB, increasing the size of C++
names that can be demangled.
MERGE TO STABLE
M +1 -1 core.h 1.40
M +3 -3 vg_errcontext.c 1.63
M +4 -4 vg_symtab2.c 1.91
M +1 -1 vg_to_ucode.c 1.148
--- valgrind/coregrind/core.h #1.39:1.40
@@ -116,5 +116,5 @@
/* Max length of a text fragment used to construct error messages. */
-#define M_VG_ERRTXT 512
+#define M_VG_ERRTXT 4096
/* Max length of the string copied from env var VG_ARGS at startup. */
--- valgrind/coregrind/vg_errcontext.c #1.62:1.63
@@ -333,5 +333,5 @@ static void gen_suppression(Error* err)
{
Int i;
- UChar buf[M_VG_ERRTXT];
+ static UChar buf[M_VG_ERRTXT];
Bool main_done = False;
ExeContext* ec = VG_(get_error_where)(err);
@@ -987,6 +987,6 @@ static Supp* is_suppressible_error ( Err
Int i;
- Char caller_obj[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
- Char caller_fun[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
+ static Char caller_obj[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
+ static Char caller_fun[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
Supp* su;
--- valgrind/coregrind/vg_symtab2.c #1.90:1.91
@@ -2146,7 +2146,7 @@ Char* VG_(describe_eip)(Addr eip, Char*
UChar ibuf[20];
UInt n = 0;
- UChar buf_fn[M_VG_ERRTXT];
- UChar buf_obj[M_VG_ERRTXT];
- UChar buf_srcloc[M_VG_ERRTXT];
+ static UChar buf_fn[M_VG_ERRTXT];
+ static UChar buf_obj[M_VG_ERRTXT];
+ static UChar buf_srcloc[M_VG_ERRTXT];
Bool know_fnname = VG_(get_fnname) (eip, buf_fn, M_VG_ERRTXT);
Bool know_objname = VG_(get_objname)(eip, buf_obj, M_VG_ERRTXT);
@@ -2186,5 +2186,5 @@ void VG_(mini_stack_dump) ( Addr eips[],
{
UInt i;
- UChar buf[M_VG_ERRTXT];
+ static UChar buf[M_VG_ERRTXT];
Bool main_done = False;
--- valgrind/coregrind/vg_to_ucode.c #1.147:1.148
@@ -3858,5 +3858,5 @@ static Addr disInstr ( UCodeBlock* cb, A
UChar dis_buf[50];
Int am_sz, d_sz;
- Char loc_buf[M_VG_ERRTXT];
+ static Char loc_buf[M_VG_ERRTXT];
/* Holds eip at the start of the insn, so that we can print
|
|
From: Adam G. <ar...@cy...> - 2004-10-18 15:37:48
|
At 04:11 PM 10/18/2004 +0100, Nicholas Nethercote wrote: >>I would guess that if argc is a register, and you ask for &argc, the >>compiler will generate a temporary on the stack which you can mess with (but >>it wouldn't be what you want.. it would be somewhere in the local variables) > >I should have been clearer. The value of argc will definitely be on the stack, because the ABI requires it. However, the argument argc to main() may be in a register (ie. there could be two copies of argc floating around, one on the stack, one in a register). In which case a temporary will be generated as you say, which is not what we want. Does that make sense? yeah. that's what I thought. >>could be wrong though... try writing a five line program on PPC and seeing >>what assembler you get (I know that's not portable) > >I don't have access to a PPC at the moment, unfortunately... not sure I have either... have you thought of trying QEMU/PPC? there's a Linux/PPC image on freeoszoo.org which might be of some use: http://www.freeoszoo.org/download.php >>you know that GCC has some builtins that return things like this? >> >>http://ou800doc.caldera.com/cgi-bin/info2html?(gcc.info)Return%2520Address&lang=en > >I don't see how either of those really help? I was thinking of using __builtin_frame_pointer() to find the start address, but that actually gets the point between the arguments and the locals. damn. maybe there's another builtin? Seeya, Adam -- Real Programmers don't comment their code. If it was hard to write, it should be hard to read, and even harder to modify. These are all my own opinions. |
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 15:34:18
|
CVS commit by nethercote:
Arch-abstraction:
- factor out code for restarting syscalls
A x86-linux/syscalls.c 1.1 [GPL (v2+)]
M +4 -0 core.h 1.39
M +1 -1 stage1.c 1.25
M +1 -17 vg_syscalls.c 1.146
M +2 -1 x86-linux/Makefile.am 1.4
--- valgrind/coregrind/core.h #1.38:1.39
@@ -1521,5 +1521,9 @@ extern void VGA_(push_signal_frame) ( Th
extern Int VGA_(pop_signal_frame) ( ThreadId tid );
+// ---------------------------------------------------------------------
+// Platform-specific things defined in eg. x86/*.c
+// ---------------------------------------------------------------------
+void VGA_(restart_syscall)(arch_thread_t *tst);
/* ---------------------------------------------------------------------
--- valgrind/coregrind/stage1.c #1.24:1.25
@@ -307,5 +307,5 @@ int main(int argc, char** argv)
// Initial stack pointer is to argc, which is immediately before argv[0]
- // on the stack.
+ // on the stack. Nb: Assumes argc is word-aligned.
init_sp = argv - 1;
--- valgrind/coregrind/vg_syscalls.c #1.145:1.146
@@ -6353,21 +6353,5 @@ static void restart_syscall(ThreadId tid
SYSNO = tst->syscallno;
- tst->arch.m_eip -= 2; /* sizeof(int $0x80) */
-
- /* Make sure our caller is actually sane, and we're really backing
- back over a syscall.
-
- int $0x80 == CD 80
- */
- {
- UChar *p = (UChar *)tst->arch.m_eip;
-
- if (p[0] != 0xcd || p[1] != 0x80)
- VG_(message)(Vg_DebugMsg,
- "?! restarting over syscall at %p %02x %02x\n",
- tst->arch.m_eip, p[0], p[1]);
-
- vg_assert(p[0] == 0xcd && p[1] == 0x80);
- }
+ VGA_(restart_syscall)(&tst->arch);
}
--- valgrind/coregrind/x86-linux/Makefile.am #1.3:1.4
@@ -12,3 +12,4 @@
libplatform_a_SOURCES = \
- ldt.c
+ ldt.c \
+ syscalls.c
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 15:20:37
|
On Mon, 18 Oct 2004, Nicholas Nethercote wrote: >> you are assuming that sizeof( int ) == sizeof( char * ), which it won't >> on >> 64 bit platforms... just a thought. > > Hmm, yes. I'll fix. Thanks. Actually, this is trickier than it seems. For x86-64, at least, I believe the current code is actually correct because argc is 64-bit aligned. N |
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 15:11:19
|
On Mon, 18 Oct 2004, Adam Gundy wrote: >>> what's wrong with: >>> >>> init_sp = &argc; >> >> Is it actually certain that argc will be on the stack? Eg. for PPC, >> functions args usually get passed in registers... I'm not really sure, >> I'm copying Paul Mackerras' PPC port here. > > if it's not on the stack, then what is 'argv - 1' pointing to? > some random piece of data above it on the stack... > > I would guess that if argc is a register, and you ask for &argc, the > compiler will generate a temporary on the stack which you can mess with (but > it wouldn't be what you want.. it would be somewhere in the local variables) I should have been clearer. The value of argc will definitely be on the stack, because the ABI requires it. However, the argument argc to main() may be in a register (ie. there could be two copies of argc floating around, one on the stack, one in a register). In which case a temporary will be generated as you say, which is not what we want. Does that make sense? > could be wrong though... try writing a five line program on PPC and seeing > what assembler you get (I know that's not portable) I don't have access to a PPC at the moment, unfortunately... > you know that GCC has some builtins that return things like this? > > http://ou800doc.caldera.com/cgi-bin/info2html?(gcc.info)Return%2520Address&lang=en I don't see how either of those really help? Thanks for the info. N |
|
From: Adam G. <ar...@cy...> - 2004-10-18 15:05:16
|
At 03:47 PM 10/18/2004 +0100, Nicholas Nethercote wrote: >On Mon, 18 Oct 2004, Adam Gundy wrote: > >>you are assuming that sizeof( int ) == sizeof( char * ), which it won't on >>64 bit platforms... just a thought. > >Hmm, yes. I'll fix. Thanks. > >>what's wrong with: >> >>init_sp = &argc; > >Is it actually certain that argc will be on the stack? Eg. for PPC, functions args usually get passed in registers... I'm not really sure, I'm copying Paul Mackerras' PPC port here. if it's not on the stack, then what is 'argv - 1' pointing to? some random piece of data above it on the stack... I would guess that if argc is a register, and you ask for &argc, the compiler will generate a temporary on the stack which you can mess with (but it wouldn't be what you want.. it would be somewhere in the local variables) could be wrong though... try writing a five line program on PPC and seeing what assembler you get (I know that's not portable) you know that GCC has some builtins that return things like this? http://ou800doc.caldera.com/cgi-bin/info2html?(gcc.info)Return%2520Address&lang=en Seeya, Adam -- Real Programmers don't comment their code. If it was hard to write, it should be hard to read, and even harder to modify. These are all my own opinions. |
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 14:47:51
|
CVS commit by nethercote:
Arch-abstraction:
- account for x86's strange argument passing (via memory) for mmap()
M +6 -10 vg_mylibc.c 1.94
M +4 -19 vg_syscalls.c 1.145
M +28 -0 x86-linux/core_platform.h 1.5
--- valgrind/coregrind/vg_mylibc.c #1.93:1.94
@@ -271,14 +271,10 @@ static Int munmap_inner(void *start, UIn
static Addr mmap_inner(void *start, UInt length, UInt prot, UInt flags, UInt fd, UInt offset)
{
- UInt args[6];
-
- args[0] = (UInt)start;
- args[1] = length;
- args[2] = prot;
- args[3] = flags & ~(VKI_MAP_NOSYMS|VKI_MAP_CLIENT);
- args[4] = fd;
- args[5] = offset;
+ Int ret;
- return VG_(do_syscall)(__NR_mmap, (UInt)(&(args[0])) );
+ PLATFORM_DO_MMAP(ret, start, length, prot,
+ flags & ~(VKI_MAP_NOSYMS|VKI_MAP_CLIENT),
+ fd, offset);
+ return ret;
}
--- valgrind/coregrind/vg_syscalls.c #1.144:1.145
@@ -4184,15 +4184,9 @@ PRE(mmap)
*/
- UInt* arg_block = (UInt*)arg1;
UInt a1, a2, a3, a4, a5, a6;
- SYSCALL_TRACK( pre_mem_read, tid, "mmap(args)", arg1, 6*sizeof(UInt) );
+ vg_assert(tid = tst->tid);
+ PLATFORM_GET_MMAP_ARGS(tst, a1, a2, a3, a4, a5, a6);
- a1 = arg_block[0];
- a2 = arg_block[1];
- a3 = arg_block[2];
- a4 = arg_block[3];
- a5 = arg_block[4];
- a6 = arg_block[5];
MAYBE_PRINTF("mmap ( %p, %d, %d, %d, %d, %d )\n",
a1, a2, a3, a4, a5, a6 );
@@ -4204,5 +4198,5 @@ PRE(mmap)
}
} else {
- a1 = VG_(find_map_space)(arg_block[0], arg_block[1], True);
+ a1 = VG_(find_map_space)(a1, a2, True);
if (a1 == 0)
res = -VKI_ENOMEM;
@@ -4212,14 +4206,5 @@ PRE(mmap)
if (res != -VKI_ENOMEM) {
- UInt new_arg_block[6];
-
- new_arg_block[0] = a1;
- new_arg_block[1] = a2;
- new_arg_block[2] = a3;
- new_arg_block[3] = a4;
- new_arg_block[4] = a5;
- new_arg_block[5] = a6;
-
- res = VG_(do_syscall)(__NR_mmap, new_arg_block);
+ PLATFORM_DO_MMAP(res, a1, a2, a3, a4, a5, a6);
if (!VG_(is_kerror)(res)) {
--- valgrind/coregrind/x86-linux/core_platform.h #1.4:1.5
@@ -94,4 +94,32 @@ extern Addr VG_(do_useseg) ( UInt seg_se
#define UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.eax)
+/* ---------------------------------------------------------------------
+ mmap() stuff
+ ------------------------------------------------------------------ */
+
+#define PLATFORM_DO_MMAP(ret, start, length, prot, flags, fd, offset) { \
+ UInt __args[6]; \
+ \
+ __args[0] = (UInt)(start); \
+ __args[1] = (length); \
+ __args[2] = (prot); \
+ __args[3] = (flags); \
+ __args[4] = (fd); \
+ __args[5] = (offset); \
+ \
+ ret = VG_(do_syscall)(__NR_mmap, (UInt)(&(__args[0])) ); \
+}
+
+#define PLATFORM_GET_MMAP_ARGS(tst, a1, a2, a3, a4, a5, a6) do {\
+ UInt *arg_block = (UInt*)PLATFORM_SYSCALL_ARG1(tst->arch); \
+ SYSCALL_TRACK( pre_mem_read, tst->tid, "mmap(args)", arg1, 6*sizeof(UWord) ); \
+ a1 = arg_block[0]; \
+ a2 = arg_block[1]; \
+ a3 = arg_block[2]; \
+ a4 = arg_block[3]; \
+ a5 = arg_block[4]; \
+ a6 = arg_block[5]; \
+} while (0)
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 14:47:31
|
On Mon, 18 Oct 2004, Adam Gundy wrote: > you are assuming that sizeof( int ) == sizeof( char * ), which it won't on > 64 bit platforms... just a thought. Hmm, yes. I'll fix. Thanks. > what's wrong with: > > init_sp = &argc; Is it actually certain that argc will be on the stack? Eg. for PPC, functions args usually get passed in registers... I'm not really sure, I'm copying Paul Mackerras' PPC port here. N |
|
From: Adam G. <ar...@cy...> - 2004-10-18 14:41:50
|
At 01:52 PM 10/18/2004 +0200, Nicholas Nethercote wrote:
>CVS commit by nethercote:
>
>
>Arch-abstraction: a nice change that removes the need for ume_entry.S. Instead
>of using an assembly hack to find the stack pointer at startup, we find it from
>argv. It's much simpler, avoids linking games, is platform independent, and
>works on PPC.
you are assuming that sizeof( int ) == sizeof( char * ), which it won't on
64 bit platforms... just a thought.
what's wrong with:
init_sp = &argc;
?
>-int main(void)
>+int main(int argc, char** argv)
> {
> struct rlimit rlim;
>@@ -303,5 +306,7 @@ int main(void)
> valgrind_lib = cp;
>
>- assert(ume_exec_esp != NULL);
>+ // Initial stack pointer is to argc, which is immediately before argv[0]
>+ // on the stack.
>+ init_sp = argv - 1;
Seeya,
Adam
--
Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.
|
|
From: Tom H. <th...@cy...> - 2004-10-18 14:35:09
|
In message <147...@xf...>
=B4=EC=EF=E7=D5=DD=DA=DE =B4=DC=D8=E2=E0=D8=D9 =B3=D5=DD=DD=D0=D4=
=EC=D5=D2=D8=E7 <di...@cr...> wrote:
> siglongjmp() and has 'assertion failed' at exit
> 2) helgrind start program, partially load libraries, produce message
> about mutexes and die with 'INTERNAL ERROR'
> 3) memcheck/helgrind's full output is attached as text-files
>
> I may do something to help you to find an error(s)?
File bugs in the bug tracker, preferably with test cases.
Tom
--=20
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: <di...@cr...> - 2004-10-18 14:25:01
|
Hello I use latest valgrind-CVS (`cvs up' one hour ago), RH90 (last updated in = July 2004) under VmWare-latest. 'make regtest' has no errors. I run big multy-threaded program and have errors from helgrind and from = memcheck. 1) with memcheck program run fine. Memcheck produce 1 warning about = siglongjmp() and has 'assertion failed' at exit 2) helgrind start program, partially load libraries, produce message = about mutexes and die with 'INTERNAL ERROR' 3) memcheck/helgrind's full output is attached as text-files I may do something to help you to find an error(s)? Dmitry |
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 14:08:29
|
CVS commit by nethercote:
Arch-abstraction:
- just a couple more constants moved
M +0 -7 core.h 1.38
M +0 -3 vg_signals.c 1.96
M +8 -2 x86/core_arch.h 1.11
--- valgrind/coregrind/core.h #1.37:1.38
@@ -101,11 +101,4 @@
------------------------------------------------------------------ */
-/* Total number of spill slots available for allocation, if a TempReg
- doesn't make it into a RealReg. Just bomb the entire system if
- this value is too small; we don't expect it will ever get
- particularly high. */
-#define VG_MAX_SPILLSLOTS 24
-
-
/* Constants for the slow translation lookup cache. */
#define VG_TRANSTAB_SLOW_BITS 11
--- valgrind/coregrind/vg_signals.c #1.95:1.96
@@ -97,7 +97,4 @@ static const Char *signame(Int sigNo);
------------------------------------------------------------------ */
-/* Valgrind's signal stack size, in words */
-#define VG_SIGSTACK_SIZE_W 10000
-
/* We have to ask for signals to be delivered on an alternative
stack, since it is possible, although unlikely, that we'll have to run
--- valgrind/coregrind/x86/core_arch.h #1.10:1.11
@@ -308,8 +308,14 @@ arch_thread_t;
/* ---------------------------------------------------------------------
- Constants involving memory layout
+ Miscellaneous constants
------------------------------------------------------------------ */
-// base address of client address space
+// Total number of spill slots available for register allocation.
+#define VG_MAX_SPILLSLOTS 24
+
+// Valgrind's signal stack size, in words.
+#define VG_SIGSTACK_SIZE_W 10000
+
+// Base address of client address space.
#define CLIENT_BASE 0x00000000ul
|
|
From: Tom H. <th...@cy...> - 2004-10-18 12:11:27
|
CVS commit by thughes:
Add a couple of lines that were missed out in the long timeouts patch.
M +2 -0 vg_libpthread.c 1.170
--- valgrind/coregrind/vg_libpthread.c #1.169:1.170
@@ -1376,4 +1376,6 @@ int __pthread_mutex_timedlock(pthread_mu
if (ull_ms_end_after_1970 < ull_ms_now_after_1970)
ull_ms_end_after_1970 = ull_ms_now_after_1970;
+ ull_ms_now = ((unsigned long long int)(ms_now));
+ ull_ms_end = ull_ms_now + (ull_ms_end_after_1970 - ull_ms_now_after_1970);
if (ull_ms_end >= (unsigned long long int)(0xFFFFFFFFUL)) {
/* use 0xFFFFFFFEUL because 0xFFFFFFFFUL is reserved for no timeout
|
|
From: Nicholas N. <nj...@ca...> - 2004-10-18 11:52:30
|
CVS commit by nethercote:
Arch-abstraction: a nice change that removes the need for ume_entry.S. Instead
of using an assembly hack to find the stack pointer at startup, we find it from
argv. It's much simpler, avoids linking games, is platform independent, and
works on PPC.
M +2 -4 coregrind/Makefile.am 1.90
M +9 -4 coregrind/stage1.c 1.24
M +0 -2 coregrind/ume.h 1.13
M +14 -6 coregrind/vg_main.c 1.217
M +1 -2 coregrind/x86/Makefile.am 1.14
M +0 -2 memcheck/tests/Makefile.am 1.46
M +20 -16 memcheck/tests/vgtest_ume.c 1.4
R coregrind/x86/ume_entry.S 1.3
--- valgrind/coregrind/Makefile.am #1.89:1.90
@@ -31,10 +31,9 @@
valgrind_SOURCES = \
ume.c \
- ${VG_ARCH}/ume_entry.S \
\
stage1.c \
${VG_ARCH}/jmp_with_stack.c
valgrind_DEPENDENCIES =
-valgrind_LDFLAGS=-static -g -Wl,-e,_ume_entry
+valgrind_LDFLAGS=-static -g
valgrind_LDADD=
@@ -47,5 +46,4 @@
stage2_SOURCES = \
ume.c \
- ${VG_ARCH}/ume_entry.S \
\
vg_scheduler.c \
@@ -82,5 +80,5 @@
vg_cpuid.S
stage2_DEPENDENCIES = $(srcdir)/valgrind.vs ${VG_ARCH}/stage2.lds
-stage2_LDFLAGS=-Wl,--export-dynamic -Wl,-e,_ume_entry -g \
+stage2_LDFLAGS=-Wl,--export-dynamic -g \
-Wl,-defsym,kickstart_base=$(KICKSTART_BASE) \
-Wl,-T,${VG_ARCH}/stage2.lds \
--- valgrind/coregrind/stage1.c #1.23:1.24
@@ -47,4 +47,7 @@
static int stack[SIGSTKSZ*4];
+// Initial stack pointer, which points to argc.
+static void* init_sp;
+
/* Where we expect to find all our aux files (namely, stage2) */
static const char *valgrind_lib = VG_LIBDIR;
@@ -258,5 +261,5 @@ static void main2(void)
info.exe_base = PGROUNDUP(&_end);
- info.exe_end = PGROUNDDN(ume_exec_esp);
+ info.exe_end = PGROUNDDN(init_sp);
/* XXX FIXME: how can stage1 know where stage2 wants things placed?
@@ -284,5 +287,5 @@ static void main2(void)
as_pad(0, (void *)info.map_base, padfile);
- esp = fix_auxv(ume_exec_esp, &info, padfile);
+ esp = fix_auxv(init_sp, &info, padfile);
if (0) {
@@ -295,5 +298,5 @@ static void main2(void)
}
-int main(void)
+int main(int argc, char** argv)
{
struct rlimit rlim;
@@ -303,5 +306,7 @@ int main(void)
valgrind_lib = cp;
- assert(ume_exec_esp != NULL);
+ // Initial stack pointer is to argc, which is immediately before argv[0]
+ // on the stack.
+ init_sp = argv - 1;
/* Set the address space limit as high as it will go, since we make
--- valgrind/coregrind/ume.h #1.12:1.13
@@ -56,6 +56,4 @@ void foreach_map(int (*fn)(char *start,
typedef ESZ(Addr) addr_t;
-extern void *ume_exec_esp; /* esp on entry at exec time */
-
// Jump to a new 'ip' with the stack 'sp'.
void jmp_with_stack(addr_t ip, addr_t sp) __attribute__((noreturn));
--- valgrind/coregrind/vg_main.c #1.216:1.217
@@ -363,7 +363,7 @@ static void newpid(ThreadId unused)
/* Look for our AUXV table */
-int scan_auxv(void)
+int scan_auxv(void* init_sp)
{
- const struct ume_auxv *auxv = find_auxv((int *)ume_exec_esp);
+ const struct ume_auxv *auxv = find_auxv((int *)init_sp);
int padfile = -1, found = 0;
@@ -909,5 +909,6 @@ static char *copy_str(char **tab, const
: :
*/
-static Addr setup_client_stack(char **orig_argv, char **orig_envp,
+static Addr setup_client_stack(void* init_sp,
+ char **orig_argv, char **orig_envp,
const struct exeinfo *info,
UInt** client_auxv)
@@ -929,5 +930,5 @@ static Addr setup_client_stack(char **or
/* use our own auxv as a prototype */
- orig_auxv = find_auxv(ume_exec_esp);
+ orig_auxv = find_auxv(init_sp);
/* ==================== compute sizes ==================== */
@@ -2577,5 +2578,8 @@ int main(int argc, char **argv)
// p: n/a
//--------------------------------------------------------------
- padfile = scan_auxv();
+ {
+ void* init_sp = argv - 1;
+ padfile = scan_auxv(init_sp);
+ }
if (0) {
@@ -2651,5 +2655,9 @@ int main(int argc, char **argv)
// p: fix_environment() [for 'env']
//--------------------------------------------------------------
- esp_at_startup = setup_client_stack(cl_argv, env, &info, &client_auxv);
+ {
+ void* init_sp = argv - 1;
+ esp_at_startup = setup_client_stack(init_sp, cl_argv, env, &info,
+ &client_auxv);
+ }
if (0)
--- valgrind/coregrind/x86/Makefile.am #1.13:1.14
@@ -12,6 +12,5 @@
EXTRA_DIST = \
- jmp_with_stack.c \
- ume_entry.S
+ jmp_with_stack.c
BUILT_SOURCES = stage2.lds
--- valgrind/memcheck/tests/Makefile.am #1.45:1.46
@@ -166,7 +166,5 @@
-Wl,-T,../../coregrind/${VG_ARCH}/stage2.lds
vgtest_ume_SOURCES = vgtest_ume.c
-vgtest_ume_LDFLAGS = -Wl,-e,_ume_entry
vgtest_ume_LDADD = ../../coregrind/ume.o \
- ../../coregrind/ume_entry.o \
../../coregrind/jmp_with_stack.o
--- valgrind/memcheck/tests/vgtest_ume.c #1.3:1.4
@@ -1,5 +1,5 @@
#define ELFSZ 32
-// This file is a unit self-test for ume.c, ume_entry.c, jmp_with_stack.c
+// This file is a unit self-test for ume.c, jmp_with_stack.c
#include <stdlib.h>
@@ -11,9 +11,11 @@
#define STKSZ (64*1024)
+static void* init_sp;
+
//-------------------------------------------------------------------
// Test foreach_map()
//-------------------------------------------------------------------
-static int x;
+static int x[8];
static int f(char *start, char *end, const char *perm, off_t off,
@@ -21,14 +23,14 @@ static int f(char *start, char *end, con
// Just do some nonsense action with each of the values so that Memcheck
// checks that they are valid.
- x = ( start == 0 ? 0 : 1 );
- x = ( end == 0 ? 0 : 1 );
- x = ( perm == 0 ? 0 : 1 );
- x = ( off == 0 ? 0 : 1 );
- x = ( maj == 0 ? 0 : 1 );
- x = ( min == 0 ? 0 : 1 );
- x = ( ino == 0 ? 0 : 1 );
- x = ( dummy == 0 ? 0 : 1 );
+ x[0] = ( start == 0 ? 0 : 1 );
+ x[1] = ( end == 0 ? 0 : 1 );
+ x[2] = ( perm == 0 ? 0 : 1 );
+ x[3] = ( off == 0 ? 0 : 1 );
+ x[4] = ( maj == 0 ? 0 : 1 );
+ x[5] = ( min == 0 ? 0 : 1 );
+ x[6] = ( ino == 0 ? 0 : 1 );
+ x[7] = ( dummy == 0 ? 0 : 1 );
- return /*True*/1;
+ return /*True*/1 + x[0] + x[1] + x[2] + x[3] + x[4] + x[5] + x[6] + x[7];
}
@@ -47,12 +49,12 @@ static void test__find_auxv(void)
struct ume_auxv *auxv;
- assert(ume_exec_esp != NULL);
+ assert(init_sp != NULL);
fprintf(stderr, "Calling find_auxv()\n");
- auxv = find_auxv((int*)ume_exec_esp);
+ auxv = find_auxv((int*)init_sp);
// Check the auxv value looks sane
- assert((void*)auxv > (void*)ume_exec_esp);
- assert((unsigned int)auxv - (unsigned int)ume_exec_esp < 0x10000);
+ assert((void*)auxv > (void*)init_sp);
+ assert((unsigned int)auxv - (unsigned int)init_sp < 0x10000);
// Scan the auxv, check it looks sane
@@ -137,6 +139,8 @@ static void test__do_exec(void)
}
-int main(void)
+int main(int argc, char** argv)
{
+ init_sp = argv - 1;
+
test__foreach_map();
test__find_auxv();
|
|
From: Tom H. <th...@cy...> - 2004-10-18 03:05:11
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-10-18 02:00:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow dastest: valgrind ./dastest discard: valgrind ./discard exec-sigmask: valgrind ./exec-sigmask execve: valgrind ./execve fcntl_setown: valgrind ./fcntl_setown floored: valgrind ./floored fork: valgrind -q ./fork fpu_lazy_eflags: valgrind ./fpu_lazy_eflags fucomip: valgrind ./fucomip gxx304: valgrind ./gxx304 insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse int: valgrind ./int sh: ./filter_int: No such file or directory Could not read `int.stderr.exp' make: *** [regtest] Error 2 |
|
From: <js...@ac...> - 2004-10-18 02:55:45
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2004-10-18 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 177 tests, 3 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_fcntl (stderr) memcheck/tests/threadederrno (stdout) memcheck/tests/threadederrno (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |