summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-04 18:47:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-05 08:53:41 +0100
commit382e70c724760d2441dd530e83e4403c98287268 (patch)
tree7c49e8b2d6225e133829193c6893d639675ce75f /meta/recipes-devtools
parentbc01962bb869b249dce01e8f82f956316fca27f6 (diff)
downloadpoky-382e70c724760d2441dd530e83e4403c98287268.tar.gz
valgrind: Add patches for glibc 2.34 support
This partially resolves ptest failures with glibc 2.34. (From OE-Core rev: 9adf897176924cad6b12d4da73a904cfbf578f46) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/200b6a5a0ea3e1e154663b0fc575bfe2becf177d.patch34
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/52ed51fc35f8a6148c2940eb46932b02dd3b9b23.patch171
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/6da22a4d246519cd1a638cfc7eff00cdd74413c4.patch43
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/a1364805fc74b5690f763033c0c9b43f27613572.patch1422
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.17.0.bb4
5 files changed, 1674 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/200b6a5a0ea3e1e154663b0fc575bfe2becf177d.patch b/meta/recipes-devtools/valgrind/valgrind/200b6a5a0ea3e1e154663b0fc575bfe2becf177d.patch
new file mode 100644
index 0000000000..9a5f6a3f51
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/200b6a5a0ea3e1e154663b0fc575bfe2becf177d.patch
@@ -0,0 +1,34 @@
1From 200b6a5a0ea3e1e154663b0fc575bfe2becf177d Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Wed, 21 Jul 2021 17:55:40 +0200
4Subject: [PATCH] m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below
5 main
6
7With glibc 2.34 we might see the _start symbol as the frame that
8called main instead of directly after __libc_start_main or
9generic_start_main.
10
11Fixes memcheck/tests/badjump[2], memcheck/tests/origin4-many,
12helgrind/tests/tc04_free_lock, helgrind/tests/tc09_bad_unlock
13and helgrind/tests/tc20_verifywrap.
14
15Upstream-Status: Backport
16---
17 coregrind/m_debuginfo/debuginfo.c | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c
21index bc2578b377..e2218f2668 100644
22--- a/coregrind/m_debuginfo/debuginfo.c
23+++ b/coregrind/m_debuginfo/debuginfo.c
24@@ -2289,6 +2289,7 @@ Vg_FnNameKind VG_(get_fnname_kind) ( const HChar* name )
25 VG_STREQN(18, "__libc_start_main.", name) || // gcc optimization
26 VG_STREQ("generic_start_main", name) || // Yellow Dog doggedness
27 VG_STREQN(19, "generic_start_main.", name) || // gcc optimization
28+ VG_STREQ("_start", name) ||
29 # elif defined(VGO_darwin)
30 // See readmacho.c for an explanation of this.
31 VG_STREQ("start_according_to_valgrind", name) || // Darwin, darling
32--
332.27.0
34
diff --git a/meta/recipes-devtools/valgrind/valgrind/52ed51fc35f8a6148c2940eb46932b02dd3b9b23.patch b/meta/recipes-devtools/valgrind/valgrind/52ed51fc35f8a6148c2940eb46932b02dd3b9b23.patch
new file mode 100644
index 0000000000..451a459ea7
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/52ed51fc35f8a6148c2940eb46932b02dd3b9b23.patch
@@ -0,0 +1,171 @@
1From 52ed51fc35f8a6148c2940eb46932b02dd3b9b23 Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Wed, 21 Jul 2021 19:53:13 +0200
4Subject: [PATCH] Generate a ENOSYS (sys_ni_syscall) for clone3 on all linux
5 arches
6
7glibc 2.34 will try to use clone3 first before falling back to
8the clone syscall. So implement clone3 as sys_ni_syscall which
9simply return ENOSYS without producing a warning.
10
11https://bugs.kde.org/show_bug.cgi?id=439590
12
13Upstream-Status: Backport
14---
15 coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++
16 coregrind/m_syswrap/syswrap-arm-linux.c | 2 ++
17 coregrind/m_syswrap/syswrap-arm64-linux.c | 2 ++
18 coregrind/m_syswrap/syswrap-mips32-linux.c | 2 ++
19 coregrind/m_syswrap/syswrap-mips64-linux.c | 1 +
20 coregrind/m_syswrap/syswrap-nanomips-linux.c | 1 +
21 coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++
22 coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++
23 coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++
24 coregrind/m_syswrap/syswrap-x86-linux.c | 2 ++
25 include/vki/vki-scnums-shared-linux.h | 2 ++
26 11 files changed, 20 insertions(+)
27
28diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
29index 45e1f3d1bb..3b2dcb8e30 100644
30--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
31+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
32@@ -874,6 +874,8 @@ static SyscallTableEntry syscall_table[] = {
33 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
34 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
35
36+ GENX_(__NR_clone3, sys_ni_syscall), // 435
37+
38 LINX_(__NR_faccessat2, sys_faccessat2), // 439
39 };
40
41diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
42index 428cb7c6fc..7f41b07491 100644
43--- a/coregrind/m_syswrap/syswrap-arm-linux.c
44+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
45@@ -1051,6 +1051,8 @@ static SyscallTableEntry syscall_main_table[] = {
46 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
47 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
48
49+ GENX_(__NR_clone3, sys_ni_syscall), // 435
50+
51 LINX_(__NR_faccessat2, sys_faccessat2), // 439
52 };
53
54diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
55index 024ece27f5..0d717f44be 100644
56--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
57+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
58@@ -830,6 +830,8 @@ static SyscallTableEntry syscall_main_table[] = {
59 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
60 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
61
62+ GENX_(__NR_clone3, sys_ni_syscall), // 435
63+
64 LINX_(__NR_faccessat2, sys_faccessat2), // 439
65 };
66
67diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
68index 62b085ea21..b62129111b 100644
69--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
70+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
71@@ -1136,6 +1136,8 @@ static SyscallTableEntry syscall_main_table[] = {
72 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
73 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
74
75+ GENX_(__NR_clone3, sys_ni_syscall), // 435
76+
77 LINX_ (__NR_faccessat2, sys_faccessat2), // 439
78 };
79
80diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
81index b73c03da16..94f38366f0 100644
82--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
83+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
84@@ -815,6 +815,7 @@ static SyscallTableEntry syscall_main_table[] = {
85 LINXY (__NR_io_uring_setup, sys_io_uring_setup),
86 LINXY (__NR_io_uring_enter, sys_io_uring_enter),
87 LINXY (__NR_io_uring_register, sys_io_uring_register),
88+ GENX_ (__NR_clone3, sys_ni_syscall),
89 LINX_ (__NR_faccessat2, sys_faccessat2),
90 };
91
92diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c
93index 14127b181a..102c155507 100644
94--- a/coregrind/m_syswrap/syswrap-nanomips-linux.c
95+++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c
96@@ -824,6 +824,7 @@ static SyscallTableEntry syscall_main_table[] = {
97 LINXY (__NR_io_uring_setup, sys_io_uring_setup),
98 LINXY (__NR_io_uring_enter, sys_io_uring_enter),
99 LINXY (__NR_io_uring_register, sys_io_uring_register),
100+ GENX_ (__NR_clone3, sys_ni_syscall),
101 LINX_ (__NR_faccessat2, sys_faccessat2),
102 };
103
104diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
105index aad14f8ba4..1e2efc6777 100644
106--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
107+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
108@@ -1054,6 +1054,8 @@ static SyscallTableEntry syscall_table[] = {
109 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
110 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
111
112+ GENX_(__NR_clone3, sys_ni_syscall), // 435
113+
114 LINX_(__NR_faccessat2, sys_faccessat2), // 439
115 };
116
117diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
118index c0e3f55491..76610e1423 100644
119--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
120+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
121@@ -1023,6 +1023,8 @@ static SyscallTableEntry syscall_table[] = {
122 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
123 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
124
125+ GENX_(__NR_clone3, sys_ni_syscall), // 435
126+
127 LINX_(__NR_faccessat2, sys_faccessat2), // 439
128 };
129
130diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
131index af6c4eb210..5283c19fe4 100644
132--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
133+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
134@@ -864,6 +864,8 @@ static SyscallTableEntry syscall_table[] = {
135 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
136 LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
137
138+ GENX_(__NR_clone3, sys_ni_syscall), // 435
139+
140 LINX_(__NR_faccessat2, sys_faccessat2), // 439
141 };
142
143diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
144index 67d866497d..418c769750 100644
145--- a/coregrind/m_syswrap/syswrap-x86-linux.c
146+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
147@@ -1645,6 +1645,8 @@ static SyscallTableEntry syscall_table[] = {
148 LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
149 LINXY(__NR_io_uring_register, sys_io_uring_register),// 427
150
151+ GENX_(__NR_clone3, sys_ni_syscall), // 435
152+
153 LINX_(__NR_faccessat2, sys_faccessat2), // 439
154 };
155
156diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h
157index c8bc31b4b3..6c70c9981d 100644
158--- a/include/vki/vki-scnums-shared-linux.h
159+++ b/include/vki/vki-scnums-shared-linux.h
160@@ -39,6 +39,8 @@
161 #define __NR_fsmount 432
162 #define __NR_fspick 433
163
164+#define __NR_clone3 435
165+
166 #define __NR_faccessat2 439
167
168 #endif
169--
1702.27.0
171
diff --git a/meta/recipes-devtools/valgrind/valgrind/6da22a4d246519cd1a638cfc7eff00cdd74413c4.patch b/meta/recipes-devtools/valgrind/valgrind/6da22a4d246519cd1a638cfc7eff00cdd74413c4.patch
new file mode 100644
index 0000000000..fce66b96ae
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/6da22a4d246519cd1a638cfc7eff00cdd74413c4.patch
@@ -0,0 +1,43 @@
1From 6da22a4d246519cd1a638cfc7eff00cdd74413c4 Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Fri, 16 Jul 2021 21:37:21 +0200
4Subject: [PATCH] gdbserver_tests: update filters for newer glibc/gdb
5
6With newer glibc/gdb we might see a __select call without anything
7following on the line. Also when gdb cannot find a file it might
8now print "Inappropriate ioctl for device" instead of the message
9"No such file or directory"
10
11Upstream-Status: Backport
12---
13 gdbserver_tests/filter_gdb | 1 +
14 gdbserver_tests/filter_vgdb | 1 +
15 2 files changed, 2 insertions(+)
16
17diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb
18index 3bcd26d86c..4a5b5d7a5b 100755
19--- a/gdbserver_tests/filter_gdb
20+++ b/gdbserver_tests/filter_gdb
21@@ -111,6 +111,7 @@ s/\(0x........\) in ?? ()$/\1 in syscall .../
22 # If select.c sources are present, we can also get a line containing:
23 # return SYSCALL_CANCEL....
24 s/in __select .*/in syscall .../
25+s/in __select$/in syscall .../
26 /exceptfds/d
27 /sysv\/linux\/select\.c/d
28 /return SYSCALL_CANCEL /d
29diff --git a/gdbserver_tests/filter_vgdb b/gdbserver_tests/filter_vgdb
30index f8028a39ad..679ca4b31c 100755
31--- a/gdbserver_tests/filter_vgdb
32+++ b/gdbserver_tests/filter_vgdb
33@@ -18,6 +18,7 @@ sed -e '/relaying data between gdb and process/d' \
34
35 # filter some debuginfo problems with ld.so and SLES11
36 sed -e '/^1 rtld.c: No such file or directory\./d' |
37+sed -e '/rtld.c: Inappropriate ioctl for device\./d' |
38
39 # and filter out any remaining empty lines
40 sed -e '/^$/d'
41--
422.27.0
43
diff --git a/meta/recipes-devtools/valgrind/valgrind/a1364805fc74b5690f763033c0c9b43f27613572.patch b/meta/recipes-devtools/valgrind/valgrind/a1364805fc74b5690f763033c0c9b43f27613572.patch
new file mode 100644
index 0000000000..ece88406c6
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/a1364805fc74b5690f763033c0c9b43f27613572.patch
@@ -0,0 +1,1422 @@
1From a1364805fc74b5690f763033c0c9b43f27613572 Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Fri, 16 Jul 2021 15:47:08 -0400
4Subject: [PATCH] Update helgrind and drd suppression libc and libpthread paths
5 in glibc 2.34
6
7glibc 2.34 moved all pthread functions into the main libc library.
8And it changed the (in memory) path of the main libc library to
9libc.so.6 (before it was libc-2.xx.so).
10
11This breaks various standard suppressions for helgrind and drd.
12Fix this by doing a configure check for whether we are using glibc
132.34 by checking whether pthread_create is in libc instead of in
14libpthread. If we are using glibc then define GLIBC_LIBC_PATH and
15GLIBC_LIBPTHREAD_PATH variables that point to the (regexp) path
16of the library that contains all libc functions and pthread functions
17(which will be the same path for glibc 2.34+).
18
19Rename glibc-2.34567-NPTL-helgrind.supp to glibc-2.X-helgrind.supp.in
20and glibc-2.X-drd.supp to glibc-2.X-drd.supp.in and replace the
21GLIBC_LIBC_PATH and GLIBC_LIBPTHREAD_PATH at configure time.
22
23The same could be done for the glibc-2.X.supp.in file, but hasn't
24yet because it looks like most suppressions in that file are obsolete.
25
26Upstream-Status: Backport
27---
28 Makefile.am | 2 +-
29 configure.ac | 37 +++++++++++++++++--
30 glibc-2.X-drd.supp => glibc-2.X-drd.supp.in | 6 ++-
31 ...elgrind.supp => glibc-2.X-helgrind.supp.in | 16 ++++----
32 4 files changed, 47 insertions(+), 14 deletions(-)
33 rename glibc-2.X-drd.supp => glibc-2.X-drd.supp.in (97%)
34 rename glibc-2.34567-NPTL-helgrind.supp => glibc-2.X-helgrind.supp.in (95%)
35
36Index: valgrind-3.17.0/Makefile.am
37===================================================================
38--- valgrind-3.17.0.orig/Makefile.am
39+++ valgrind-3.17.0/Makefile.am
40@@ -41,7 +41,7 @@ SUPP_FILES = \
41 glibc-2.2.supp glibc-2.3.supp glibc-2.4.supp glibc-2.5.supp \
42 glibc-2.6.supp glibc-2.7.supp glibc-2.X.supp.in \
43 xfree-3.supp xfree-4.supp \
44- glibc-2.34567-NPTL-helgrind.supp \
45+ glibc-2.X-helgrind.supp \
46 glibc-2.2-LinuxThreads-helgrind.supp \
47 glibc-2.X-drd.supp \
48 darwin9.supp darwin9-drd.supp \
49Index: valgrind-3.17.0/configure.ac
50===================================================================
51--- valgrind-3.17.0.orig/configure.ac
52+++ valgrind-3.17.0/configure.ac
53@@ -1090,6 +1090,31 @@ if test x$GLIBC_VERSION = x; then
54 fi
55 fi
56
57+# If this is glibc then figure out the generic (in file) libc.so and
58+# libpthread.so file paths to use in suppressions. Before 2.34 libpthread
59+# was a separate library, afterwards it was merged into libc.so and
60+# the library is called libc.so.6 (before it was libc-2.[0-9]+.so).
61+# Use this fact to set GLIBC_LIBC_PATH and GLIBC_LIBPTHREAD_PATH.
62+case ${GLIBC_VERSION} in
63+2*)
64+ AC_MSG_CHECKING([whether pthread_create needs libpthread])
65+ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_create])],
66+ [
67+ AC_MSG_RESULT([no])
68+ GLIBC_LIBC_PATH="*/lib*/libc.so.6"
69+ GLIBC_LIBPTHREAD_PATH="$GLIBC_LIBC_PATH"
70+ ], [
71+ AC_MSG_RESULT([yes])
72+ GLIBC_LIBC_PATH="*/lib*/libc-2.*so*"
73+ GLIBC_LIBPTHREAD_PATH="*/lib*/libpthread-2.*so*"
74+ ])
75+ ;;
76+*)
77+ AC_MSG_CHECKING([not glibc...])
78+ AC_MSG_RESULT([${GLIBC_VERSION}])
79+ ;;
80+esac
81+
82 AC_MSG_CHECKING([the glibc version])
83
84 case "${GLIBC_VERSION}" in
85@@ -1102,13 +1127,13 @@ case "${GLIBC_VERSION}" in
86 2.[[3-6]])
87 AC_MSG_RESULT(${GLIBC_VERSION} family)
88 DEFAULT_SUPP="$srcdir/glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
89- DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
90+ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
91 DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
92 ;;
93 2.[[7-9]])
94 AC_MSG_RESULT(${GLIBC_VERSION} family)
95 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
96- DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
97+ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
98 DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
99 ;;
100 2.10|2.11)
101@@ -1116,7 +1141,7 @@ case "${GLIBC_VERSION}" in
102 AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1,
103 [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)])
104 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
105- DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
106+ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
107 DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
108 ;;
109 2.*)
110@@ -1126,7 +1151,7 @@ case "${GLIBC_VERSION}" in
111 AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
112 [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
113 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
114- DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
115+ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
116 DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
117 ;;
118 darwin)
119@@ -1157,6 +1182,8 @@ case "${GLIBC_VERSION}" in
120 esac
121
122 AC_SUBST(GLIBC_VERSION)
123+AC_SUBST(GLIBC_LIBC_PATH)
124+AC_SUBST(GLIBC_LIBPTHREAD_PATH)
125
126
127 if test "$VGCONF_OS" != "solaris"; then
128@@ -4910,6 +4937,8 @@ AC_CONFIG_FILES([
129 valgrind.spec
130 valgrind.pc
131 glibc-2.X.supp
132+ glibc-2.X-helgrind.supp
133+ glibc-2.X-drd.supp
134 docs/Makefile
135 tests/Makefile
136 tests/vg_regtest
137Index: valgrind-3.17.0/glibc-2.X-drd.supp
138===================================================================
139--- valgrind-3.17.0.orig/glibc-2.X-drd.supp
140+++ /dev/null
141@@ -1,330 +0,0 @@
142-#
143-# Suppression patterns for ld, the dynamic loader.
144-#
145-
146-# Suppress all data races triggered by ld.
147-{
148- drd-ld
149- drd:ConflictingAccess
150- obj:*/lib*/ld-*.so
151-}
152-
153-#
154-# Suppression patterns for libc.
155-#
156-
157-# Suppress all data races where the topmost frame is inside libc.so. Although
158-# this could hide some real data races, unfortunately this is the only way to
159-# not report any false positives on stdio functions. The glibc functions
160-# manipulating FILE objects use locking primitives that cannot be intercepted
161-# easily. See also the definitions of _IO_lock_lock() etc. in the file
162-# nptl/sysdeps/pthread/bits/stdio-lock.h in the glibc source tree.
163-{
164- drd-libc-stdio
165- drd:ConflictingAccess
166- obj:*/lib*/libc-*
167-}
168-{
169- drd-libc-thread-cancellation-test
170- drd:ConflictingAccess
171- fun:write
172-}
173-{
174- drd-libc-random
175- drd:ConflictingAccess
176- fun:random_r
177- fun:random
178-}
179-
180-#
181-# Suppression patterns for libstdc++, the implementation of the standard C++
182-# library included with the gcc compiler.
183-#
184-# Note: several versions of the libstdc++ library (4.2.2, 4.3.2, 4.4.0, 4.5.0
185-# and their predecessors) contain an implementation of the std::string class
186-# that triggers conflicting memory accesses. See also
187-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518
188-#
189-
190-# {
191-# drd-libstdc++-std::string::string()
192-# drd:ConflictingAccess
193-# fun:_ZNSsC1ERKSs
194-# }
195-
196-{
197- drd-libstdc++-cxa_guard_release
198- drd:CondErr
199- fun:pthread_cond_broadcast@*
200- fun:__cxa_guard_release
201-}
202-{
203- drd-libstdc++-std::__ostream_insert()
204- drd:ConflictingAccess
205- fun:_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
206- fun:_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
207-}
208-{
209- drd-libstdc++-std::ostream::_M_insert<long>()
210- drd:ConflictingAccess
211- ...
212- fun:_ZNSo9_M_insertIlEERSoT_
213-}
214-
215-
216-#
217-# Suppression patterns for libpthread.
218-#
219-
220-{
221- drd-libpthread-pthread_create
222- drd:ConflictingAccess
223- ...
224- fun:pthread_create*
225-}
226-{
227- drd-libpthread-pthread_join
228- drd:ConflictingAccess
229- fun:pthread_join
230- fun:pthread_join
231-}
232-{
233- drd-libpthread-__deallocate_stack
234- drd:ConflictingAccess
235- ...
236- fun:__deallocate_stack
237-}
238-{
239- drd-libpthread-__free_stacks
240- drd:ConflictingAccess
241- fun:__free_stacks
242-}
243-{
244- drd-libpthread-__free_tcb
245- drd:ConflictingAccess
246- ...
247- fun:__free_tcb
248-}
249-{
250- drd-libpthread-__nptl_deallocate_tsd
251- drd:ConflictingAccess
252- fun:__nptl_deallocate_tsd
253-}
254-{
255- drd-libpthread-pthread_detach
256- drd:ConflictingAccess
257- fun:pthread_detach
258- fun:pthread_detach
259-}
260-{
261- drd-libpthread-pthread_once
262- drd:ConflictingAccess
263- fun:pthread_once
264-}
265-{
266- drd-libpthread-pthread_cancel_init
267- drd:ConflictingAccess
268- fun:pthread_cancel_init
269-}
270-{
271- drd-libpthread-pthread_cancel
272- drd:ConflictingAccess
273- fun:pthread_cancel
274- fun:pthread_cancel_intercept
275-}
276-{
277- drd-libpthread-_Unwind_ForcedUnwind
278- drd:ConflictingAccess
279- ...
280- fun:_Unwind_ForcedUnwind
281-}
282-{
283- drd-libpthread-_Unwind_GetCFA
284- drd:ConflictingAccess
285- fun:_Unwind_GetCFA
286-}
287-{
288- drd-libpthread-_Unwind_Resume
289- drd:ConflictingAccess
290- ...
291- fun:_Unwind_Resume
292-}
293-{
294- drd-libpthread-?
295- drd:ConflictingAccess
296- obj:*/lib/libgcc_s.so.1
297-}
298-{
299- drd-libpthread-nanosleep
300- drd:ConflictingAccess
301- fun:nanosleep
302-}
303-
304-#
305-# Suppression patterns for libgomp.
306-#
307-
308-# Unfortunately many statements in libgomp trigger conflicting accesses. It is
309-# not clear to me which of these are safe and which ones not. See also
310-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
311-{
312- drd-libgomp
313- drd:ConflictingAccess
314- obj:/usr/lib*/libgomp.so*
315-}
316-
317-#
318-# Suppression patterns for libX11.
319-#
320-
321-{
322- drd-libX11-XCreateFontSet
323- drd:CondErr
324- fun:pthread_cond_init*
325- fun:_XReply
326- fun:XListFontsWithInfo
327- obj:/usr/lib*/libX11.so*
328- fun:XCreateOC
329- fun:XCreateFontSet
330-}
331-
332-#
333-# Suppression patterns for libxcb.
334-#
335-
336-{
337- drd-libxcb-xcb_wait_for_reply
338- drd:CondErr
339- ...
340- fun:pthread_cond_destroy*
341- fun:xcb_wait_for_reply
342-}
343-
344-#
345-# Suppression patterns for libglib.
346-#
347-
348-{
349- drd-libglib-access-g_threads_got_initialized
350- drd:ConflictingAccess
351- ...
352- fun:g_slice_alloc
353- fun:g_ptr_array_sized_new
354-}
355-{
356- drd-libglib-access-g_threads_got_initialized
357- drd:ConflictingAccess
358- ...
359- fun:_ZN27QEventDispatcherGlibPrivateC1EP13_GMainContext
360- fun:_ZN20QEventDispatcherGlibC1EP7QObject
361- obj:/usr/lib*/libQtCore.so.4.*
362- obj:/usr/lib*/libQtCore.so.4.*
363-}
364-{
365- drd-libglib-access-g_mem_initialized
366- drd:ConflictingAccess
367- fun:g_malloc0
368-}
369-{
370- drd-libglib-g_private_get_posix_impl
371- drd:ConflictingAccess
372- fun:g_private_get_posix_impl
373-}
374-{
375- drd-libglib-g_private_set_posix_impl
376- drd:ConflictingAccess
377- fun:g_private_set_posix_impl
378-}
379-{
380- drd-libglib-g_get_language_names
381- drd:ConflictingAccess
382- fun:g_slice_free_chain_with_offset
383-}
384-{
385- drd-libglib-g_main_context_new
386- drd:ConflictingAccess
387- fun:fcntl
388- obj:/usr/lib*/libglib-*.so*
389- fun:g_main_context_new
390-}
391-
392-#
393-# Suppression patterns for libQtCore.
394-#
395-
396-{
397- drd-libQtCore-deref-that-calls-QThreadData-destructor
398- drd:ConflictingAccess
399- fun:_ZN11QThreadDataD1Ev
400- obj:/usr/lib*/libQtCore.so.4.*
401-}
402-{
403- drd-libQtCore-4.0/4.1-Q_GLOBAL_STATIC-connectionList
404- drd:ConflictingAccess
405- obj:/usr/lib*/libQtCore.so.4.*
406- fun:_ZN11QMetaObject8activateEP7QObjectiiPPv
407- fun:_ZN11QMetaObject8activateEP7QObjectPKS_iPPv
408-}
409-{
410- drd-libQtCore-QObjectPrivate::clearGuards(QObject*)
411- drd:ConflictingAccess
412- fun:_ZN14QReadWriteLock12lockForWriteEv
413- fun:_ZN14QObjectPrivate11clearGuardsEP7QObject
414- fun:_ZN7QObjectD2Ev
415-}
416-{
417- drd-libQtCore-QObjectPrivate::clearGuards(QObject*)
418- drd:ConflictingAccess
419- fun:_ZN14QReadWriteLock12lockForWriteEv
420- fun:_ZN12QWriteLocker6relockEv
421- fun:_ZN12QWriteLockerC1EP14QReadWriteLock
422- fun:_ZN14QObjectPrivate11clearGuardsEP7QObject
423- fun:_ZN7QObjectD2Ev
424- fun:_ZN24QAbstractEventDispatcherD2Ev
425- fun:_ZN20QEventDispatcherGlibD0Ev
426-}
427-{
428- drd-libQtCore-QMutexPool::get(void const*)
429- drd:ConflictingAccess
430- fun:_ZN10QMutexPool3getEPKv
431-}
432-{
433- drd-libQtCore-qt_gettime_is_monotonic()
434- drd:ConflictingAccess
435- fun:_Z23qt_gettime_is_monotonicv
436-}
437-
438-#
439-# Suppression patterns for libboost.
440-#
441-
442-# Suppress the races on boost::once_flag::epoch and on
443-# boost::detail::this_thread_epoch. See also the source file
444-# boost/thread/pthread/once.hpp in the Boost source tree
445-# (https://svn.boost.org/trac/boost/browser/trunk/boost/thread/pthread/once.hpp).
446-{
447- drd-libboost-boost::call_once<void (*)()>(boost::once_flag&, void (*)())
448- drd:ConflictingAccess
449- ...
450- fun:_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_
451-}
452-{
453- drd-libboost-boost::detail::get_once_per_thread_epoch()
454- drd:ConflictingAccess
455- fun:_ZN5boost6detail25get_once_per_thread_epochEv
456-}
457-# Suppress the race reports on boost::detail::current_thread_tls_key. See also
458-# https://svn.boost.org/trac/boost/ticket/3526 for more information about why
459-# the access pattern of current_thread_tls_key is safe.
460-{
461- drd-libboost-boost::detail::get_current_thread_data()
462- drd:ConflictingAccess
463- ...
464- fun:_ZN5boost6detail23get_current_thread_dataEv
465-}
466-{
467- drd-libboost-boost::detail::set_current_thread_data(boost::detail::thread_data_base*)
468- drd:ConflictingAccess
469- ...
470- fun:_ZN5boost6detail23set_current_thread_dataEPNS0_16thread_data_baseE
471-}
472Index: valgrind-3.17.0/glibc-2.X-drd.supp.in
473===================================================================
474--- /dev/null
475+++ valgrind-3.17.0/glibc-2.X-drd.supp.in
476@@ -0,0 +1,332 @@
477+# IMPORTANT: DO NOT EDIT glibc-2.X-drd.supp, as it is as a generated
478+# file. Instead edit glibc-2.X-drd.supp.in.
479+#
480+# Suppression patterns for ld, the dynamic loader.
481+#
482+
483+# Suppress all data races triggered by ld.
484+{
485+ drd-ld
486+ drd:ConflictingAccess
487+ obj:*/lib*/ld*.so*
488+}
489+
490+#
491+# Suppression patterns for libc.
492+#
493+
494+# Suppress all data races where the topmost frame is inside libc.so. Although
495+# this could hide some real data races, unfortunately this is the only way to
496+# not report any false positives on stdio functions. The glibc functions
497+# manipulating FILE objects use locking primitives that cannot be intercepted
498+# easily. See also the definitions of _IO_lock_lock() etc. in the file
499+# nptl/sysdeps/pthread/bits/stdio-lock.h in the glibc source tree.
500+{
501+ drd-libc-stdio
502+ drd:ConflictingAccess
503+ obj:@GLIBC_LIBC_PATH@
504+}
505+{
506+ drd-libc-thread-cancellation-test
507+ drd:ConflictingAccess
508+ fun:write
509+}
510+{
511+ drd-libc-random
512+ drd:ConflictingAccess
513+ fun:random_r
514+ fun:random
515+}
516+
517+#
518+# Suppression patterns for libstdc++, the implementation of the standard C++
519+# library included with the gcc compiler.
520+#
521+# Note: several versions of the libstdc++ library (4.2.2, 4.3.2, 4.4.0, 4.5.0
522+# and their predecessors) contain an implementation of the std::string class
523+# that triggers conflicting memory accesses. See also
524+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518
525+#
526+
527+# {
528+# drd-libstdc++-std::string::string()
529+# drd:ConflictingAccess
530+# fun:_ZNSsC1ERKSs
531+# }
532+
533+{
534+ drd-libstdc++-cxa_guard_release
535+ drd:CondErr
536+ fun:pthread_cond_broadcast@*
537+ fun:__cxa_guard_release
538+}
539+{
540+ drd-libstdc++-std::__ostream_insert()
541+ drd:ConflictingAccess
542+ fun:_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
543+ fun:_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
544+}
545+{
546+ drd-libstdc++-std::ostream::_M_insert<long>()
547+ drd:ConflictingAccess
548+ ...
549+ fun:_ZNSo9_M_insertIlEERSoT_
550+}
551+
552+
553+#
554+# Suppression patterns for libpthread.
555+#
556+
557+{
558+ drd-libpthread-pthread_create
559+ drd:ConflictingAccess
560+ ...
561+ fun:pthread_create*
562+}
563+{
564+ drd-libpthread-pthread_join
565+ drd:ConflictingAccess
566+ fun:pthread_join
567+ fun:pthread_join
568+}
569+{
570+ drd-libpthread-__deallocate_stack
571+ drd:ConflictingAccess
572+ ...
573+ fun:__deallocate_stack
574+}
575+{
576+ drd-libpthread-__free_stacks
577+ drd:ConflictingAccess
578+ fun:__free_stacks
579+}
580+{
581+ drd-libpthread-__free_tcb
582+ drd:ConflictingAccess
583+ ...
584+ fun:__free_tcb
585+}
586+{
587+ drd-libpthread-__nptl_deallocate_tsd
588+ drd:ConflictingAccess
589+ fun:__nptl_deallocate_tsd
590+}
591+{
592+ drd-libpthread-pthread_detach
593+ drd:ConflictingAccess
594+ fun:pthread_detach
595+ fun:pthread_detach
596+}
597+{
598+ drd-libpthread-pthread_once
599+ drd:ConflictingAccess
600+ fun:pthread_once
601+}
602+{
603+ drd-libpthread-pthread_cancel_init
604+ drd:ConflictingAccess
605+ fun:pthread_cancel_init
606+}
607+{
608+ drd-libpthread-pthread_cancel
609+ drd:ConflictingAccess
610+ fun:pthread_cancel
611+ fun:pthread_cancel_intercept
612+}
613+{
614+ drd-libpthread-_Unwind_ForcedUnwind
615+ drd:ConflictingAccess
616+ ...
617+ fun:_Unwind_ForcedUnwind
618+}
619+{
620+ drd-libpthread-_Unwind_GetCFA
621+ drd:ConflictingAccess
622+ fun:_Unwind_GetCFA
623+}
624+{
625+ drd-libpthread-_Unwind_Resume
626+ drd:ConflictingAccess
627+ ...
628+ fun:_Unwind_Resume
629+}
630+{
631+ drd-libpthread-?
632+ drd:ConflictingAccess
633+ obj:*/lib/libgcc_s.so.1
634+}
635+{
636+ drd-libpthread-nanosleep
637+ drd:ConflictingAccess
638+ fun:nanosleep
639+}
640+
641+#
642+# Suppression patterns for libgomp.
643+#
644+
645+# Unfortunately many statements in libgomp trigger conflicting accesses. It is
646+# not clear to me which of these are safe and which ones not. See also
647+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
648+{
649+ drd-libgomp
650+ drd:ConflictingAccess
651+ obj:/usr/lib*/libgomp.so*
652+}
653+
654+#
655+# Suppression patterns for libX11.
656+#
657+
658+{
659+ drd-libX11-XCreateFontSet
660+ drd:CondErr
661+ fun:pthread_cond_init*
662+ fun:_XReply
663+ fun:XListFontsWithInfo
664+ obj:/usr/lib*/libX11.so*
665+ fun:XCreateOC
666+ fun:XCreateFontSet
667+}
668+
669+#
670+# Suppression patterns for libxcb.
671+#
672+
673+{
674+ drd-libxcb-xcb_wait_for_reply
675+ drd:CondErr
676+ ...
677+ fun:pthread_cond_destroy*
678+ fun:xcb_wait_for_reply
679+}
680+
681+#
682+# Suppression patterns for libglib.
683+#
684+
685+{
686+ drd-libglib-access-g_threads_got_initialized
687+ drd:ConflictingAccess
688+ ...
689+ fun:g_slice_alloc
690+ fun:g_ptr_array_sized_new
691+}
692+{
693+ drd-libglib-access-g_threads_got_initialized
694+ drd:ConflictingAccess
695+ ...
696+ fun:_ZN27QEventDispatcherGlibPrivateC1EP13_GMainContext
697+ fun:_ZN20QEventDispatcherGlibC1EP7QObject
698+ obj:/usr/lib*/libQtCore.so.4.*
699+ obj:/usr/lib*/libQtCore.so.4.*
700+}
701+{
702+ drd-libglib-access-g_mem_initialized
703+ drd:ConflictingAccess
704+ fun:g_malloc0
705+}
706+{
707+ drd-libglib-g_private_get_posix_impl
708+ drd:ConflictingAccess
709+ fun:g_private_get_posix_impl
710+}
711+{
712+ drd-libglib-g_private_set_posix_impl
713+ drd:ConflictingAccess
714+ fun:g_private_set_posix_impl
715+}
716+{
717+ drd-libglib-g_get_language_names
718+ drd:ConflictingAccess
719+ fun:g_slice_free_chain_with_offset
720+}
721+{
722+ drd-libglib-g_main_context_new
723+ drd:ConflictingAccess
724+ fun:fcntl
725+ obj:/usr/lib*/libglib-*.so*
726+ fun:g_main_context_new
727+}
728+
729+#
730+# Suppression patterns for libQtCore.
731+#
732+
733+{
734+ drd-libQtCore-deref-that-calls-QThreadData-destructor
735+ drd:ConflictingAccess
736+ fun:_ZN11QThreadDataD1Ev
737+ obj:/usr/lib*/libQtCore.so.4.*
738+}
739+{
740+ drd-libQtCore-4.0/4.1-Q_GLOBAL_STATIC-connectionList
741+ drd:ConflictingAccess
742+ obj:/usr/lib*/libQtCore.so.4.*
743+ fun:_ZN11QMetaObject8activateEP7QObjectiiPPv
744+ fun:_ZN11QMetaObject8activateEP7QObjectPKS_iPPv
745+}
746+{
747+ drd-libQtCore-QObjectPrivate::clearGuards(QObject*)
748+ drd:ConflictingAccess
749+ fun:_ZN14QReadWriteLock12lockForWriteEv
750+ fun:_ZN14QObjectPrivate11clearGuardsEP7QObject
751+ fun:_ZN7QObjectD2Ev
752+}
753+{
754+ drd-libQtCore-QObjectPrivate::clearGuards(QObject*)
755+ drd:ConflictingAccess
756+ fun:_ZN14QReadWriteLock12lockForWriteEv
757+ fun:_ZN12QWriteLocker6relockEv
758+ fun:_ZN12QWriteLockerC1EP14QReadWriteLock
759+ fun:_ZN14QObjectPrivate11clearGuardsEP7QObject
760+ fun:_ZN7QObjectD2Ev
761+ fun:_ZN24QAbstractEventDispatcherD2Ev
762+ fun:_ZN20QEventDispatcherGlibD0Ev
763+}
764+{
765+ drd-libQtCore-QMutexPool::get(void const*)
766+ drd:ConflictingAccess
767+ fun:_ZN10QMutexPool3getEPKv
768+}
769+{
770+ drd-libQtCore-qt_gettime_is_monotonic()
771+ drd:ConflictingAccess
772+ fun:_Z23qt_gettime_is_monotonicv
773+}
774+
775+#
776+# Suppression patterns for libboost.
777+#
778+
779+# Suppress the races on boost::once_flag::epoch and on
780+# boost::detail::this_thread_epoch. See also the source file
781+# boost/thread/pthread/once.hpp in the Boost source tree
782+# (https://svn.boost.org/trac/boost/browser/trunk/boost/thread/pthread/once.hpp).
783+{
784+ drd-libboost-boost::call_once<void (*)()>(boost::once_flag&, void (*)())
785+ drd:ConflictingAccess
786+ ...
787+ fun:_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_
788+}
789+{
790+ drd-libboost-boost::detail::get_once_per_thread_epoch()
791+ drd:ConflictingAccess
792+ fun:_ZN5boost6detail25get_once_per_thread_epochEv
793+}
794+# Suppress the race reports on boost::detail::current_thread_tls_key. See also
795+# https://svn.boost.org/trac/boost/ticket/3526 for more information about why
796+# the access pattern of current_thread_tls_key is safe.
797+{
798+ drd-libboost-boost::detail::get_current_thread_data()
799+ drd:ConflictingAccess
800+ ...
801+ fun:_ZN5boost6detail23get_current_thread_dataEv
802+}
803+{
804+ drd-libboost-boost::detail::set_current_thread_data(boost::detail::thread_data_base*)
805+ drd:ConflictingAccess
806+ ...
807+ fun:_ZN5boost6detail23set_current_thread_dataEPNS0_16thread_data_baseE
808+}
809Index: valgrind-3.17.0/glibc-2.34567-NPTL-helgrind.supp
810===================================================================
811--- valgrind-3.17.0.orig/glibc-2.34567-NPTL-helgrind.supp
812+++ /dev/null
813@@ -1,301 +0,0 @@
814-
815-# FIXME 22 Jan 09: helgrind-glibc2X-005 overlaps with a lot of
816-# other stuff. They should be removed.
817-
818-##----------------------------------------------------------------------##
819-# Suppressions for the Helgrind tool when using
820-# a glibc-2.{3,4,5,6,7,8,9} system
821-
822-####################################################
823-# glibc-2.X specific
824-# These are generic cover-alls which catch a lot of stuff
825-# in various combinations of ld, libc and libpthread
826-#
827-# Note this is heavyhanded and not very clever:
828-#
829-# - suppress anything that has its top frame in ld.so
830-# That's fine, since it's mostly dynamic linking stuff,
831-# which has various deliberate (harmless) races
832-#
833-# - suppress anything that has its top frame in libc.so.
834-# This really isn't clever, since it could hide some
835-# legitimate races. But the problem is, if we don't do
836-# this, then loads of errors to do with stdio are reported, because
837-# H fails to see glibc's internal locking/unlocking of FILE*s
838-# as required by POSIX. A better solution is needed.
839-#
840-# - some of the stdio functions in newer glibc manipulate stdio
841-# FILE*s state through mempcpy, which we intercept, so we also need
842-# to suppress such manipulations.
843-
844-#{
845-# helgrind-glibc2X-001
846-# Helgrind:Race
847-# obj:*/lib*/ld-2.*so*
848-#}
849-
850-# helgrind-glibc2X-002 was merged into helgrind-glibc2X-001
851-
852-# helgrind-glibc2X-003 was merged into helgrind-glibc2X-001
853-
854-{
855- helgrind-glibc2X-004
856- Helgrind:Race
857- obj:*/lib*/libc-2.*so*
858-}
859-
860-{
861- helgrind-glibc-io-xsputn-mempcpy
862- Helgrind:Race
863- fun:__GI_mempcpy
864- fun:_IO_*xsputn*
865- obj:*/lib*/libc-2.*so*
866-}
867-
868-{
869- helgrind-glibc2X-005
870- Helgrind:Race
871- obj:*/lib*/libpthread-2.*so*
872-}
873-
874-# helgrind-glibc2X-006 was merged into helgrind-glibc2X-005
875-
876-# helgrind-glibc2X-007 was merged into helgrind-glibc2X-001
877-
878-# helgrind-glibc2X-008 was merged into helgrind-glibc2X-004
879-
880-# helgrind-glibc2X-009 was merged into helgrind-glibc2X-004
881-
882-# helgrind-glibc2X-010 was merged into helgrind-glibc2X-001
883-
884-# helgrind-glibc2X-011 was merged into helgrind-glibc2X-004
885-
886-# helgrind-glibc2X-012 was merged into helgrind-glibc2X-001
887-
888-# helgrind-glibc2X-013 was merged into helgrind-glibc2X-001
889-
890-# helgrind-glibc2X-014 was merged into helgrind-glibc2X-001
891-
892-# helgrind-glibc2X-015 was merged into helgrind-glibc2X-004
893-
894-# helgrind-glibc2X-016 was merged into helgrind-glibc2X-004
895-
896-# These are very ugly. They are needed to suppress errors inside (eg)
897-# NPTL's pthread_cond_signal. Why only one stack frame -- at least we
898-# should see the wrapper calling the real functions, right?
899-# Unfortunately, no: the real functions are handwritten assembly (in
900-# the glibc-2.5 sources) and does not create a proper stack frame.
901-# Therefore it's only one level of unwinding before we're back out in
902-# user code rather than the 2 levels you'd expect.
903-{
904- helgrind-glibc2X-101
905- Helgrind:Race
906- obj:*/lib*/libpthread-2.*so*
907- fun:pthread_*
908-}
909-{
910- helgrind-glibc2X-102
911- Helgrind:Race
912- fun:mythread_wrapper
913- obj:*/lib*/libpthread-2.*so*
914-}
915-{
916- helgrind-glibc2X-103
917- Helgrind:Race
918- fun:pthread_cond_*@@GLIBC_2.*
919-}
920-{
921- helgrind-glibc2X-104
922- Helgrind:Race
923- fun:__lll_mutex_*
924-}
925-{
926- helgrind-glibc2X-105
927- Helgrind:Race
928- fun:pthread_rwlock_*lock*
929-}
930-{
931- helgrind-glibc2X-106
932- Helgrind:Race
933- fun:__lll_lock_wait
934-}
935-{
936- helgrind-glibc2X-107
937- Helgrind:Race
938- obj:*/lib*/libpthread-2.*so*
939- fun:sem_*
940-}
941-{
942- helgrind-glibc2X-108
943- Helgrind:Race
944- fun:clone
945-}
946-{
947- helgrind-glibc2X-109
948- Helgrind:Race
949- fun:start_thread
950-}
951-{
952- helgrind-glibc2X-110
953- Helgrind:Race
954- obj:*/lib*/libc-2.*so*
955- fun:pthread_*
956-}
957-{
958- helgrind-glibc2X-111
959- Helgrind:Race
960- fun:__lll_*lock_*
961-}
962-{
963- helgrind-glibc2X-113
964- Helgrind:Race
965- fun:pthread_barrier_wait*
966-}
967-
968-
969-####################################################
970-# qt4 specific (GNU mangling)
971-#
972-{
973- helgrind-qt4---QMutex::lock()-QMutex::lock()
974- Helgrind:Race
975- ...
976- fun:_ZN6QMutex4lockEv
977- fun:_ZN6QMutex4lockEv
978-}
979-
980-{
981- helgrind-qt4---QMutex::unlock()-QMutex::unlock()
982- Helgrind:Race
983- ...
984- fun:_ZN6QMutex6unlockEv
985- fun:_ZN6QMutex6unlockEv
986-}
987-
988-{
989- helgrind-qt4---pthread_setspecific-QThreadPrivate::start(void*)
990- Helgrind:Race
991- fun:pthread_setspecific
992- fun:_ZN14QThreadPrivate5startEPv
993-}
994-
995-
996-####################################################
997-# Other stuff.
998-#
999-# pthread_exit apparently calls some kind of unwind
1000-# mechanism - maybe to remove some number of frames
1001-# from the thread's stack, so as to get back to the
1002-# outermost frame for the thread? Anyway..
1003-
1004-{
1005- helgrind---*Unwind*-...-pthread_exit
1006- Helgrind:Race
1007- fun:*Unwind*
1008- ...
1009- fun:pthread_exit
1010-}
1011-
1012-{
1013- helgrind---...-*Unwind*-*pthread_unwind*
1014- Helgrind:Race
1015- ...
1016- fun:*Unwind*
1017- fun:*pthread_unwind*
1018-}
1019-
1020-{
1021- helgrind---...-*Unwind*-*pthread_unwind*
1022- Helgrind:Race
1023- ...
1024- fun:_Unwind*
1025- ...
1026- fun:_Unwind_Backtrace
1027-}
1028-
1029-
1030-
1031-
1032-####################################################
1033-# To do with thread stack allocation and deallocation?
1034-#
1035-{
1036- helgrind---free_stacks-__deallocate_stack
1037- Helgrind:Race
1038- fun:free_stacks
1039- fun:__deallocate_stack
1040-}
1041-
1042-{
1043- helgrind---__deallocate_stack-start_thread-clone
1044- Helgrind:Race
1045- fun:__deallocate_stack
1046- fun:start_thread
1047- fun:clone
1048-}
1049-
1050-
1051-####################################################
1052-# To do with pthread_{set,get}specific
1053-#
1054-{
1055- helgrind---pthread_setspecific
1056- Helgrind:Race
1057- fun:pthread_setspecific
1058-}
1059-
1060-{
1061- helgrind---pthread_getspecific
1062- Helgrind:Race
1063- fun:pthread_getspecific
1064-}
1065-
1066-
1067-####################################################
1068-# To do with dynamic linking
1069-#
1070-# helgrind---ld.so-...-dlsym was merged into helgrind-glibc2X-001
1071-
1072-{
1073- helgrind---_dl_allocate_tls
1074- Helgrind:Race
1075- fun:mempcpy
1076- fun:_dl_allocate_tls_init
1077- ...
1078- fun:pthread_create@@GLIBC_2.2*
1079- fun:pthread_create_WRK
1080- fun:pthread_create@*
1081-}
1082-
1083-{
1084- helgrind---_dl_allocate_tls2
1085- Helgrind:Race
1086- fun:memcpy
1087- fun:__mempcpy_inline
1088- fun:_dl_allocate_tls_init
1089- ...
1090- fun:pthread_create@@GLIBC_2.2*
1091- fun:pthread_create_WRK
1092- fun:pthread_create@*
1093-}
1094-
1095-####################################################
1096-# To do with GNU libgomp
1097-#
1098-{
1099- helgrind---libgomp43-1
1100- Helgrind:Race
1101- fun:gomp_ordered_sync
1102-}
1103-
1104-{
1105- helgrind---libgomp43-1
1106- Helgrind:Race
1107- fun:gomp_ordered_next
1108-}
1109-
1110-{
1111- helgrind---libgomp43-1
1112- Helgrind:Race
1113- fun:gomp_ordered_last
1114-}
1115Index: valgrind-3.17.0/glibc-2.X-helgrind.supp.in
1116===================================================================
1117--- /dev/null
1118+++ valgrind-3.17.0/glibc-2.X-helgrind.supp.in
1119@@ -0,0 +1,303 @@
1120+# IMPORTANT: DO NOT EDIT glibc-2.X-helgrind.supp, as it is as a generated
1121+# file. Instead edit glibc-2.X-helgrind.supp.in.
1122+
1123+# FIXME 22 Jan 09: helgrind-glibc2X-005 overlaps with a lot of
1124+# other stuff. They should be removed.
1125+
1126+##----------------------------------------------------------------------##
1127+# Suppressions for the Helgrind tool when using
1128+# a glibc-2.{3,4,5,6,7,8,9} system
1129+
1130+####################################################
1131+# glibc-2.X specific
1132+# These are generic cover-alls which catch a lot of stuff
1133+# in various combinations of ld, libc and libpthread
1134+#
1135+# Note this is heavyhanded and not very clever:
1136+#
1137+# - suppress anything that has its top frame in ld.so
1138+# That's fine, since it's mostly dynamic linking stuff,
1139+# which has various deliberate (harmless) races
1140+#
1141+# - suppress anything that has its top frame in libc.so.
1142+# This really isn't clever, since it could hide some
1143+# legitimate races. But the problem is, if we don't do
1144+# this, then loads of errors to do with stdio are reported, because
1145+# H fails to see glibc's internal locking/unlocking of FILE*s
1146+# as required by POSIX. A better solution is needed.
1147+#
1148+# - some of the stdio functions in newer glibc manipulate stdio
1149+# FILE*s state through mempcpy, which we intercept, so we also need
1150+# to suppress such manipulations.
1151+
1152+#{
1153+# helgrind-glibc2X-001
1154+# Helgrind:Race
1155+# obj:*/lib*/ld-2.*so*
1156+#}
1157+
1158+# helgrind-glibc2X-002 was merged into helgrind-glibc2X-001
1159+
1160+# helgrind-glibc2X-003 was merged into helgrind-glibc2X-001
1161+
1162+{
1163+ helgrind-glibc2X-004
1164+ Helgrind:Race
1165+ obj:@GLIBC_LIBC_PATH@
1166+}
1167+
1168+{
1169+ helgrind-glibc-io-xsputn-mempcpy
1170+ Helgrind:Race
1171+ fun:__GI_mempcpy
1172+ fun:_IO_*xsputn*
1173+ obj:@GLIBC_LIBC_PATH@
1174+}
1175+
1176+{
1177+ helgrind-glibc2X-005
1178+ Helgrind:Race
1179+ obj:@GLIBC_LIBPTHREAD_PATH@
1180+}
1181+
1182+# helgrind-glibc2X-006 was merged into helgrind-glibc2X-005
1183+
1184+# helgrind-glibc2X-007 was merged into helgrind-glibc2X-001
1185+
1186+# helgrind-glibc2X-008 was merged into helgrind-glibc2X-004
1187+
1188+# helgrind-glibc2X-009 was merged into helgrind-glibc2X-004
1189+
1190+# helgrind-glibc2X-010 was merged into helgrind-glibc2X-001
1191+
1192+# helgrind-glibc2X-011 was merged into helgrind-glibc2X-004
1193+
1194+# helgrind-glibc2X-012 was merged into helgrind-glibc2X-001
1195+
1196+# helgrind-glibc2X-013 was merged into helgrind-glibc2X-001
1197+
1198+# helgrind-glibc2X-014 was merged into helgrind-glibc2X-001
1199+
1200+# helgrind-glibc2X-015 was merged into helgrind-glibc2X-004
1201+
1202+# helgrind-glibc2X-016 was merged into helgrind-glibc2X-004
1203+
1204+# These are very ugly. They are needed to suppress errors inside (eg)
1205+# NPTL's pthread_cond_signal. Why only one stack frame -- at least we
1206+# should see the wrapper calling the real functions, right?
1207+# Unfortunately, no: the real functions are handwritten assembly (in
1208+# the glibc-2.5 sources) and does not create a proper stack frame.
1209+# Therefore it's only one level of unwinding before we're back out in
1210+# user code rather than the 2 levels you'd expect.
1211+{
1212+ helgrind-glibc2X-101
1213+ Helgrind:Race
1214+ obj:@GLIBC_LIBPTHREAD_PATH@
1215+ fun:pthread_*
1216+}
1217+{
1218+ helgrind-glibc2X-102
1219+ Helgrind:Race
1220+ fun:mythread_wrapper
1221+ obj:@GLIBC_LIBPTHREAD_PATH@
1222+}
1223+{
1224+ helgrind-glibc2X-103
1225+ Helgrind:Race
1226+ fun:pthread_cond_*@@GLIBC_2.*
1227+}
1228+{
1229+ helgrind-glibc2X-104
1230+ Helgrind:Race
1231+ fun:__lll_mutex_*
1232+}
1233+{
1234+ helgrind-glibc2X-105
1235+ Helgrind:Race
1236+ fun:pthread_rwlock_*lock*
1237+}
1238+{
1239+ helgrind-glibc2X-106
1240+ Helgrind:Race
1241+ fun:__lll_lock_wait
1242+}
1243+{
1244+ helgrind-glibc2X-107
1245+ Helgrind:Race
1246+ obj:@GLIBC_LIBPTHREAD_PATH@
1247+ fun:sem_*
1248+}
1249+{
1250+ helgrind-glibc2X-108
1251+ Helgrind:Race
1252+ fun:clone
1253+}
1254+{
1255+ helgrind-glibc2X-109
1256+ Helgrind:Race
1257+ fun:start_thread
1258+}
1259+{
1260+ helgrind-glibc2X-110
1261+ Helgrind:Race
1262+ obj:@GLIBC_LIBC_PATH@
1263+ fun:pthread_*
1264+}
1265+{
1266+ helgrind-glibc2X-111
1267+ Helgrind:Race
1268+ fun:__lll_*lock_*
1269+}
1270+{
1271+ helgrind-glibc2X-113
1272+ Helgrind:Race
1273+ fun:pthread_barrier_wait*
1274+}
1275+
1276+
1277+####################################################
1278+# qt4 specific (GNU mangling)
1279+#
1280+{
1281+ helgrind-qt4---QMutex::lock()-QMutex::lock()
1282+ Helgrind:Race
1283+ ...
1284+ fun:_ZN6QMutex4lockEv
1285+ fun:_ZN6QMutex4lockEv
1286+}
1287+
1288+{
1289+ helgrind-qt4---QMutex::unlock()-QMutex::unlock()
1290+ Helgrind:Race
1291+ ...
1292+ fun:_ZN6QMutex6unlockEv
1293+ fun:_ZN6QMutex6unlockEv
1294+}
1295+
1296+{
1297+ helgrind-qt4---pthread_setspecific-QThreadPrivate::start(void*)
1298+ Helgrind:Race
1299+ fun:pthread_setspecific
1300+ fun:_ZN14QThreadPrivate5startEPv
1301+}
1302+
1303+
1304+####################################################
1305+# Other stuff.
1306+#
1307+# pthread_exit apparently calls some kind of unwind
1308+# mechanism - maybe to remove some number of frames
1309+# from the thread's stack, so as to get back to the
1310+# outermost frame for the thread? Anyway..
1311+
1312+{
1313+ helgrind---*Unwind*-...-pthread_exit
1314+ Helgrind:Race
1315+ fun:*Unwind*
1316+ ...
1317+ fun:pthread_exit
1318+}
1319+
1320+{
1321+ helgrind---...-*Unwind*-*pthread_unwind*
1322+ Helgrind:Race
1323+ ...
1324+ fun:*Unwind*
1325+ fun:*pthread_unwind*
1326+}
1327+
1328+{
1329+ helgrind---...-*Unwind*-*pthread_unwind*
1330+ Helgrind:Race
1331+ ...
1332+ fun:_Unwind*
1333+ ...
1334+ fun:_Unwind_Backtrace
1335+}
1336+
1337+
1338+
1339+
1340+####################################################
1341+# To do with thread stack allocation and deallocation?
1342+#
1343+{
1344+ helgrind---free_stacks-__deallocate_stack
1345+ Helgrind:Race
1346+ fun:free_stacks
1347+ fun:__deallocate_stack
1348+}
1349+
1350+{
1351+ helgrind---__deallocate_stack-start_thread-clone
1352+ Helgrind:Race
1353+ fun:__deallocate_stack
1354+ fun:start_thread
1355+ fun:clone
1356+}
1357+
1358+
1359+####################################################
1360+# To do with pthread_{set,get}specific
1361+#
1362+{
1363+ helgrind---pthread_setspecific
1364+ Helgrind:Race
1365+ fun:pthread_setspecific
1366+}
1367+
1368+{
1369+ helgrind---pthread_getspecific
1370+ Helgrind:Race
1371+ fun:pthread_getspecific
1372+}
1373+
1374+
1375+####################################################
1376+# To do with dynamic linking
1377+#
1378+# helgrind---ld.so-...-dlsym was merged into helgrind-glibc2X-001
1379+
1380+{
1381+ helgrind---_dl_allocate_tls
1382+ Helgrind:Race
1383+ fun:mempcpy
1384+ fun:_dl_allocate_tls_init
1385+ ...
1386+ fun:pthread_create@@GLIBC_2.2*
1387+ fun:pthread_create_WRK
1388+ fun:pthread_create@*
1389+}
1390+
1391+{
1392+ helgrind---_dl_allocate_tls2
1393+ Helgrind:Race
1394+ fun:memcpy
1395+ fun:__mempcpy_inline
1396+ fun:_dl_allocate_tls_init
1397+ ...
1398+ fun:pthread_create@@GLIBC_2.2*
1399+ fun:pthread_create_WRK
1400+ fun:pthread_create@*
1401+}
1402+
1403+####################################################
1404+# To do with GNU libgomp
1405+#
1406+{
1407+ helgrind---libgomp43-1
1408+ Helgrind:Race
1409+ fun:gomp_ordered_sync
1410+}
1411+
1412+{
1413+ helgrind---libgomp43-1
1414+ Helgrind:Race
1415+ fun:gomp_ordered_next
1416+}
1417+
1418+{
1419+ helgrind---libgomp43-1
1420+ Helgrind:Race
1421+ fun:gomp_ordered_last
1422+}
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
index 3f8a34becc..2805ad0eb3 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
@@ -45,6 +45,10 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
45 file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ 45 file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
46 file://0001-Add-missing-musl.supp.patch \ 46 file://0001-Add-missing-musl.supp.patch \
47 file://0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch \ 47 file://0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch \
48 file://6da22a4d246519cd1a638cfc7eff00cdd74413c4.patch \
49 file://200b6a5a0ea3e1e154663b0fc575bfe2becf177d.patch \
50 file://a1364805fc74b5690f763033c0c9b43f27613572.patch \
51 file://52ed51fc35f8a6148c2940eb46932b02dd3b9b23.patch \
48 " 52 "
49SRC_URI[md5sum] = "afe11b5572c3121a781433b7c0ab741b" 53SRC_URI[md5sum] = "afe11b5572c3121a781433b7c0ab741b"
50SRC_URI[sha256sum] = "ad3aec668e813e40f238995f60796d9590eee64a16dff88421430630e69285a2" 54SRC_URI[sha256sum] = "ad3aec668e813e40f238995f60796d9590eee64a16dff88421430630e69285a2"