From: Tom Hughes Date: Mon, 18 Oct 2004 23:03:24 +0000 (+0000) Subject: Really fix statically initialised read-write locks this time... X-Git-Tag: svn/VALGRIND_3_0_0~1499 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e581bc5f412fcfc61247ea4b17f3f31bb14bd6ef;p=thirdparty%2Fvalgrind.git Really fix statically initialised read-write locks this time... BUG: 91604 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2796 --- diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 18a3d566c3..9195c5668c 100644 --- a/coregrind/vg_libpthread.c +++ b/coregrind/vg_libpthread.c @@ -3063,7 +3063,7 @@ static vg_rwlock_t* rw_lookup ( pthread_rwlock_t* orig ) CONVERT(rwlock, orig, vg_orig); 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; else