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
(17) |
2
(11) |
3
(6) |
4
(6) |
|
5
(10) |
6
(5) |
7
(3) |
8
(7) |
9
(4) |
10
(4) |
11
(3) |
|
12
(3) |
13
(17) |
14
(18) |
15
(32) |
16
(22) |
17
(18) |
18
(10) |
|
19
(4) |
20
(3) |
21
(8) |
22
(15) |
23
(32) |
24
(28) |
25
(18) |
|
26
(20) |
27
(16) |
28
(28) |
29
(28) |
30
(27) |
|
|
|
From: <sv...@va...> - 2009-04-01 21:58:55
|
Author: sewardj
Date: 2009-04-01 22:58:36 +0100 (Wed, 01 Apr 2009)
New Revision: 9510
Log:
Remove unused field wq_jmpbuf in ThreadOSState for Darwin.
Modified:
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/pub_core_threadstate.h
Modified: branches/DARWIN/coregrind/m_scheduler/scheduler.c
===================================================================
--- branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-04-01 21:37:37 UTC (rev 9509)
+++ branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-04-01 21:58:36 UTC (rev 9510)
@@ -412,7 +412,6 @@
VG_(memset)(&tst->os_state.child_go, 0, sizeof(tst->os_state.child_go));
VG_(memset)(&tst->os_state.child_done, 0, sizeof(tst->os_state.child_done));
tst->os_state.wq_jmpbuf_valid = False;
- VG_(memset)(&tst->os_state.wq_jmpbuf, 0, sizeof(tst->os_state.wq_jmpbuf));
tst->os_state.remote_port = 0;
tst->os_state.msgh_id = 0;
VG_(memset)(&tst->os_state.mach_args, 0, sizeof(tst->os_state.mach_args));
Modified: branches/DARWIN/coregrind/pub_core_threadstate.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_threadstate.h 2009-04-01 21:37:37 UTC (rev 9509)
+++ branches/DARWIN/coregrind/pub_core_threadstate.h 2009-04-01 21:58:36 UTC (rev 9510)
@@ -167,8 +167,12 @@
// Workqueue re-entry
// (setjmp in PRE(workq_ops), longjmp in wqthread_hijack)
+ // JRS fixme: this comment is no longer correct; wq_jmpbuf is
+ // never used, and there is no such setjmp or longjmp pair.
+ // I guess we could leave wq_jmpbuf_valid in place though, since
+ // it does allow for an assertion in ML_(wqthread_continue_NORETURN).
Bool wq_jmpbuf_valid;
- jmp_buf wq_jmpbuf;
+ //jmp_buf wq_jmpbuf;
// Values saved from transient Mach RPC messages
Addr remote_port; // destination for original message
|
|
From: <sv...@va...> - 2009-04-01 21:38:31
|
Author: sewardj
Date: 2009-04-01 22:37:37 +0100 (Wed, 01 Apr 2009)
New Revision: 9509
Log:
os_state_clear: initialise Darwin-specific fields. Prior to this commit
only the Linux- and AIX5- specific fields were cleared.
Modified:
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/pub_core_threadstate.h
Modified: branches/DARWIN/coregrind/m_scheduler/scheduler.c
===================================================================
--- branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-04-01 21:18:14 UTC (rev 9508)
+++ branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-04-01 21:37:37 UTC (rev 9509)
@@ -399,10 +399,25 @@
{
tst->os_state.lwpid = 0;
tst->os_state.threadgroup = 0;
-# if defined(VGO_aix5)
+# if defined(VGO_linux)
+ /* no other fields to clear */
+# elif defined(VGO_aix5)
tst->os_state.cancel_async = False;
tst->os_state.cancel_disabled = False;
tst->os_state.cancel_progress = Canc_NoRequest;
+# elif defined(VGO_darwin)
+ tst->os_state.post_mach_trap_fn = NULL;
+ tst->os_state.pthread = 0;
+ tst->os_state.func_arg = 0;
+ VG_(memset)(&tst->os_state.child_go, 0, sizeof(tst->os_state.child_go));
+ VG_(memset)(&tst->os_state.child_done, 0, sizeof(tst->os_state.child_done));
+ tst->os_state.wq_jmpbuf_valid = False;
+ VG_(memset)(&tst->os_state.wq_jmpbuf, 0, sizeof(tst->os_state.wq_jmpbuf));
+ tst->os_state.remote_port = 0;
+ tst->os_state.msgh_id = 0;
+ VG_(memset)(&tst->os_state.mach_args, 0, sizeof(tst->os_state.mach_args));
+# else
+# error "Unknown OS"
# endif
}
Modified: branches/DARWIN/coregrind/pub_core_threadstate.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_threadstate.h 2009-04-01 21:18:14 UTC (rev 9508)
+++ branches/DARWIN/coregrind/pub_core_threadstate.h 2009-04-01 21:37:37 UTC (rev 9509)
@@ -117,7 +117,9 @@
ThreadArchState;
-/* OS-specific thread state */
+/* OS-specific thread state. IMPORTANT: if you add fields to this,
+ you _must_ add code to os_state_clear() to initialise those
+ fields. */
typedef
struct {
/* who we are */
@@ -270,7 +272,7 @@
char *path;
} io_registry_entry_from_path;
} mach_args;
-# endif
+# endif
}
ThreadOSstate;
|
|
From: <sv...@va...> - 2009-04-01 21:19:00
|
Author: sewardj
Date: 2009-04-01 22:18:14 +0100 (Wed, 01 Apr 2009)
New Revision: 9508
Log:
calculate_SKSS_from_SCSS: formatting-only change - remove large
numbers of trailing spaces from some lines.
VG_(kill_self): comment-only change re potential failure of
VG_(kill) on Darwin.
shutdown_actions_NORETURN: don't assert if, as a result of the
above, VG_(kill_self) returns on Darwin.
Modified:
branches/DARWIN/coregrind/m_main.c
branches/DARWIN/coregrind/m_signals.c
Modified: branches/DARWIN/coregrind/m_main.c
===================================================================
--- branches/DARWIN/coregrind/m_main.c 2009-04-01 19:48:42 UTC (rev 9507)
+++ branches/DARWIN/coregrind/m_main.c 2009-04-01 21:18:14 UTC (rev 9508)
@@ -2246,6 +2246,13 @@
/* We were killed by a fatal signal, so replicate the effect */
vg_assert(VG_(threads)[tid].os_state.fatalsig != 0);
VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
+ /* we shouldn't be alive at this point. But VG_(kill_self)
+ sometimes fails with EPERM on Darwin, for unclear reasons. */
+# if defined(VGO_darwin)
+ VG_(debugLog)(0, "main", "VG_(kill_self) failed. Exiting normally.\n");
+ VG_(exit)(0); /* bogus, but we really need to exit now */
+ /* fall through .. */
+# endif
VG_(core_panic)("main(): signal was supposed to be fatal");
break;
Modified: branches/DARWIN/coregrind/m_signals.c
===================================================================
--- branches/DARWIN/coregrind/m_signals.c 2009-04-01 19:48:42 UTC (rev 9507)
+++ branches/DARWIN/coregrind/m_signals.c 2009-04-01 21:18:14 UTC (rev 9508)
@@ -555,13 +555,13 @@
case VKI_SIGCONT:
/* Let the kernel handle SIGCONT unless the client is actually
catching it. */
- case VKI_SIGCHLD:
- case VKI_SIGWINCH:
- case VKI_SIGURG:
- /* For signals which are have a default action of Ignore,
- only set a handler if the client has set a signal handler.
- Otherwise the kernel will interrupt a syscall which
- wouldn't have otherwise been interrupted. */
+ case VKI_SIGCHLD:
+ case VKI_SIGWINCH:
+ case VKI_SIGURG:
+ /* For signals which are have a default action of Ignore,
+ only set a handler if the client has set a signal handler.
+ Otherwise the kernel will interrupt a syscall which
+ wouldn't have otherwise been interrupted. */
if (scss.scss_per_sig[sig].scss_handler == VKI_SIG_DFL)
skss_handler = VKI_SIG_DFL;
else if (scss.scss_per_sig[sig].scss_handler == VKI_SIG_IGN)
@@ -1229,6 +1229,7 @@
/* Hit ourselves with a signal using the default handler */
void VG_(kill_self)(Int sigNo)
{
+ Int r;
vki_sigset_t mask, origmask;
vki_sigaction_toK_t sa, origsa2;
vki_sigaction_fromK_t origsa;
@@ -1247,7 +1248,9 @@
VG_(sigaddset)(&mask, sigNo);
VG_(sigprocmask)(VKI_SIG_UNBLOCK, &mask, &origmask);
- VG_(kill)(VG_(getpid)(), sigNo);
+ r = VG_(kill)(VG_(getpid)(), sigNo);
+ /* This sometimes fails with EPERM on Darwin. I don't know why. */
+ /* vg_assert(r == 0); */
VG_(convert_sigaction_fromK_to_toK)( &origsa, &origsa2 );
VG_(sigaction)(sigNo, &origsa2, NULL);
|
|
From: <sv...@va...> - 2009-04-01 19:49:31
|
Author: sewardj
Date: 2009-04-01 20:48:42 +0100 (Wed, 01 Apr 2009)
New Revision: 9507
Log:
pthread_hijack, wqthread_hijack: start these threads with the correct
signal mask (everything blocked).
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-04-01 16:17:01 UTC (rev 9506)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-04-01 19:48:42 UTC (rev 9507)
@@ -275,6 +275,7 @@
void pthread_hijack(Addr self, Addr kport, Addr func, Addr func_arg,
Addr stacksize, Addr flags, Addr sp)
{
+ vki_sigset_t blockall;
ThreadState *tst = (ThreadState *)func_arg;
VexGuestX86State *vex = &tst->arch.vex;
@@ -284,6 +285,11 @@
// The parent thread holds V's lock on our behalf.
semaphore_wait(tst->os_state.child_go);
+ /* Start the thread with all signals blocked. VG_(scheduler) will
+ set the mask correctly when we finally get there. */
+ VG_(sigfillset)(&blockall);
+ VG_(sigprocmask)(VKI_SIG_SETMASK, &blockall, NULL);
+
// Set thread's registers
// Do this FIRST because some code below tries to collect a backtrace,
// which requires valid register data.
@@ -377,6 +383,7 @@
VexGuestX86State *vex;
Addr stack;
SizeT stacksize;
+ vki_sigset_t blockall;
/* When we enter here we hold no lock (!), so we better acquire it
pronto. Why do we hold no lock? Because (presumably) the only
@@ -388,6 +395,11 @@
lock. */
VG_(acquire_BigLock_LL)("wqthread_hijack");
+ /* Start the thread with all signals blocked. VG_(scheduler) will
+ set the mask correctly when we finally get there. */
+ VG_(sigfillset)(&blockall);
+ VG_(sigprocmask)(VKI_SIG_SETMASK, &blockall, NULL);
+
if (reuse) {
// This thread already exists; we're merely re-entering
// after leaving via workq_ops(WQOPS_THREAD_RETURN).
|
|
From: Johan B. <jb...@gm...> - 2009-04-01 17:31:53
|
Just an update in case anyone searches the mailinglist. The issue is that an unaligned word load on ARM is translated into an aligned word load with the data rotated. (sigh) I haven't checked any recent kernel if they've changed the default, but you can 'cat /proc/cpu/alignment' to find out if the kernel is configured to fix unaligned accesses, and you can enable it by executing echo 2 > /proc/cpu/alignment I don't think it's worth to fix the unaligned accesses in valgrind right now, so if you are going to use the arm port, be aware that you have to enable kernel fixups of the unaligned word accesses. /Johan |
|
From: <sv...@va...> - 2009-04-01 16:17:09
|
Author: sewardj
Date: 2009-04-01 17:17:01 +0100 (Wed, 01 Apr 2009)
New Revision: 9506
Log:
On Darwin, __NR_sigprocmask appears to affect the entire process,
not just this thread. Hence need to use __NR___pthread_sigmask
instead. Failure to do this causes V's threads to run with
unduly permissive signal masks (normally threads run with all
except synch signals blocked), and this causes async_sighandler
to assert because async signals (eg ^C) to be delivered
unexpectedly.
Also: VG_(kill): pass 3rd arg of 1 on Darwin -- requests posix
compliance, probably unnecessary, but who knows.
Modified:
branches/DARWIN/coregrind/m_libcsignal.c
branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S
branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
Modified: branches/DARWIN/coregrind/m_libcsignal.c
===================================================================
--- branches/DARWIN/coregrind/m_libcsignal.c 2009-03-31 14:30:39 UTC (rev 9505)
+++ branches/DARWIN/coregrind/m_libcsignal.c 2009-04-01 16:17:01 UTC (rev 9506)
@@ -176,6 +176,7 @@
*/
Int VG_(sigprocmask)( Int how, const vki_sigset_t* set, vki_sigset_t* oldset)
{
+# if defined(VGO_linux) || defined(VGO_aix5)
# if defined(__NR_rt_sigprocmask)
SysRes res = VG_(do_syscall4)(__NR_rt_sigprocmask,
how, (UWord)set, (UWord)oldset,
@@ -184,6 +185,16 @@
SysRes res = VG_(do_syscall3)(__NR_sigprocmask,
how, (UWord)set, (UWord)oldset);
# endif
+
+# elif defined(VGO_darwin)
+ /* On Darwin, __NR_sigprocmask appears to affect the entire
+ process, not just this thread. Hence need to use
+ __NR___pthread_sigmask instead. */
+ SysRes res = VG_(do_syscall3)(__NR___pthread_sigmask,
+ how, (UWord)set, (UWord)oldset);
+# else
+# error "Unknown OS"
+# endif
return sr_isError(res) ? -1 : 0;
}
@@ -288,7 +299,14 @@
Int VG_(kill)( Int pid, Int signo )
{
+# if defined(VGO_linux) || defined(VGO_aix5)
SysRes res = VG_(do_syscall2)(__NR_kill, pid, signo);
+# elif defined(VGO_darwin)
+ SysRes res = VG_(do_syscall3)(__NR_kill,
+ pid, signo, 1/*posix-compliant*/);
+# else
+# error "Unsupported OS"
+# endif
return sr_isError(res) ? -1 : 0;
}
Modified: branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S 2009-03-31 14:30:39 UTC (rev 9505)
+++ branches/DARWIN/coregrind/m_syswrap/syscall-amd64-darwin.S 2009-04-01 16:17:01 UTC (rev 9506)
@@ -96,7 +96,7 @@
/* Set the signal mask which should be current during the syscall. */
/* GrP fixme signals
-
+ JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
movq $__NR_rt_sigprocmask, %rax // syscall #
movq $VKI_SIG_SETMASK, %rdi // how
movq -24(%rbp), %rsi // sysmask
@@ -159,6 +159,7 @@
L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall
is complete and we needn't worry about it. */
/* GrP fixme signals
+ JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask
PUSH_di_si_dx_cx_8
movq $__NR_rt_sigprocmask, %rax // syscall #
Modified: branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S 2009-03-31 14:30:39 UTC (rev 9505)
+++ branches/DARWIN/coregrind/m_syswrap/syscall-x86-darwin.S 2009-04-01 16:17:01 UTC (rev 9506)
@@ -85,19 +85,19 @@
mov %esp, %ebp
subl $$8, %esp /* 16-byte align stack */
-L_$0_1: /* Even though we can't take a signal until the sigprocmask completes,
- start the range early.
+L_$0_1: /* Even though we can't take a signal until the
+ __pthread_sigmask completes, start the range early.
If eip is in the range [1,2), the syscall hasn't been started yet */
/* Set the signal mask which should be current during the syscall. */
- /* Set up for sigprocmask(SIG_SETMASK, sysmask, postmask) */
+ /* Set up for __pthread_sigmask(SIG_SETMASK, sysmask, postmask) */
pushl 20(%ebp)
pushl 16(%ebp)
pushl $$VKI_SIG_SETMASK
pushl $$0xcafebabe /* totally fake return address */
- movl $$__NR_sigprocmask, %eax
+ movl $$__NR___pthread_sigmask, %eax
int $$0x80 /* should be sysenter? */
- jc L_$0_7 /* sigprocmask failed */
+ jc L_$0_7 /* __pthread_sigmask failed */
addl $$16,%esp
/* Copy syscall parameters to the stack - assume no more than 8
@@ -161,14 +161,14 @@
L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall is
complete and we needn't worry about it. */
- /* Set up for sigprocmask(SIG_SETMASK, postmask, NULL) */
+ /* Set up for __pthread_sigmask(SIG_SETMASK, postmask, NULL) */
pushl $$0
pushl 20(%ebp)
pushl $$VKI_SIG_SETMASK
pushl $$0xcafef00d /* totally fake return address */
- movl $$__NR_sigprocmask, %eax
+ movl $$__NR___pthread_sigmask, %eax
int $$0x80 /* should be sysenter? */
- jc L_$0_7 /* sigprocmask failed */
+ jc L_$0_7 /* __pthread_sigmask failed */
addl $$16,%esp
L_$0_5: /* now safe from signals */
|
|
From: Tom H. <to...@co...> - 2009-04-01 15:03:38
|
Konstantin Serebryany wrote: > On Wed, Apr 1, 2009 at 6:15 PM, Bart Van Assche > <bar...@gm...> wrote: >> On Wed, Apr 1, 2009 at 11:19 AM, Konstantin Serebryany >> <kon...@gm...> wrote: >>> As you can see, the 3-rd parameter of sys_clone() is a bit different >>> from what VG_(thread_get_stack_max) returns. >>> Why? >> This source code from coregrind/m_syswrap/syswrap-amd64-linux.c >> explains it (VG_(thread_get_stack_max)() returns >> client_stack_highest_word): >> >> /* We don't really know where the client stack is, because its >> allocated by the client. > I am not sure this is entirely true, especially for amd64-linux. > We do have the top of the stack as one of the parameters of clone(). > No? That only tells us where one end of the stack is though - we have to guess where the other end is. Our stack handling is all bollocks anyway - there are two different systems trying to track the stacks and neither of them does a good job at all. It all needs a rewrite basically. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Bart V. A. <bar...@gm...> - 2009-04-01 14:47:24
|
On Wed, Apr 1, 2009 at 4:20 PM, Konstantin Serebryany <kon...@gm...> wrote: > On Wed, Apr 1, 2009 at 6:15 PM, Bart Van Assche > <bar...@gm...> wrote: >> On Wed, Apr 1, 2009 at 11:19 AM, Konstantin Serebryany >> <kon...@gm...> wrote: >>> As you can see, the 3-rd parameter of sys_clone() is a bit different >>> from what VG_(thread_get_stack_max) returns. >>> Why? >> >> This source code from coregrind/m_syswrap/syswrap-amd64-linux.c >> explains it (VG_(thread_get_stack_max)() returns >> client_stack_highest_word): >> >> /* We don't really know where the client stack is, because its >> allocated by the client. > I am not sure this is entirely true, especially for amd64-linux. > We do have the top of the stack as one of the parameters of clone(). > No? The comment in coregrind/m_syswrap/syswrap-amd64-linux.c was clearly copied from syswrap-x86-linux.c, so I don't know how accurate the comment is for amd64. But there must have been a reason why the comment was added in syswrap-x86-linux.c originally. Bart. |
|
From: Bart V. A. <bar...@gm...> - 2009-04-01 14:47:10
|
On Wed, Apr 1, 2009 at 11:19 AM, Konstantin Serebryany
<kon...@gm...> wrote:
> As you can see, the 3-rd parameter of sys_clone() is a bit different
> from what VG_(thread_get_stack_max) returns.
> Why?
This source code from coregrind/m_syswrap/syswrap-amd64-linux.c
explains it (VG_(thread_get_stack_max)() returns
client_stack_highest_word):
/* We don't really know where the client stack is, because its
allocated by the client. The best we can do is look at the
memory mappings and try to derive some useful information. We
assume that esp starts near its highest possible value, and can
only go down to the start of the mmaped segment. */
seg = VG_(am_find_nsegment)((Addr)rsp);
if (seg && seg->kind != SkResvn) {
ctst->client_stack_highest_word = (Addr)VG_PGROUNDUP(rsp);
ctst->client_stack_szB = ctst->client_stack_highest_word - seg->start;
VG_(register_stack)(seg->start, ctst->client_stack_highest_word);
Bart.
|
|
From: Konstantin S. <kon...@gm...> - 2009-04-01 14:44:15
|
On Wed, Apr 1, 2009 at 6:15 PM, Bart Van Assche
<bar...@gm...> wrote:
> On Wed, Apr 1, 2009 at 11:19 AM, Konstantin Serebryany
> <kon...@gm...> wrote:
>> As you can see, the 3-rd parameter of sys_clone() is a bit different
>> from what VG_(thread_get_stack_max) returns.
>> Why?
>
> This source code from coregrind/m_syswrap/syswrap-amd64-linux.c
> explains it (VG_(thread_get_stack_max)() returns
> client_stack_highest_word):
>
> /* We don't really know where the client stack is, because its
> allocated by the client.
I am not sure this is entirely true, especially for amd64-linux.
We do have the top of the stack as one of the parameters of clone().
No?
--kcc
> The best we can do is look at the
> memory mappings and try to derive some useful information. We
> assume that esp starts near its highest possible value, and can
> only go down to the start of the mmaped segment. */
> seg = VG_(am_find_nsegment)((Addr)rsp);
> if (seg && seg->kind != SkResvn) {
> ctst->client_stack_highest_word = (Addr)VG_PGROUNDUP(rsp);
> ctst->client_stack_szB = ctst->client_stack_highest_word - seg->start;
>
> VG_(register_stack)(seg->start, ctst->client_stack_highest_word);
>
> Bart.
>
|
|
From: Nicholas N. <n.n...@gm...> - 2009-04-01 14:36:17
|
On Wed, Apr 1, 2009 at 2:37 AM, Filipe Cabecinhas <fi...@gm...> wrote:
>
> How can I bypass the system call if the parameters are such and such?
>
> something like:
> PRE(...)
> {
> ...
> if (ARG2 == VKI_KILL_IF_INVALID)
> dont_execute_syscall();
> ...
> }
I think you want the SET_STATUS_{Success,Failure,from_SysRes} macros
in coregrind/m_syswrap/priv_types_n_macros.h. They're used in various
places, eg. the wrapper for exit().
Nick
|
|
From: Konstantin S. <kon...@gm...> - 2009-04-01 09:19:41
|
On Tue, Mar 31, 2009 at 3:16 PM, Bart Van Assche <bar...@gm...> wrote: > On Tue, Mar 31, 2009 at 12:08 PM, Konstantin Serebryany > <kon...@gm...> wrote: >> There are at least two ways to fix this: >> - somehow recognize this h-b dependency introduced by libpthread >> - clear the state of stack/tls memory. >> >> Second way is preferable since it will not hide real races... > > When the Valgrind core notifies a tool that a thread exits the stack > pointer of that thread is still below the top of the stack because of > the area reserved by the NPTL. In the DRD tool the state of the > top-of-stack area is cleared explicitly when a thread exits. The > following code in DRD's pre_thread_ll_exit handler performs this task: > > drd_stop_using_mem(DRD_(thread_get_stack_min)(drd_tid), > DRD_(thread_get_stack_max)(drd_tid) > - DRD_(thread_get_stack_min)(drd_tid), > True); I tried the same thing. It helps sometimes, but not always. I see that the stack provided to clone() syscall is not the same as returned by VG_(thread_get_stack_max) (grr, hard to get a small reproducer) SYSCALL[1799,6]( 56) sys_clone ( 3d0f00, 0xf8cf240, [stack_max=]0xf8d09f0, 0xf8d09f0, [tls=]0xf8d0960 ) --> [pre-success] Success(0x71c) VG_(thread_get_stack_max)=0xF8D0000 VG_(threads)[tid].arch.vex.guest_FS_ZERO=0xF8D0960 (this is tls) As you can see, the 3-rd parameter of sys_clone() is a bit different from what VG_(thread_get_stack_max) returns. Why? Is there any way for a tool to get the 3-rd parameter of sys_clone? On amd64-linux I can get the tls from VG_(threads)[tid].arch.vex.guest_FS_ZERO, but that's too hackish. Thanks, --kcc > > Bart. > |
|
From: Bart V. A. <bar...@gm...> - 2009-04-01 08:24:52
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) started at 2009-04-01 02:00:02 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: Filipe C. <fi...@gm...> - 2009-04-01 07:37:13
|
Hi,
I'm implementing some Darwin syscalls but I'm having a small problem...
There's a system call that related to code signing. I want to disable
the call if the parameters are such and such. Otherwise, I get the
current process (valgrind) marked as "KILL if invalid" and, of course,
marked as invalid (the code that is running is not the signed code).
I already implemented the handling of the required fcntl to add the code
signatures and the system call itself (#169, csops).
How can I bypass the system call if the parameters are such and such?
something like:
PRE(...)
{
...
if (ARG2 == VKI_KILL_IF_INVALID)
dont_execute_syscall();
...
}
Thanks in advance,
Filipe Cabecinhas
|
|
From: Tom H. <th...@cy...> - 2009-04-01 03:05:31
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-04-01 03:20:06 BST 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-04-01 03:04:03
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-04-01 03:05:07 BST 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-04-01 02:47:20
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-04-01 03:10:03 BST 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) |