|
From: <sv...@va...> - 2009-07-22 19:17:12
|
Author: bart
Date: 2009-07-22 20:17:05 +0100 (Wed, 22 Jul 2009)
New Revision: 10534
Log:
More tweaking for Darwin.
Modified:
trunk/drd/drd_pthread_intercepts.c
Modified: trunk/drd/drd_pthread_intercepts.c
===================================================================
--- trunk/drd/drd_pthread_intercepts.c 2009-07-22 19:14:31 UTC (rev 10533)
+++ trunk/drd/drd_pthread_intercepts.c 2009-07-22 19:17:05 UTC (rev 10534)
@@ -611,8 +611,14 @@
return ret;
}
+// NOTE: be careful to intercept only pthread_cond_signal() and not Darwin's
+// pthread_cond_signal_thread_np(). The former accepts one argument; the latter
+// two. Intercepting all pthread_cond_signal* functions will cause only one
+// argument to be passed to pthread_cond_signal_np() and hence will cause this
+// last function to crash.
+
// pthread_cond_signal
-PTH_FUNC(int, pthreadZucondZusignalZa, // pthread_cond_signal*
+PTH_FUNC(int, pthreadZucondZusignal, // pthread_cond_signal
pthread_cond_t* cond)
{
int ret;
@@ -627,6 +633,21 @@
return ret;
}
+PTH_FUNC(int, pthreadZucondZusignalZu_2Za, // pthread_cond_signal_2*
+ pthread_cond_t* cond)
+{
+ int ret;
+ int res;
+ OrigFn fn;
+ VALGRIND_GET_ORIG_FN(fn);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_SIGNAL,
+ cond, 0, 0, 0, 0);
+ CALL_FN_W_W(ret, fn, cond);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_COND_SIGNAL,
+ cond, 0, 0, 0, 0);
+ return ret;
+}
+
// pthread_cond_broadcast
PTH_FUNC(int, pthreadZucondZubroadcastZa, // pthread_cond_broadcast*
pthread_cond_t* cond)
|
|
From: Nicholas N. <n.n...@gm...> - 2009-07-22 22:51:39
|
On Thu, Jul 23, 2009 at 5:17 AM, <sv...@va...> wrote: > Author: bart > Date: 2009-07-22 20:17:05 +0100 (Wed, 22 Jul 2009) > New Revision: 10534 > > Log: > More tweaking for Darwin. Bart, it's great to see you're working on Darwin support. What's the status -- how many of the tests are passing? Can you roughly estimate how much more work it'll be for DRD to be reliable on Darwin? Thanks. Nick |
|
From: Bart V. A. <bar...@gm...> - 2009-07-23 07:41:05
|
On Thu, Jul 23, 2009 at 12:51 AM, Nicholas Nethercote<n.n...@gm...> wrote: > On Thu, Jul 23, 2009 at 5:17 AM, <sv...@va...> wrote: >> Author: bart >> Date: 2009-07-22 20:17:05 +0100 (Wed, 22 Jul 2009) >> New Revision: 10534 >> >> Log: >> More tweaking for Darwin. > > Bart, it's great to see you're working on Darwin support. What's the > status -- how many of the tests are passing? The output I get from the command "perl tests/vg_regtest drd" on Darwin is currently as follows: == 69 tests, 4 stderr failures, 0 stdout failures, 0 post failures == drd/tests/circular_buffer (stderr) drd/tests/pth_cond_race (stderr) drd/tests/pth_inconsistent_cond_wait (stderr) drd/tests/tc17_sembar (stderr) Bart. |
|
From: Nicholas N. <n.n...@gm...> - 2009-07-23 11:22:39
|
On Thu, Jul 23, 2009 at 5:40 PM, Bart Van Assche<bar...@gm...> wrote: > > The output I get from the command "perl tests/vg_regtest drd" on > Darwin is currently as follows: > > == 69 tests, 4 stderr failures, 0 stdout failures, 0 post failures == > drd/tests/circular_buffer (stderr) > drd/tests/pth_cond_race (stderr) > drd/tests/pth_inconsistent_cond_wait (stderr) > drd/tests/tc17_sembar (stderr) Nice! If you want to work on Darwin+Helgrind too I'm sure no-one will object ;) Nick |
|
From: Alexander P. <gl...@go...> - 2009-07-23 11:26:00
|
Hi Bart, you can take a look at http://data-race-test.googlecode.com/svn/trunk/tsan/ts_valgrind_intercepts.c to find the list of Darwin-specific function names to intercept. Alex On Thu, Jul 23, 2009 at 11:40 AM, Bart Van Assche<bar...@gm...> wrote: > On Thu, Jul 23, 2009 at 12:51 AM, Nicholas > Nethercote<n.n...@gm...> wrote: >> On Thu, Jul 23, 2009 at 5:17 AM, <sv...@va...> wrote: >>> Author: bart >>> Date: 2009-07-22 20:17:05 +0100 (Wed, 22 Jul 2009) >>> New Revision: 10534 >>> >>> Log: >>> More tweaking for Darwin. >> >> Bart, it's great to see you're working on Darwin support. What's the >> status -- how many of the tests are passing? > > The output I get from the command "perl tests/vg_regtest drd" on > Darwin is currently as follows: > > == 69 tests, 4 stderr failures, 0 stdout failures, 0 post failures == > drd/tests/circular_buffer (stderr) > drd/tests/pth_cond_race (stderr) > drd/tests/pth_inconsistent_cond_wait (stderr) > drd/tests/tc17_sembar (stderr) > > Bart. > > ------------------------------------------------------------------------------ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > -- WBR, Alexander Potapenko Software Engineer Google Moscow |