From: Bart Van Assche Date: Sat, 19 Sep 2020 15:08:59 +0000 (-0700) Subject: drd: Port to Fedora 33 X-Git-Tag: VALGRIND_3_17_0~159 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15330adf7c2471fbaa6a0818db07078d81dbff97;p=thirdparty%2Fvalgrind.git drd: Port to Fedora 33 Apparently on Fedora 33 the POSIX thread functions exist in both libc and libpthread. Hence this patch that intercepts the pthread functions in libc. See also https://bugs.kde.org/show_bug.cgi?id=426144 . --- diff --git a/NEWS b/NEWS index ce27f392ec..eacf97bf6a 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,7 @@ n-i-bz helgrind: If hg_cli__realloc fails, return NULL. 422623 epoll_ctl warns for uninitialized padding on non-amd64 64bit arches 423021 PPC: Add missing ISA 3.0 documentation link and HWCAPS test. 424298 amd64: Implement RDSEED +426144 Fix "condition variable has not been initialized" on Fedora 33. Release 3.16.1 (?? June 2020) diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c index 58c45aaec8..c2882e5abc 100644 --- a/drd/drd_pthread_intercepts.c +++ b/drd/drd_pthread_intercepts.c @@ -174,7 +174,16 @@ static int never_true; ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \ { return implf argl; } #else +/* + * On Linux, intercept both the libc and the libpthread functions. At + * least glibc 2.32.9000 (Fedora 34) has an implementation of all pthread + * functions in both libc and libpthread. Older glibc versions only have an + * implementation of the pthread functions in libpthread. + */ #define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \ + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl; \ + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \ + { return implf argl; } \ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ { return implf argl; }