summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch b/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch
new file mode 100644
index 0000000000..37f6ea667d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch
@@ -0,0 +1,48 @@
1From 15330adf7c2471fbaa6a0818db07078d81dbff97 Mon Sep 17 00:00:00 2001
2From: Bart Van Assche <bvanassche@acm.org>
3Date: Sat, 19 Sep 2020 08:08:59 -0700
4Subject: [PATCH] drd: Port to Fedora 33
5
6Apparently on Fedora 33 the POSIX thread functions exist in both libc and
7libpthread. Hence this patch that intercepts the pthread functions in
8libc. See also https://bugs.kde.org/show_bug.cgi?id=426144 .
9
10Signed-off-by: Bart Van Assche <bvanassche@acm.org>
11
12This patch was imported from the valgrind sourceware server
13(https://sourceware.org/git/?p=valgrind.git;a=commit;h=15330adf7c2471fbaa6a0818db07078d81dbff97)
14It was modified to remove the changes to the valgrind NEWS file,
15as these are difficult to maintain and don't impact the valgrind
16code itself.
17
18Upstream-Status: Backport
19
20Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com>
21---
22 drd/drd_pthread_intercepts.c | 9 +++++++++
23 1 file changed, 10 insertions(+)
24
25diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c
26index 58c45aaec..c2882e5ab 100644
27--- a/drd/drd_pthread_intercepts.c
28+++ b/drd/drd_pthread_intercepts.c
29@@ -174,7 +174,16 @@ static int never_true;
30 ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \
31 { return implf argl; }
32 #else
33+/*
34+ * On Linux, intercept both the libc and the libpthread functions. At
35+ * least glibc 2.32.9000 (Fedora 34) has an implementation of all pthread
36+ * functions in both libc and libpthread. Older glibc versions only have an
37+ * implementation of the pthread functions in libpthread.
38+ */
39 #define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \
40+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl; \
41+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \
42+ { return implf argl; } \
43 ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \
44 ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \
45 { return implf argl; }
46--
472.25.1
48