]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Really fix statically initialised read-write locks this time...
authorTom Hughes <tom@compton.nu>
Mon, 18 Oct 2004 23:03:24 +0000 (23:03 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 18 Oct 2004 23:03:24 +0000 (23:03 +0000)
BUG: 91604

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2796

coregrind/vg_libpthread.c

index 18a3d566c3b9728d66b495003c084ee3ded3471b..9195c5668c02cec9fdacb575cac71f324aa40f34 100644 (file)
@@ -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