]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd: Port to Fedora 33
authorBart Van Assche <bvanassche@acm.org>
Sat, 19 Sep 2020 15:08:59 +0000 (08:08 -0700)
committerBart Van Assche <bvanassche@acm.org>
Sat, 19 Sep 2020 15:50:37 +0000 (08:50 -0700)
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 .

NEWS
drd/drd_pthread_intercepts.c

diff --git a/NEWS b/NEWS
index ce27f392ecfa1a33ac813762cf8c61b5d7952a1e..eacf97bf6a6b1e563df98835f1c54880b4a3a276 100644 (file)
--- 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)
index 58c45aaec8e5b146afd280a5a6d25aee55bda7d3..c2882e5abc23271a14a2c9eef9248ae5b90d202a 100644 (file)
@@ -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; }