From: Tom Hughes Date: Mon, 18 Oct 2004 17:34:43 +0000 (+0000) Subject: Make statically initialised read-write locks work. X-Git-Tag: svn/VALGRIND_3_0_0~1505 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25725b8d8bcff2bc6449eed8dcf015ff44c2dfa1;p=thirdparty%2Fvalgrind.git Make statically initialised read-write locks work. BUG: 91604 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2790 --- diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 29ed6af7ab..18a3d566c3 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 (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; else diff --git a/coregrind/vg_replace_malloc.c.base b/coregrind/vg_replace_malloc.c.base index 9069984e9d..5b38b46a24 100644 --- a/coregrind/vg_replace_malloc.c.base +++ b/coregrind/vg_replace_malloc.c.base @@ -57,6 +57,12 @@ ret VG_INTERCEPT(soname:libc.so.6, __##name) args \ __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)), \ visibility("protected"))); \