diff options
Diffstat (limited to 'meta/recipes-devtools/valgrind')
33 files changed, 842 insertions, 1318 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch deleted file mode 100644 index 81ab29f3be..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 1b5b6f827ac1153a41fc93e78bf34ccdf5720b9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
3 | Date: Fri, 19 Oct 2018 10:31:12 -0400 | ||
4 | Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc | ||
5 | |||
6 | Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400162 | ||
7 | |||
8 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
9 | --- | ||
10 | memcheck/tests/linux/sys-statx.c | 5 +++++ | ||
11 | 1 file changed, 5 insertions(+) | ||
12 | |||
13 | diff --git a/memcheck/tests/linux/sys-statx.c b/memcheck/tests/linux/sys-statx.c | ||
14 | index fe9f9ba45..473c2cd7f 100644 | ||
15 | --- a/memcheck/tests/linux/sys-statx.c | ||
16 | +++ b/memcheck/tests/linux/sys-statx.c | ||
17 | @@ -7,11 +7,16 @@ | ||
18 | #include <assert.h> | ||
19 | #include <string.h> | ||
20 | #include <sys/syscall.h> | ||
21 | + | ||
22 | +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) | ||
23 | #if __GLIBC_PREREQ(2,28) | ||
24 | /* struct statx provided in sys/stat.h */ | ||
25 | #else | ||
26 | #include <linux/stat.h> | ||
27 | #endif | ||
28 | +#else | ||
29 | +#include <linux/stat.h> | ||
30 | +#endif | ||
31 | #include <errno.h> | ||
32 | |||
33 | int check_stat2; | ||
34 | -- | ||
35 | 2.17.0 | ||
36 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch deleted file mode 100644 index 8d2ca5733e..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch +++ /dev/null | |||
@@ -1,182 +0,0 @@ | |||
1 | From 2155c1b2cf00e744e280c493eb74bf457dfcc3b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
3 | Date: Sun, 21 Oct 2018 15:09:31 -0400 | ||
4 | Subject: [PATCH] Make local functions static to avoid assembler error | ||
5 | |||
6 | Avoid mips32 x-compiler warnings such as: | ||
7 | |||
8 | | ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes] | ||
9 | | void do_signal ( UWord* w ) | ||
10 | | ^~~~~~~~~ | ||
11 | |||
12 | by making functions and global variables that are file scope be static | ||
13 | and more importantly also avoid an assembler error: | ||
14 | |||
15 | /tmp/cce22iiw.s: Assembler messages: | ||
16 | /tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined | ||
17 | /tmp/cce22iiw.s:448: Error: symbol `exit' is already defined | ||
18 | /tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined | ||
19 | /tmp/cce22iiw.s:917: Error: symbol `exit' is already defined | ||
20 | |||
21 | Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400164 | ||
22 | |||
23 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
24 | --- | ||
25 | helgrind/tests/annotate_hbefore.c | 34 +++++++++++++++---------------- | ||
26 | 1 file changed, 17 insertions(+), 17 deletions(-) | ||
27 | |||
28 | diff --git a/helgrind/tests/annotate_hbefore.c b/helgrind/tests/annotate_hbefore.c | ||
29 | index e311714f7..f55514e45 100644 | ||
30 | --- a/helgrind/tests/annotate_hbefore.c | ||
31 | +++ b/helgrind/tests/annotate_hbefore.c | ||
32 | @@ -24,7 +24,7 @@ typedef unsigned long int UWord; | ||
33 | |||
34 | // ppc64 | ||
35 | /* return 1 if success, 0 if failure */ | ||
36 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
37 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
38 | { | ||
39 | UWord old, success; | ||
40 | |||
41 | @@ -57,7 +57,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
42 | |||
43 | // ppc32 | ||
44 | /* return 1 if success, 0 if failure */ | ||
45 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
46 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
47 | { | ||
48 | UWord old, success; | ||
49 | |||
50 | @@ -90,7 +90,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
51 | |||
52 | // amd64 | ||
53 | /* return 1 if success, 0 if failure */ | ||
54 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
55 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
56 | { | ||
57 | UWord block[4] = { (UWord)addr, expected, nyu, 2 }; | ||
58 | __asm__ __volatile__( | ||
59 | @@ -113,7 +113,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
60 | |||
61 | // x86 | ||
62 | /* return 1 if success, 0 if failure */ | ||
63 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
64 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
65 | { | ||
66 | UWord block[4] = { (UWord)addr, expected, nyu, 2 }; | ||
67 | __asm__ __volatile__( | ||
68 | @@ -138,7 +138,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
69 | |||
70 | // arm | ||
71 | /* return 1 if success, 0 if failure */ | ||
72 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
73 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
74 | { | ||
75 | UWord old, success; | ||
76 | UWord block[2] = { (UWord)addr, nyu }; | ||
77 | @@ -171,7 +171,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
78 | |||
79 | // arm64 | ||
80 | /* return 1 if success, 0 if failure */ | ||
81 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
82 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
83 | { | ||
84 | UWord old, success; | ||
85 | UWord block[2] = { (UWord)addr, nyu }; | ||
86 | @@ -204,7 +204,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
87 | |||
88 | // s390x | ||
89 | /* return 1 if success, 0 if failure */ | ||
90 | -UWord do_acasW(UWord* addr, UWord expected, UWord nyu ) | ||
91 | +static UWord do_acasW(UWord* addr, UWord expected, UWord nyu ) | ||
92 | { | ||
93 | int cc; | ||
94 | |||
95 | @@ -223,7 +223,7 @@ UWord do_acasW(UWord* addr, UWord expected, UWord nyu ) | ||
96 | |||
97 | // mips32 | ||
98 | /* return 1 if success, 0 if failure */ | ||
99 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
100 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
101 | { | ||
102 | UWord success; | ||
103 | UWord block[3] = { (UWord)addr, nyu, expected}; | ||
104 | @@ -256,7 +256,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
105 | |||
106 | // mips64 | ||
107 | /* return 1 if success, 0 if failure */ | ||
108 | -UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
109 | +static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
110 | { | ||
111 | UWord success; | ||
112 | UWord block[3] = { (UWord)addr, nyu, expected}; | ||
113 | @@ -287,7 +287,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) | ||
114 | |||
115 | #endif | ||
116 | |||
117 | -void atomic_incW ( UWord* w ) | ||
118 | +static void atomic_incW ( UWord* w ) | ||
119 | { | ||
120 | while (1) { | ||
121 | UWord old = *w; | ||
122 | @@ -301,7 +301,7 @@ void atomic_incW ( UWord* w ) | ||
123 | |||
124 | #define NNN 1000000 | ||
125 | |||
126 | -void* thread_fn ( void* arg ) | ||
127 | +static void* thread_fn ( void* arg ) | ||
128 | { | ||
129 | UWord* w = (UWord*)arg; | ||
130 | int i; | ||
131 | @@ -331,10 +331,10 @@ int main ( void ) | ||
132 | |||
133 | #endif | ||
134 | |||
135 | -int shared_var = 0; // is not raced upon | ||
136 | +static int shared_var = 0; // is not raced upon | ||
137 | |||
138 | |||
139 | -void delayXms ( int i ) | ||
140 | +static void delayXms ( int i ) | ||
141 | { | ||
142 | struct timespec ts = { 0, 1 * 1000 * 1000 }; | ||
143 | // We do the sleep in small pieces to have scheduling | ||
144 | @@ -348,7 +348,7 @@ void delayXms ( int i ) | ||
145 | } | ||
146 | } | ||
147 | |||
148 | -void do_wait ( UWord* w ) | ||
149 | +static void do_wait ( UWord* w ) | ||
150 | { | ||
151 | UWord w0 = *w; | ||
152 | UWord volatile * wV = w; | ||
153 | @@ -357,7 +357,7 @@ void do_wait ( UWord* w ) | ||
154 | ANNOTATE_HAPPENS_AFTER(w); | ||
155 | } | ||
156 | |||
157 | -void do_signal ( UWord* w ) | ||
158 | +static void do_signal ( UWord* w ) | ||
159 | { | ||
160 | ANNOTATE_HAPPENS_BEFORE(w); | ||
161 | atomic_incW(w); | ||
162 | @@ -365,7 +365,7 @@ void do_signal ( UWord* w ) | ||
163 | |||
164 | |||
165 | |||
166 | -void* thread_fn1 ( void* arg ) | ||
167 | +static void* thread_fn1 ( void* arg ) | ||
168 | { | ||
169 | UWord* w = (UWord*)arg; | ||
170 | delayXms(500); // ensure t2 gets to its wait first | ||
171 | @@ -376,7 +376,7 @@ void* thread_fn1 ( void* arg ) | ||
172 | return NULL; | ||
173 | } | ||
174 | |||
175 | -void* thread_fn2 ( void* arg ) | ||
176 | +static void* thread_fn2 ( void* arg ) | ||
177 | { | ||
178 | UWord* w = (UWord*)arg; | ||
179 | do_wait(w); // wait for h-b edge from first thread | ||
180 | -- | ||
181 | 2.17.0 | ||
182 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch deleted file mode 100644 index a78e1953ff..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 9762fd23e1f1db66d4b977c694a17d3bca3fe99a Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 8 Jan 2016 16:36:29 +0200 | ||
4 | Subject: [PATCH] Remove tests that fail to build on some PPC32 configurations | ||
5 | |||
6 | Failures are documented here: | ||
7 | http://errors.yoctoproject.org/Errors/Search/?items=10&query=862d702fbb99e484631315aa44b9e46f8fc567da&filter=valgrind&type=recipe | ||
8 | |||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | Upstream-Status: Pending | ||
11 | --- | ||
12 | memcheck/tests/ppc32/Makefile.am | 2 +- | ||
13 | none/tests/ppc32/Makefile.am | 4 ++-- | ||
14 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am | ||
17 | index 26b95a2..8f05743 100644 | ||
18 | --- a/memcheck/tests/ppc32/Makefile.am | ||
19 | +++ b/memcheck/tests/ppc32/Makefile.am | ||
20 | @@ -10,7 +10,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ | ||
21 | power_ISA2_07.stderr.exp power_ISA2_07.vgtest | ||
22 | |||
23 | check_PROGRAMS = \ | ||
24 | - power_ISA2_05 power_ISA2_07 | ||
25 | + power_ISA2_07 | ||
26 | |||
27 | power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \ | ||
28 | -I$(top_srcdir)/include @FLAG_M32@ | ||
29 | diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am | ||
30 | index 196239e..0fe3425 100644 | ||
31 | --- a/none/tests/ppc32/Makefile.am | ||
32 | +++ b/none/tests/ppc32/Makefile.am | ||
33 | @@ -50,13 +50,13 @@ EXTRA_DIST = \ | ||
34 | |||
35 | check_PROGRAMS = \ | ||
36 | allexec \ | ||
37 | - lsw jm-insns round \ | ||
38 | + lsw \ | ||
39 | test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \ | ||
40 | test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \ | ||
41 | test_isa_2_07_part1 test_isa_2_07_part2 \ | ||
42 | test_tm test_touch_tm ldst_multiple data-cache-instructions \ | ||
43 | test_fx test_gx \ | ||
44 | - testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \ | ||
45 | + twi tw xlc_dbl_u32 power6_bcmp \ | ||
46 | bug129390-ppc32 bug139050-ppc32 \ | ||
47 | ldstrev mftocrf mcrfs | ||
48 | |||
49 | -- | ||
50 | 2.6.4 | ||
51 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch b/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch new file mode 100644 index 0000000000..256ddb0c34 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 99fc6fe9b66becac3c94068129e84217330a71a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 13 Jan 2022 18:26:02 -0800 | ||
4 | Subject: [PATCH] docs: Disable manual validation | ||
5 | |||
6 | validating manual and manpages, this task involves calling xmllint which | ||
7 | accesses network and --nonet option also does not disable this, | ||
8 | therefore disable it. | ||
9 | |||
10 | Fixes | ||
11 | | error : Resource temporarily unavailable | ||
12 | | ../callgrind/docs/cl-manual.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" | ||
13 | | <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ] | ||
14 | |||
15 | Upstream-Status: Inappropriate [OE-Specific] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | docs/Makefile.am | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/docs/Makefile.am b/docs/Makefile.am | ||
22 | index d4250e8..c500306 100644 | ||
23 | --- a/docs/Makefile.am | ||
24 | +++ b/docs/Makefile.am | ||
25 | @@ -192,7 +192,7 @@ valid-manpages: $(MANPAGES_XML_FILES) | ||
26 | touch $@; \ | ||
27 | fi | ||
28 | |||
29 | -check-local: valid-manual valid-manpages | ||
30 | +check-local: | ||
31 | |||
32 | # The text version of the FAQ. | ||
33 | FAQ.txt: | ||
34 | -- | ||
35 | 2.34.1 | ||
36 | |||
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 deleted file mode 100644 index 37f6ea667d..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 15330adf7c2471fbaa6a0818db07078d81dbff97 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bart Van Assche <bvanassche@acm.org> | ||
3 | Date: Sat, 19 Sep 2020 08:08:59 -0700 | ||
4 | Subject: [PATCH] drd: Port to Fedora 33 | ||
5 | |||
6 | Apparently on Fedora 33 the POSIX thread functions exist in both libc and | ||
7 | libpthread. Hence this patch that intercepts the pthread functions in | ||
8 | libc. See also https://bugs.kde.org/show_bug.cgi?id=426144 . | ||
9 | |||
10 | Signed-off-by: Bart Van Assche <bvanassche@acm.org> | ||
11 | |||
12 | This patch was imported from the valgrind sourceware server | ||
13 | (https://sourceware.org/git/?p=valgrind.git;a=commit;h=15330adf7c2471fbaa6a0818db07078d81dbff97) | ||
14 | It was modified to remove the changes to the valgrind NEWS file, | ||
15 | as these are difficult to maintain and don't impact the valgrind | ||
16 | code itself. | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | |||
20 | Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com> | ||
21 | --- | ||
22 | drd/drd_pthread_intercepts.c | 9 +++++++++ | ||
23 | 1 file changed, 10 insertions(+) | ||
24 | |||
25 | diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c | ||
26 | index 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 | -- | ||
47 | 2.25.1 | ||
48 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch b/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch deleted file mode 100644 index e96bf3c611..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | The changes in 0001-drd-Port-to-Fedora-33.patch break builds on musl. These | ||
2 | need a __GLIBC__ guard to ensure musl builds continue to work. | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
6 | |||
7 | Index: valgrind-3.16.1/drd/drd_pthread_intercepts.c | ||
8 | =================================================================== | ||
9 | --- valgrind-3.16.1.orig/drd/drd_pthread_intercepts.c | ||
10 | +++ valgrind-3.16.1/drd/drd_pthread_intercepts.c | ||
11 | @@ -180,6 +180,7 @@ static int never_true; | ||
12 | * functions in both libc and libpthread. Older glibc versions only have an | ||
13 | * implementation of the pthread functions in libpthread. | ||
14 | */ | ||
15 | +#ifdef __GLIBC__ | ||
16 | #define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \ | ||
17 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl; \ | ||
18 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \ | ||
19 | @@ -187,6 +188,12 @@ static int never_true; | ||
20 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \ | ||
21 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ | ||
22 | { return implf argl; } | ||
23 | +#else | ||
24 | +#define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \ | ||
25 | + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \ | ||
26 | + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ | ||
27 | + { return implf argl; } | ||
28 | +#endif | ||
29 | #endif | ||
30 | |||
31 | /** | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch b/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch deleted file mode 100644 index 39b624d9f6..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | From fb5362f205b37c5060fcd764a7ed393abe4f2f3d Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 27 Jul 2018 17:39:37 +0800 | ||
4 | Subject: [PATCH 1/2] fix opcode not supported on mips32-linux | ||
5 | |||
6 | While build tests(`make check') on mips32-linux, there are | ||
7 | serial failures such as: | ||
8 | [snip] | ||
9 | | mips-wrsmllib32-linux-gcc -meb -mabi=32 -mhard-float -c | ||
10 | -o atomic_incs-atomic_incs.o `test -f 'atomic_incs.c' || echo | ||
11 | '../../../valgrind-3.13.0/memcheck/tests/'`atomic_incs.c | ||
12 | | /tmp/ccqrmINN.s: Assembler messages: | ||
13 | | /tmp/ccqrmINN.s:247: Error: opcode not supported on this | ||
14 | processor: mips1 (mips1) `ll $t3,0($t1)' | ||
15 | | /tmp/ccqrmINN.s:249: Error: opcode not supported on this | ||
16 | processor: mips1 (mips1) `sc $t3,0($t1)' | ||
17 | [snip] | ||
18 | |||
19 | Since the following commit applied, it defines CLFAGS for mips32, | ||
20 | but missed to pass them to tests which caused the above failure | ||
21 | ... | ||
22 | 3e344c57f Merge in a port for mips32-linux | ||
23 | ... | ||
24 | |||
25 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=396905] | ||
26 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
27 | --- | ||
28 | helgrind/tests/Makefile.am | 5 +++++ | ||
29 | memcheck/tests/Makefile.am | 5 +++++ | ||
30 | none/tests/mips32/Makefile.am | 4 ++++ | ||
31 | 3 files changed, 14 insertions(+) | ||
32 | |||
33 | diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am | ||
34 | index ad1af191a..6209d35a7 100644 | ||
35 | --- a/helgrind/tests/Makefile.am | ||
36 | +++ b/helgrind/tests/Makefile.am | ||
37 | @@ -214,6 +214,11 @@ check_PROGRAMS += annotate_rwlock | ||
38 | endif | ||
39 | |||
40 | AM_CFLAGS += $(AM_FLAG_M3264_PRI) | ||
41 | + | ||
42 | +if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX | ||
43 | +AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX) | ||
44 | +endif | ||
45 | + | ||
46 | AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) | ||
47 | |||
48 | LDADD = -lpthread | ||
49 | diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am | ||
50 | index 84e49405f..aff861a32 100644 | ||
51 | --- a/memcheck/tests/Makefile.am | ||
52 | +++ b/memcheck/tests/Makefile.am | ||
53 | @@ -443,6 +443,11 @@ check_PROGRAMS += reach_thread_register | ||
54 | endif | ||
55 | |||
56 | AM_CFLAGS += $(AM_FLAG_M3264_PRI) | ||
57 | + | ||
58 | +if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX | ||
59 | +AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX) | ||
60 | +endif | ||
61 | + | ||
62 | AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) | ||
63 | |||
64 | if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX | ||
65 | diff --git a/none/tests/mips32/Makefile.am b/none/tests/mips32/Makefile.am | ||
66 | index d11591d45..602cd26f6 100644 | ||
67 | --- a/none/tests/mips32/Makefile.am | ||
68 | +++ b/none/tests/mips32/Makefile.am | ||
69 | @@ -99,6 +99,10 @@ check_PROGRAMS = \ | ||
70 | round_fpu64 \ | ||
71 | fpu_branches | ||
72 | |||
73 | +if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX | ||
74 | +AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX) | ||
75 | +endif | ||
76 | + | ||
77 | AM_CFLAGS += @FLAG_M32@ | ||
78 | AM_CXXFLAGS += @FLAG_M32@ | ||
79 | AM_CCASFLAGS += @FLAG_M32@ | ||
80 | -- | ||
81 | 2.17.1 | ||
82 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-gdbserver_tests-Disable-nlcontrolc.vgtest-for-x86-64.patch b/meta/recipes-devtools/valgrind/valgrind/0001-gdbserver_tests-Disable-nlcontrolc.vgtest-for-x86-64.patch deleted file mode 100644 index 0bd8273cd8..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-gdbserver_tests-Disable-nlcontrolc.vgtest-for-x86-64.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From d8c19e0bb9ca2fd48f223e1fdeffcafeb0aa1745 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Fan Yu <yifan.yu@windriver.com> | ||
3 | Date: Wed, 17 Feb 2021 14:53:44 -0500 | ||
4 | Subject: [PATCH] gdbserver_tests: Disable nlcontrolc.vgtest for x86-64 | ||
5 | |||
6 | Test hangs after glibc 2.33 uprev | ||
7 | |||
8 | Using gdb to modify the timeout argument no longer | ||
9 | affects how long `select` wait. | ||
10 | |||
11 | https://bugs.kde.org/show_bug.cgi?id=432870 | ||
12 | Upstream-Status: Pending | ||
13 | Waiting for upstream to take action. | ||
14 | |||
15 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
16 | --- | ||
17 | gdbserver_tests/nlcontrolc.vgtest | 3 ++- | ||
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/gdbserver_tests/nlcontrolc.vgtest b/gdbserver_tests/nlcontrolc.vgtest | ||
21 | index bb5308403..96d2b52bb 100644 | ||
22 | --- a/gdbserver_tests/nlcontrolc.vgtest | ||
23 | +++ b/gdbserver_tests/nlcontrolc.vgtest | ||
24 | @@ -13,7 +13,8 @@ args: 1000000000 1000000000 1000000000 BSBSBSBS 1 | ||
25 | vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlcontrolc | ||
26 | stderr_filter: filter_stderr | ||
27 | # Bug 338633 nlcontrol hangs on arm64 currently. | ||
28 | -prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/arch_test arm64 && ! ../tests/os_test solaris | ||
29 | +# Bug 432870 nlcontrolc hangs on x86-64 starting with glibc 2.33 | ||
30 | +prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/arch_test arm64 && ! ../tests/os_test solaris && ! ../tests/arch_test amd64 | ||
31 | progB: gdb | ||
32 | argsB: --quiet -l 60 --nx ./sleepers | ||
33 | stdinB: nlcontrolc.stdinB.gdb | ||
34 | -- | ||
35 | 2.29.2 | ||
36 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch b/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch deleted file mode 100644 index f66df3d2d2..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From cdec010444df5a4328e90d07a2024fdeefcc74b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Floyd <paulf@free.fr> | ||
3 | Date: Wed, 18 Nov 2020 12:49:20 -0400 | ||
4 | Subject: [PATCH] helgrind: Intercept libc functions | ||
5 | |||
6 | PTH_FUNC definition needs to be modified in order to | ||
7 | intercept posix thread functions in both libc and | ||
8 | libpthread. In order to handle this in helgrind, weak alias | ||
9 | the pthread functions in glibc. | ||
10 | |||
11 | Upstream-Status: Submitted | ||
12 | |||
13 | Signed-off-by: Paul Floyd <paulf@free.fr> | ||
14 | Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com> | ||
15 | --- | ||
16 | helgrind/hg_intercepts.c | 12 ++++++++++++ | ||
17 | 1 file changed, 12 insertions(+) | ||
18 | |||
19 | diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c | ||
20 | index a10c3a4a3..316140ca6 100644 | ||
21 | --- a/helgrind/hg_intercepts.c | ||
22 | +++ b/helgrind/hg_intercepts.c | ||
23 | @@ -77,6 +77,11 @@ | ||
24 | /*--- ---*/ | ||
25 | /*----------------------------------------------------------------*/ | ||
26 | |||
27 | +#define hg_expand(tok) #tok | ||
28 | +#define hg_str(tok) hg_expand(tok) | ||
29 | +# define hg_weak_alias(name, aliasname) \ | ||
30 | + extern __typeof (name) aliasname __attribute__ ((weak, alias(hg_str(name)))) | ||
31 | + | ||
32 | #if defined(VGO_solaris) | ||
33 | /* On Solaris, libpthread is just a filter library on top of libc. | ||
34 | * Threading and synchronization functions in runtime linker are not | ||
35 | @@ -91,9 +96,16 @@ | ||
36 | #define CREQ_PTHREAD_T Word | ||
37 | #define SEM_ERROR ret | ||
38 | #else | ||
39 | +#ifdef MUSL_LIBC | ||
40 | +#define PTH_FUNC(ret_ty, f, args...) \ | ||
41 | + ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args); \ | ||
42 | + ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args) | ||
43 | +#else | ||
44 | #define PTH_FUNC(ret_ty, f, args...) \ | ||
45 | ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args); \ | ||
46 | + hg_weak_alias(I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f), I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBC_SONAME,f)); \ | ||
47 | ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args) | ||
48 | +#endif | ||
49 | #define CREQ_PTHREAD_T pthread_t | ||
50 | #define SEM_ERROR errno | ||
51 | #endif /* VGO_solaris */ | ||
52 | -- | ||
53 | 2.17.1 | ||
54 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch index 9f1da7bac6..073713c139 100644 --- a/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch | |||
@@ -10,7 +10,7 @@ implementation. | |||
10 | Fixes | 10 | Fixes |
11 | | cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch | 11 | | cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch |
12 | 12 | ||
13 | Upstream-Status: Pending | 13 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=454346] |
14 | 14 | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
16 | --- | 16 | --- |
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch deleted file mode 100644 index a48d7db070..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 5 Jul 2017 17:12:43 -0700 | ||
4 | Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined | ||
5 | |||
6 | Helps compiling with musl where __THROW is not available | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Submitted | ||
11 | |||
12 | memcheck/tests/arm64-linux/scalar.h | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h | ||
16 | index 9008816..8ef050f 100644 | ||
17 | --- a/memcheck/tests/arm64-linux/scalar.h | ||
18 | +++ b/memcheck/tests/arm64-linux/scalar.h | ||
19 | @@ -12,6 +12,10 @@ | ||
20 | #include <sys/types.h> | ||
21 | #include <sys/mman.h> | ||
22 | |||
23 | +#ifndef __THROW | ||
24 | +#define __THROW | ||
25 | +#endif | ||
26 | + | ||
27 | // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to | ||
28 | // declare this ourselves. | ||
29 | extern long int syscall (long int __sysno, ...) __THROW; | ||
30 | -- | ||
31 | 2.13.2 | ||
32 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch index d641998d72..e421ac6c80 100644 --- a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch | |||
@@ -19,7 +19,7 @@ index 6e5a797b9..0ede1ab18 100644 | |||
19 | @@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null | 19 | @@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null |
20 | 20 | ||
21 | 21 | ||
22 | FILE DESCRIPTORS: 6 open at exit. | 22 | FILE DESCRIPTORS: 6 open (3 std) at exit. |
23 | -Open file descriptor ...: /tmp/data2 | 23 | -Open file descriptor ...: /tmp/data2 |
24 | +Open file descriptor ...: ... | 24 | +Open file descriptor ...: ... |
25 | ... | 25 | ... |
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch deleted file mode 100644 index 185b8f9e60..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 10 Jun 2017 00:39:07 -0700 | ||
4 | Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc | ||
5 | |||
6 | rawmemchr() is a GNU extention therefore mark it so | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Pending | ||
11 | |||
12 | memcheck/tests/str_tester.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c | ||
16 | index 9f7790a..47e4b4a 100644 | ||
17 | --- a/memcheck/tests/str_tester.c | ||
18 | +++ b/memcheck/tests/str_tester.c | ||
19 | @@ -504,7 +504,7 @@ test_strchrnul (void) | ||
20 | #endif | ||
21 | |||
22 | // DDD: better done by testing for the function. | ||
23 | -#if !defined(__APPLE__) && !defined(__sun) | ||
24 | +#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) | ||
25 | static void | ||
26 | test_rawmemchr (void) | ||
27 | { | ||
28 | @@ -1442,7 +1442,7 @@ main (void) | ||
29 | test_strchrnul (); | ||
30 | # endif | ||
31 | |||
32 | -# if !defined(__APPLE__) && !defined(__sun) | ||
33 | +# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) | ||
34 | /* rawmemchr. */ | ||
35 | test_rawmemchr (); | ||
36 | # endif | ||
37 | -- | ||
38 | 2.13.1 | ||
39 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-monitor.py-regular-expressions-should-use-r.patch b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-monitor.py-regular-expressions-should-use-r.patch new file mode 100644 index 0000000000..80a8e3a10b --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-monitor.py-regular-expressions-should-use-r.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 027b649fdb831868e71be01cafdacc49a5f419ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Wielaard <mark@klomp.org> | ||
3 | Date: Fri, 17 Nov 2023 14:01:21 +0100 | ||
4 | Subject: [PATCH 1/4] valgrind-monitor.py regular expressions should use raw | ||
5 | strings | ||
6 | |||
7 | With python 3.12 gdb will produce the following SyntaxWarning when | ||
8 | loading valgrind-monitor-def.py: | ||
9 | |||
10 | /usr/share/gdb/auto-load/valgrind-monitor-def.py:214: | ||
11 | SyntaxWarning: invalid escape sequence '\[' | ||
12 | if re.fullmatch("^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str): | ||
13 | |||
14 | In a future python version this will become an SyntaxError. | ||
15 | |||
16 | Use a raw strings for the regular expression. | ||
17 | |||
18 | https://bugs.kde.org/show_bug.cgi?id=476708 | ||
19 | (cherry picked from commit 0fbfbe05028ad18efda786a256a2738d2c231ed4) | ||
20 | |||
21 | Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=027b649fdb831868e71be01cafdacc49a5f419ab] | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | NEWS | 13 +++++++++++++ | ||
25 | coregrind/m_gdbserver/valgrind-monitor-def.py | 2 +- | ||
26 | 2 files changed, 14 insertions(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/NEWS b/NEWS | ||
29 | index f11da4be8..ee5b4ff11 100644 | ||
30 | --- a/NEWS | ||
31 | +++ b/NEWS | ||
32 | @@ -1,3 +1,16 @@ | ||
33 | +Branch 3.22 | ||
34 | +~~~~~~~~~~~ | ||
35 | + | ||
36 | +* ==================== FIXED BUGS ==================== | ||
37 | + | ||
38 | +The following bugs have been fixed or resolved on this branch. | ||
39 | + | ||
40 | +476708 valgrind-monitor.py regular expressions should use raw strings | ||
41 | + | ||
42 | +To see details of a given bug, visit | ||
43 | + https://bugs.kde.org/show_bug.cgi?id=XXXXXX | ||
44 | +where XXXXXX is the bug number as listed above. | ||
45 | + | ||
46 | Release 3.22.0 (31 Oct 2023) | ||
47 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
48 | |||
49 | diff --git a/coregrind/m_gdbserver/valgrind-monitor-def.py b/coregrind/m_gdbserver/valgrind-monitor-def.py | ||
50 | index b4e7b992d..d74b1590c 100644 | ||
51 | --- a/coregrind/m_gdbserver/valgrind-monitor-def.py | ||
52 | +++ b/coregrind/m_gdbserver/valgrind-monitor-def.py | ||
53 | @@ -211,7 +211,7 @@ class Valgrind_ADDR_LEN_opt(Valgrind_Command): | ||
54 | For compatibility reason with the Valgrind gdbserver monitor command, | ||
55 | we detect and accept usages such as 0x1234ABCD[10].""" | ||
56 | def invoke(self, arg_str : str, from_tty : bool) -> None: | ||
57 | - if re.fullmatch("^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str): | ||
58 | + if re.fullmatch(r"^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str): | ||
59 | arg_str = arg_str.replace("[", " ") | ||
60 | arg_str = arg_str.replace("]", " ") | ||
61 | eval_execute_2(self, arg_str, | ||
62 | -- | ||
63 | 2.44.0 | ||
64 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-Bug-476548-valgrind-3.22.0-fails-on-assertion-when-l.patch b/meta/recipes-devtools/valgrind/valgrind/0002-Bug-476548-valgrind-3.22.0-fails-on-assertion-when-l.patch new file mode 100644 index 0000000000..5759fa039a --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0002-Bug-476548-valgrind-3.22.0-fails-on-assertion-when-l.patch | |||
@@ -0,0 +1,147 @@ | |||
1 | From 1d00e5ce0fb069911c4b525ec38289fb5d9021b0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Floyd <pjfloyd@wanadoo.fr> | ||
3 | Date: Sat, 18 Nov 2023 08:49:34 +0100 | ||
4 | Subject: [PATCH 2/4] Bug 476548 - valgrind 3.22.0 fails on assertion when | ||
5 | loading debuginfo file produced by mold | ||
6 | |||
7 | (cherry picked from commit 9ea4ae66707a4dcc6f4328e11911652e4418c585) | ||
8 | |||
9 | Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=1d00e5ce0fb069911c4b525ec38289fb5d9021b0] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | NEWS | 2 ++ | ||
13 | coregrind/m_debuginfo/image.c | 14 +++++++++ | ||
14 | coregrind/m_debuginfo/priv_image.h | 4 +++ | ||
15 | coregrind/m_debuginfo/readelf.c | 49 ++++++++++++++++++++++++++++-- | ||
16 | 4 files changed, 66 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/NEWS b/NEWS | ||
19 | index ee5b4ff11..6cd13429a 100644 | ||
20 | --- a/NEWS | ||
21 | +++ b/NEWS | ||
22 | @@ -5,6 +5,8 @@ Branch 3.22 | ||
23 | |||
24 | The following bugs have been fixed or resolved on this branch. | ||
25 | |||
26 | +476548 valgrind 3.22.0 fails on assertion when loading debuginfo | ||
27 | + file produced by mold | ||
28 | 476708 valgrind-monitor.py regular expressions should use raw strings | ||
29 | |||
30 | To see details of a given bug, visit | ||
31 | diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c | ||
32 | index 02e509071..445f95555 100644 | ||
33 | --- a/coregrind/m_debuginfo/image.c | ||
34 | +++ b/coregrind/m_debuginfo/image.c | ||
35 | @@ -1221,6 +1221,20 @@ Int ML_(img_strcmp_c)(DiImage* img, DiOffT off1, const HChar* str2) | ||
36 | } | ||
37 | } | ||
38 | |||
39 | +Int ML_(img_strcmp_n)(DiImage* img, DiOffT off1, const HChar* str2, Word n) | ||
40 | +{ | ||
41 | + ensure_valid(img, off1, 1, "ML_(img_strcmp_c)"); | ||
42 | + while (n) { | ||
43 | + UChar c1 = get(img, off1); | ||
44 | + UChar c2 = *(const UChar*)str2; | ||
45 | + if (c1 < c2) return -1; | ||
46 | + if (c1 > c2) return 1; | ||
47 | + if (c1 == 0) return 0; | ||
48 | + off1++; str2++; --n; | ||
49 | + } | ||
50 | + return 0; | ||
51 | +} | ||
52 | + | ||
53 | UChar ML_(img_get_UChar)(DiImage* img, DiOffT offset) | ||
54 | { | ||
55 | ensure_valid(img, offset, 1, "ML_(img_get_UChar)"); | ||
56 | diff --git a/coregrind/m_debuginfo/priv_image.h b/coregrind/m_debuginfo/priv_image.h | ||
57 | index a49846f14..c91e49f01 100644 | ||
58 | --- a/coregrind/m_debuginfo/priv_image.h | ||
59 | +++ b/coregrind/m_debuginfo/priv_image.h | ||
60 | @@ -115,6 +115,10 @@ Int ML_(img_strcmp)(DiImage* img, DiOffT off1, DiOffT off2); | ||
61 | cast to HChar before comparison. */ | ||
62 | Int ML_(img_strcmp_c)(DiImage* img, DiOffT off1, const HChar* str2); | ||
63 | |||
64 | +/* Do strncmp of a C string in the image vs a normal one. Chars are | ||
65 | + cast to HChar before comparison. */ | ||
66 | +Int ML_(img_strcmp_n)(DiImage* img, DiOffT off1, const HChar* str2, Word n); | ||
67 | + | ||
68 | /* Do strlen of a C string in the image. */ | ||
69 | SizeT ML_(img_strlen)(DiImage* img, DiOffT off); | ||
70 | |||
71 | diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c | ||
72 | index fb64ed976..46f8c8343 100644 | ||
73 | --- a/coregrind/m_debuginfo/readelf.c | ||
74 | +++ b/coregrind/m_debuginfo/readelf.c | ||
75 | @@ -2501,8 +2501,7 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di ) | ||
76 | di->rodata_avma += inrw1->bias; | ||
77 | di->rodata_bias = inrw1->bias; | ||
78 | di->rodata_debug_bias = inrw1->bias; | ||
79 | - } | ||
80 | - else { | ||
81 | + } else { | ||
82 | BAD(".rodata"); /* should not happen? */ | ||
83 | } | ||
84 | di->rodata_present = True; | ||
85 | @@ -2977,6 +2976,46 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di ) | ||
86 | return retval; | ||
87 | } | ||
88 | |||
89 | +static void find_rodata(Word i, Word shnum, DiImage* dimg, struct _DebugInfo* di, DiOffT shdr_dioff, | ||
90 | + UWord shdr_dent_szB, DiOffT shdr_strtab_dioff, PtrdiffT rw_dbias) | ||
91 | +{ | ||
92 | + ElfXX_Shdr a_shdr; | ||
93 | + ElfXX_Shdr a_extra_shdr; | ||
94 | + ML_(img_get)(&a_shdr, dimg, | ||
95 | + INDEX_BIS(shdr_dioff, i, shdr_dent_szB), | ||
96 | + sizeof(a_shdr)); | ||
97 | + if (di->rodata_present && | ||
98 | + 0 == ML_(img_strcmp_c)(dimg, shdr_strtab_dioff | ||
99 | + + a_shdr.sh_name, ".rodata")) { | ||
100 | + Word sh_size = a_shdr.sh_size; | ||
101 | + Word j; | ||
102 | + Word next_addr = a_shdr.sh_addr + a_shdr.sh_size; | ||
103 | + for (j = i + 1; j < shnum; ++j) { | ||
104 | + ML_(img_get)(&a_extra_shdr, dimg, | ||
105 | + INDEX_BIS(shdr_dioff, j, shdr_dent_szB), | ||
106 | + sizeof(a_shdr)); | ||
107 | + if (0 == ML_(img_strcmp_n)(dimg, shdr_strtab_dioff | ||
108 | + + a_extra_shdr.sh_name, ".rodata", 7)) { | ||
109 | + if (a_extra_shdr.sh_addr == | ||
110 | + VG_ROUNDUP(next_addr, a_extra_shdr.sh_addralign)) { | ||
111 | + sh_size = VG_ROUNDUP(sh_size, a_extra_shdr.sh_addralign) + a_extra_shdr.sh_size; | ||
112 | + } | ||
113 | + next_addr = a_extra_shdr.sh_addr + a_extra_shdr.sh_size; | ||
114 | + } else { | ||
115 | + break; | ||
116 | + } | ||
117 | + } | ||
118 | + vg_assert(di->rodata_size == sh_size); | ||
119 | + vg_assert(di->rodata_avma + a_shdr.sh_addr + rw_dbias); | ||
120 | + di->rodata_debug_svma = a_shdr.sh_addr; | ||
121 | + di->rodata_debug_bias = di->rodata_bias + | ||
122 | + di->rodata_svma - di->rodata_debug_svma; | ||
123 | + TRACE_SYMTAB("acquiring .rodata debug svma = %#lx .. %#lx\n", | ||
124 | + di->rodata_debug_svma, | ||
125 | + di->rodata_debug_svma + di->rodata_size - 1); | ||
126 | + TRACE_SYMTAB("acquiring .rodata debug bias = %#lx\n", (UWord)di->rodata_debug_bias); | ||
127 | + } | ||
128 | +} | ||
129 | Bool ML_(read_elf_debug) ( struct _DebugInfo* di ) | ||
130 | { | ||
131 | Word i, j; | ||
132 | @@ -3391,7 +3430,11 @@ Bool ML_(read_elf_debug) ( struct _DebugInfo* di ) | ||
133 | FIND(text, rx) | ||
134 | FIND(data, rw) | ||
135 | FIND(sdata, rw) | ||
136 | - FIND(rodata, rw) | ||
137 | + // https://bugs.kde.org/show_bug.cgi?id=476548 | ||
138 | + // special handling for rodata as adjacent | ||
139 | + // rodata sections may have been merged in ML_(read_elf_object) | ||
140 | + //FIND(rodata, rw) | ||
141 | + find_rodata(i, ehdr_dimg.e_shnum, dimg, di, shdr_dioff, shdr_dent_szB, shdr_strtab_dioff, rw_dbias); | ||
142 | FIND(bss, rw) | ||
143 | FIND(sbss, rw) | ||
144 | |||
145 | -- | ||
146 | 2.44.0 | ||
147 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch deleted file mode 100644 index 480fe33247..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From bd4e926e7e14747b3cd4d7b2a1bd5410b22f3ea2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
3 | Date: Tue, 16 Oct 2018 21:27:46 -0400 | ||
4 | Subject: [PATCH] context APIs are not available on musl | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Updated patch for valgrind-3.14 | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
12 | --- | ||
13 | memcheck/tests/linux/stack_changes.c | 7 ++++++- | ||
14 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c | ||
17 | index 7f97b90a5..a26cb4ae6 100644 | ||
18 | --- a/memcheck/tests/linux/stack_changes.c | ||
19 | +++ b/memcheck/tests/linux/stack_changes.c | ||
20 | @@ -10,6 +10,7 @@ | ||
21 | // This test is checking the libc context calls (setcontext, etc.) and | ||
22 | // checks that Valgrind notices their stack changes properly. | ||
23 | |||
24 | +#ifdef __GLIBC__ | ||
25 | typedef ucontext_t mycontext; | ||
26 | |||
27 | mycontext ctx1, ctx2, oldc; | ||
28 | @@ -51,9 +52,11 @@ int init_context(mycontext *uc) | ||
29 | |||
30 | return ret; | ||
31 | } | ||
32 | +#endif | ||
33 | |||
34 | int main(int argc, char **argv) | ||
35 | { | ||
36 | +#ifdef __GLIBC__ | ||
37 | int c1 = init_context(&ctx1); | ||
38 | int c2 = init_context(&ctx2); | ||
39 | |||
40 | @@ -66,6 +69,8 @@ int main(int argc, char **argv) | ||
41 | //free(ctx1.uc_stack.ss_sp); | ||
42 | VALGRIND_STACK_DEREGISTER(c2); | ||
43 | //free(ctx2.uc_stack.ss_sp); | ||
44 | - | ||
45 | +#else | ||
46 | + printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); | ||
47 | +#endif | ||
48 | return 0; | ||
49 | } | ||
50 | -- | ||
51 | 2.17.0 | ||
52 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch deleted file mode 100644 index 5433472291..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 5 Jul 2017 17:36:42 -0700 | ||
4 | Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined | ||
5 | |||
6 | musl does not have __THROW, therefore make it null | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Submitted | ||
11 | |||
12 | memcheck/tests/x86-linux/scalar.h | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h | ||
16 | index ef28b03..52f742e 100644 | ||
17 | --- a/memcheck/tests/x86-linux/scalar.h | ||
18 | +++ b/memcheck/tests/x86-linux/scalar.h | ||
19 | @@ -11,6 +11,10 @@ | ||
20 | #include <sys/types.h> | ||
21 | #include <sys/mman.h> | ||
22 | |||
23 | +#ifndef __THROW | ||
24 | +#define __THROW | ||
25 | +#endif | ||
26 | + | ||
27 | // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to | ||
28 | // declare this ourselves. | ||
29 | extern long int syscall (long int __sysno, ...) __THROW; | ||
30 | -- | ||
31 | 2.13.2 | ||
32 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0003-Add-fchmodat2-syscall-on-linux.patch b/meta/recipes-devtools/valgrind/valgrind/0003-Add-fchmodat2-syscall-on-linux.patch new file mode 100644 index 0000000000..2a09ca52b7 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0003-Add-fchmodat2-syscall-on-linux.patch | |||
@@ -0,0 +1,221 @@ | |||
1 | From a43e62dddcf51ec6578a90c5988a41e856b44b05 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Wielaard <mark@klomp.org> | ||
3 | Date: Sat, 18 Nov 2023 21:17:02 +0100 | ||
4 | Subject: [PATCH 3/4] Add fchmodat2 syscall on linux | ||
5 | |||
6 | fchmodat2 is a new syscall on linux 6.6. It is a variant of fchmodat | ||
7 | that takes an extra flags argument. | ||
8 | |||
9 | https://bugs.kde.org/show_bug.cgi?id=477198 | ||
10 | |||
11 | (cherry picked from commit 372d09fd9a8d76847c81092ebff71c80fd6c145d) | ||
12 | |||
13 | Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=a43e62dddcf51ec6578a90c5988a41e856b44b05] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | NEWS | 1 + | ||
17 | coregrind/m_syswrap/priv_syswrap-linux.h | 3 +++ | ||
18 | coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++ | ||
19 | coregrind/m_syswrap/syswrap-arm-linux.c | 2 ++ | ||
20 | coregrind/m_syswrap/syswrap-arm64-linux.c | 2 ++ | ||
21 | coregrind/m_syswrap/syswrap-linux.c | 11 +++++++++++ | ||
22 | coregrind/m_syswrap/syswrap-mips32-linux.c | 2 ++ | ||
23 | coregrind/m_syswrap/syswrap-mips64-linux.c | 1 + | ||
24 | coregrind/m_syswrap/syswrap-nanomips-linux.c | 1 + | ||
25 | coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++ | ||
26 | coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++ | ||
27 | coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++ | ||
28 | coregrind/m_syswrap/syswrap-x86-linux.c | 2 ++ | ||
29 | include/vki/vki-scnums-shared-linux.h | 2 ++ | ||
30 | 14 files changed, 35 insertions(+) | ||
31 | |||
32 | diff --git a/NEWS b/NEWS | ||
33 | index 6cd13429a..da0f8c1aa 100644 | ||
34 | --- a/NEWS | ||
35 | +++ b/NEWS | ||
36 | @@ -8,6 +8,7 @@ The following bugs have been fixed or resolved on this branch. | ||
37 | 476548 valgrind 3.22.0 fails on assertion when loading debuginfo | ||
38 | file produced by mold | ||
39 | 476708 valgrind-monitor.py regular expressions should use raw strings | ||
40 | +477198 Add fchmodat2 syscall on linux | ||
41 | |||
42 | To see details of a given bug, visit | ||
43 | https://bugs.kde.org/show_bug.cgi?id=XXXXXX | ||
44 | diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h | ||
45 | index 7c9decf5a..798c456c9 100644 | ||
46 | --- a/coregrind/m_syswrap/priv_syswrap-linux.h | ||
47 | +++ b/coregrind/m_syswrap/priv_syswrap-linux.h | ||
48 | @@ -331,6 +331,9 @@ DECL_TEMPLATE(linux, sys_openat2); | ||
49 | // Linux-specific (new in Linux 5.14) | ||
50 | DECL_TEMPLATE(linux, sys_memfd_secret); | ||
51 | |||
52 | +// Since Linux 6.6 | ||
53 | +DECL_TEMPLATE(linux, sys_fchmodat2); | ||
54 | + | ||
55 | /* --------------------------------------------------------------------- | ||
56 | Wrappers for sockets and ipc-ery. These are split into standalone | ||
57 | procedures because x86-linux hides them inside multiplexors | ||
58 | diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c | ||
59 | index 008600798..fe17d118b 100644 | ||
60 | --- a/coregrind/m_syswrap/syswrap-amd64-linux.c | ||
61 | +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c | ||
62 | @@ -886,6 +886,8 @@ static SyscallTableEntry syscall_table[] = { | ||
63 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
64 | |||
65 | LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 | ||
66 | + | ||
67 | + LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 | ||
68 | }; | ||
69 | |||
70 | SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) | ||
71 | diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c | ||
72 | index 9a7a1e0d2..811931d3b 100644 | ||
73 | --- a/coregrind/m_syswrap/syswrap-arm-linux.c | ||
74 | +++ b/coregrind/m_syswrap/syswrap-arm-linux.c | ||
75 | @@ -1059,6 +1059,8 @@ static SyscallTableEntry syscall_main_table[] = { | ||
76 | LINX_(__NR_faccessat2, sys_faccessat2), // 439 | ||
77 | |||
78 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
79 | + | ||
80 | + LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 | ||
81 | }; | ||
82 | |||
83 | |||
84 | diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c | ||
85 | index 6af7bab83..3307bc2ca 100644 | ||
86 | --- a/coregrind/m_syswrap/syswrap-arm64-linux.c | ||
87 | +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c | ||
88 | @@ -840,6 +840,8 @@ static SyscallTableEntry syscall_main_table[] = { | ||
89 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
90 | |||
91 | LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 | ||
92 | + | ||
93 | + LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 | ||
94 | }; | ||
95 | |||
96 | |||
97 | diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c | ||
98 | index d571fc327..efa47f2e6 100644 | ||
99 | --- a/coregrind/m_syswrap/syswrap-linux.c | ||
100 | +++ b/coregrind/m_syswrap/syswrap-linux.c | ||
101 | @@ -6059,6 +6059,17 @@ PRE(sys_fchmodat) | ||
102 | PRE_MEM_RASCIIZ( "fchmodat(path)", ARG2 ); | ||
103 | } | ||
104 | |||
105 | +PRE(sys_fchmodat2) | ||
106 | +{ | ||
107 | + PRINT("sys_fchmodat2 ( %ld, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %" | ||
108 | + FMT_REGWORD "u )", | ||
109 | + SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4); | ||
110 | + PRE_REG_READ4(long, "fchmodat2", | ||
111 | + int, dfd, const char *, path, vki_mode_t, mode, | ||
112 | + unsigned int, flags); | ||
113 | + PRE_MEM_RASCIIZ( "fchmodat2(pathname)", ARG2 ); | ||
114 | +} | ||
115 | + | ||
116 | PRE(sys_faccessat) | ||
117 | { | ||
118 | PRINT("sys_faccessat ( %ld, %#" FMT_REGWORD "x(%s), %ld )", | ||
119 | diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c | ||
120 | index 6268a00dd..74a1f6eac 100644 | ||
121 | --- a/coregrind/m_syswrap/syswrap-mips32-linux.c | ||
122 | +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c | ||
123 | @@ -1143,6 +1143,8 @@ static SyscallTableEntry syscall_main_table[] = { | ||
124 | LINX_ (__NR_faccessat2, sys_faccessat2), // 439 | ||
125 | |||
126 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
127 | + | ||
128 | + LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 | ||
129 | }; | ||
130 | |||
131 | SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno) | ||
132 | diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c | ||
133 | index 6cdf25893..4e8508b7a 100644 | ||
134 | --- a/coregrind/m_syswrap/syswrap-mips64-linux.c | ||
135 | +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c | ||
136 | @@ -820,6 +820,7 @@ static SyscallTableEntry syscall_main_table[] = { | ||
137 | LINXY (__NR_close_range, sys_close_range), | ||
138 | LINX_ (__NR_faccessat2, sys_faccessat2), | ||
139 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), | ||
140 | + LINX_ (__NR_fchmodat2, sys_fchmodat2), | ||
141 | }; | ||
142 | |||
143 | SyscallTableEntry * ML_(get_linux_syscall_entry) ( UInt sysno ) | ||
144 | diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c | ||
145 | index d724cde74..7859900c1 100644 | ||
146 | --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c | ||
147 | +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c | ||
148 | @@ -829,6 +829,7 @@ static SyscallTableEntry syscall_main_table[] = { | ||
149 | LINXY (__NR_close_range, sys_close_range), | ||
150 | LINX_ (__NR_faccessat2, sys_faccessat2), | ||
151 | LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), | ||
152 | + LINX_ (__NR_fchmodat2, sys_fchmodat2), | ||
153 | }; | ||
154 | |||
155 | SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno) | ||
156 | diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c | ||
157 | index c0cfef235..1e19116ee 100644 | ||
158 | --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c | ||
159 | +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c | ||
160 | @@ -1063,6 +1063,8 @@ static SyscallTableEntry syscall_table[] = { | ||
161 | LINX_(__NR_faccessat2, sys_faccessat2), // 439 | ||
162 | |||
163 | LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
164 | + | ||
165 | + LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 | ||
166 | }; | ||
167 | |||
168 | SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) | ||
169 | diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c | ||
170 | index f5976f30c..1097212a4 100644 | ||
171 | --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c | ||
172 | +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c | ||
173 | @@ -1032,6 +1032,8 @@ static SyscallTableEntry syscall_table[] = { | ||
174 | LINX_(__NR_faccessat2, sys_faccessat2), // 439 | ||
175 | |||
176 | LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
177 | + | ||
178 | + LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 | ||
179 | }; | ||
180 | |||
181 | SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) | ||
182 | diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c | ||
183 | index afba154e7..3588672c7 100644 | ||
184 | --- a/coregrind/m_syswrap/syswrap-s390x-linux.c | ||
185 | +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c | ||
186 | @@ -873,6 +873,8 @@ static SyscallTableEntry syscall_table[] = { | ||
187 | LINX_(__NR_faccessat2, sys_faccessat2), // 439 | ||
188 | |||
189 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
190 | + | ||
191 | + LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 | ||
192 | }; | ||
193 | |||
194 | SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) | ||
195 | diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c | ||
196 | index da4fd8fa2..58badc6b0 100644 | ||
197 | --- a/coregrind/m_syswrap/syswrap-x86-linux.c | ||
198 | +++ b/coregrind/m_syswrap/syswrap-x86-linux.c | ||
199 | @@ -1658,6 +1658,8 @@ static SyscallTableEntry syscall_table[] = { | ||
200 | LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 | ||
201 | |||
202 | LINXY(__NR_memfd_secret, sys_memfd_secret), // 447 | ||
203 | + | ||
204 | + LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 | ||
205 | }; | ||
206 | |||
207 | SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno ) | ||
208 | diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h | ||
209 | index 542382b53..a4cd87149 100644 | ||
210 | --- a/include/vki/vki-scnums-shared-linux.h | ||
211 | +++ b/include/vki/vki-scnums-shared-linux.h | ||
212 | @@ -50,4 +50,6 @@ | ||
213 | |||
214 | #define __NR_memfd_secret 447 | ||
215 | |||
216 | +#define __NR_fchmodat2 452 | ||
217 | + | ||
218 | #endif | ||
219 | -- | ||
220 | 2.44.0 | ||
221 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch deleted file mode 100644 index fa1344c853..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 5 Jul 2017 17:37:56 -0700 | ||
4 | Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall() | ||
5 | |||
6 | __modify_ldt() is specific to glibc, replacing it with syscall() | ||
7 | makes it more portable. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Submitted | ||
12 | |||
13 | none/tests/x86-linux/seg_override.c | 15 ++++++--------- | ||
14 | 1 file changed, 6 insertions(+), 9 deletions(-) | ||
15 | |||
16 | diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c | ||
17 | index b7619c9..c89874b 100644 | ||
18 | --- a/none/tests/x86-linux/seg_override.c | ||
19 | +++ b/none/tests/x86-linux/seg_override.c | ||
20 | @@ -2,6 +2,8 @@ | ||
21 | #include <stdio.h> | ||
22 | #include <errno.h> | ||
23 | #include <string.h> | ||
24 | +#include <unistd.h> | ||
25 | +#include <syscall.h> | ||
26 | |||
27 | /* Stuff from Wine. */ | ||
28 | |||
29 | @@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) | ||
30 | /* our copy of the ldt */ | ||
31 | LDT_ENTRY ldt_copy[8192]; | ||
32 | |||
33 | -/* System call to set LDT entry. */ | ||
34 | -//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); | ||
35 | -extern int __modify_ldt (int, void *, size_t); | ||
36 | - | ||
37 | void print_ldt ( void ) | ||
38 | { | ||
39 | int res; | ||
40 | - res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); | ||
41 | + /* System call to set LDT entry. */ | ||
42 | + res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); | ||
43 | printf("got %d bytes\n", res ); | ||
44 | perror("error is"); | ||
45 | } | ||
46 | @@ -83,9 +82,6 @@ struct modify_ldt_ldt_s | ||
47 | unsigned int empty:25; | ||
48 | }; | ||
49 | |||
50 | -/* System call to set LDT entry. */ | ||
51 | -//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); | ||
52 | - | ||
53 | void set_ldt1 ( void* base ) | ||
54 | { | ||
55 | int stat; | ||
56 | @@ -102,7 +98,8 @@ void set_ldt1 ( void* base ) | ||
57 | ldt_entry.read_exec_only = 0; | ||
58 | ldt_entry.limit_in_pages = 0; | ||
59 | ldt_entry.seg_not_present = 0; | ||
60 | - stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); | ||
61 | + /* System call to set LDT entry. */ | ||
62 | + stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry)); | ||
63 | printf("stat = %d\n", stat); | ||
64 | } | ||
65 | |||
66 | -- | ||
67 | 2.13.2 | ||
68 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0004-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch b/meta/recipes-devtools/valgrind/valgrind/0004-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch new file mode 100644 index 0000000000..4e9185508a --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0004-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch | |||
@@ -0,0 +1,137 @@ | |||
1 | From 41ff9aa49f6c54c66d0e6b37f265fd9cb0176057 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Floyd <pjfloyd@wanadoo.fr> | ||
3 | Date: Sun, 17 Dec 2023 14:18:51 +0100 | ||
4 | Subject: [PATCH 4/4] Bug 478624 - Valgrind incompatibility with binutils-2.42 | ||
5 | on x86 with new nop patterns (unhandled instruction bytes: 0x2E 0x8D 0xB4 | ||
6 | 0x26) | ||
7 | |||
8 | It was a bit of a struggle to get the testcase to build | ||
9 | with both clang and gcc (oddly enough gcc was more difficult) so | ||
10 | I just resorted to using .byte arrays. | ||
11 | |||
12 | (cherry picked from commit d35005cef8ad8207542738812705ceabf137d7e0) | ||
13 | |||
14 | Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=41ff9aa49f6c54c66d0e6b37f265fd9cb0176057] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | .gitignore | 1 + | ||
18 | NEWS | 2 ++ | ||
19 | VEX/priv/guest_x86_toIR.c | 22 +++++++++++++- | ||
20 | none/tests/x86/Makefile.am | 2 ++ | ||
21 | none/tests/x86/gnu_binutils_nop.c | 34 ++++++++++++++++++++++ | ||
22 | none/tests/x86/gnu_binutils_nop.stderr.exp | 0 | ||
23 | none/tests/x86/gnu_binutils_nop.vgtest | 2 ++ | ||
24 | 7 files changed, 62 insertions(+), 1 deletion(-) | ||
25 | create mode 100644 none/tests/x86/gnu_binutils_nop.c | ||
26 | create mode 100644 none/tests/x86/gnu_binutils_nop.stderr.exp | ||
27 | create mode 100644 none/tests/x86/gnu_binutils_nop.vgtest | ||
28 | |||
29 | --- a/NEWS | ||
30 | +++ b/NEWS | ||
31 | @@ -9,6 +9,8 @@ The following bugs have been fixed or re | ||
32 | file produced by mold | ||
33 | 476708 valgrind-monitor.py regular expressions should use raw strings | ||
34 | 477198 Add fchmodat2 syscall on linux | ||
35 | +478624 Valgrind incompatibility with binutils-2.42 on x86 with new nop patterns | ||
36 | + (unhandled instruction bytes: 0x2E 0x8D 0xB4 0x26) | ||
37 | |||
38 | To see details of a given bug, visit | ||
39 | https://bugs.kde.org/show_bug.cgi?id=XXXXXX | ||
40 | --- a/VEX/priv/guest_x86_toIR.c | ||
41 | +++ b/VEX/priv/guest_x86_toIR.c | ||
42 | @@ -8198,7 +8198,7 @@ DisResult disInstr_X86_WRK ( | ||
43 | delta += 5; | ||
44 | goto decode_success; | ||
45 | } | ||
46 | - /* Don't barf on recent binutils padding, | ||
47 | + /* Don't barf on recent (2010) binutils padding, | ||
48 | all variants of which are: nopw %cs:0x0(%eax,%eax,1) | ||
49 | 66 2e 0f 1f 84 00 00 00 00 00 | ||
50 | 66 66 2e 0f 1f 84 00 00 00 00 00 | ||
51 | @@ -8222,6 +8222,26 @@ DisResult disInstr_X86_WRK ( | ||
52 | goto decode_success; | ||
53 | } | ||
54 | } | ||
55 | + | ||
56 | + /* bug478624 GNU binutils uses a leal of esi into itself with | ||
57 | + a zero offset and CS prefix as an 8 byte no-op (Dec 2023). | ||
58 | + Since the CS prefix is hardly ever used we don't do much | ||
59 | + to decode it, just a few cases for conditional branches. | ||
60 | + So add handling here with other pseudo-no-ops. | ||
61 | + */ | ||
62 | + if (code[0] == 0x2E && code[1] == 0x8D) { | ||
63 | + if (code[2] == 0x74 && code[3] == 0x26 && code[4] == 0x00) { | ||
64 | + DIP("leal %%cs:0(%%esi,%%eiz,1),%%esi\n"); | ||
65 | + delta += 5; | ||
66 | + goto decode_success; | ||
67 | + } | ||
68 | + if (code[2] == 0xB4 && code[3] == 0x26 && code[4] == 0x00 | ||
69 | + && code[5] == 0x00 && code[6] == 0x00 && code[7] == 0x00) { | ||
70 | + DIP("leal %%cs:0(%%esi,%%eiz,1),%%esi\n"); | ||
71 | + delta += 8; | ||
72 | + goto decode_success; | ||
73 | + } | ||
74 | + } | ||
75 | |||
76 | // Intel CET requires the following opcodes to be treated as NOPs | ||
77 | // with any prefix and ModRM, SIB and disp combination: | ||
78 | --- a/none/tests/x86/Makefile.am | ||
79 | +++ b/none/tests/x86/Makefile.am | ||
80 | @@ -52,6 +52,7 @@ EXTRA_DIST = \ | ||
81 | fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \ | ||
82 | fxtract.stdout.exp-older-glibc \ | ||
83 | getseg.stdout.exp getseg.stderr.exp getseg.vgtest \ | ||
84 | + gnu_binutils_nop.stderr.exp gnu_binutils_nop.vgtest \ | ||
85 | incdec_alt.stdout.exp incdec_alt.stderr.exp incdec_alt.vgtest \ | ||
86 | int.stderr.exp int.stdout.exp int.disabled \ | ||
87 | $(addsuffix .stderr.exp,$(INSN_TESTS)) \ | ||
88 | @@ -100,6 +101,7 @@ check_PROGRAMS = \ | ||
89 | fpu_lazy_eflags \ | ||
90 | fxtract \ | ||
91 | getseg \ | ||
92 | + gnu_binutils_nop \ | ||
93 | incdec_alt \ | ||
94 | $(INSN_TESTS) \ | ||
95 | int \ | ||
96 | --- /dev/null | ||
97 | +++ b/none/tests/x86/gnu_binutils_nop.c | ||
98 | @@ -0,0 +1,34 @@ | ||
99 | +int main(void) | ||
100 | +{ | ||
101 | + // GNU binutils uses various opcodes as alternatives for nop | ||
102 | + // the idea is that it is faster to execute one large opcode | ||
103 | + // with no side-effects than multiple repetitions of the | ||
104 | + // single byte 'nop'. This gives more choice when code | ||
105 | + // needs to be padded. | ||
106 | + | ||
107 | + // the following is based on | ||
108 | + // https://sourceware.org/cgit/binutils-gdb/tree/gas/config/tc-i386.c#n1256 | ||
109 | + | ||
110 | + // one byte | ||
111 | + __asm__ __volatile__("nop"); | ||
112 | + // two bytes | ||
113 | + __asm__ __volatile__("xchg %ax,%ax"); | ||
114 | + // three bytes | ||
115 | + //__asm__ __volatile__("leal 0(%esi),%esi"); | ||
116 | + __asm__ __volatile__(".byte 0x8d,0x76,0x00"); | ||
117 | + // four bytes | ||
118 | + //__asm__ __volatile__("leal 0(%esi,%eiz),%esi"); | ||
119 | + __asm__ __volatile__(".byte 0x8d,0x74,0x26,0x00"); | ||
120 | + // five bytes | ||
121 | + //__asm__ __volatile__("leal %cs:0(%esi,%eiz),%esi"); | ||
122 | + __asm__ __volatile__(".byte 0x2e,0x8d,0x74,0x26,0x00"); | ||
123 | + // six bytes | ||
124 | + //__asm__ __volatile__("leal 0L(%esi),%esi"); | ||
125 | + __asm__ __volatile__(".byte 0x8d,0xb6,0x00,0x00,0x00,0x00"); | ||
126 | + // seven bytes | ||
127 | + //__asm__ __volatile__("leal 0L(%esi,%eiz),%esi"); | ||
128 | + __asm__ __volatile__(".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00"); | ||
129 | + // eight bytes | ||
130 | + //__asm__ __volatile__("leal %cs:0L(%esi,%eiz),%esi"); | ||
131 | + __asm__ __volatile__(".byte 0x2e,0x8d,0xb4,0x26,0x00,0x00,0x00,0x00"); | ||
132 | +} | ||
133 | --- /dev/null | ||
134 | +++ b/none/tests/x86/gnu_binutils_nop.vgtest | ||
135 | @@ -0,0 +1,2 @@ | ||
136 | +prog: gnu_binutils_nop | ||
137 | +vgopts: -q | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch deleted file mode 100644 index 4570f63995..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch +++ /dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | From 8f916dcb395fe5a2429f2867ba4daf8ef3af073a Mon Sep 17 00:00:00 2001 | ||
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
3 | Date: Tue, 16 Oct 2018 21:01:04 -0400 | ||
4 | Subject: [PATCH] Fix out of tree builds. | ||
5 | |||
6 | The paths to these files need to be fully specified in | ||
7 | the out of tree build case. glibc-2.X.supp is a generated file so the | ||
8 | full path | ||
9 | is deliberately not specified in that case. | ||
10 | |||
11 | RP 2013/03/23 | ||
12 | |||
13 | Patch refreshed for valgrind-3.14.0. | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
18 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
19 | --- | ||
20 | configure.ac | 66 ++++++++++++++++++++++++++-------------------------- | ||
21 | 1 file changed, 33 insertions(+), 33 deletions(-) | ||
22 | |||
23 | diff --git a/configure.ac b/configure.ac | ||
24 | index 524230d..54861c5 100755 | ||
25 | --- a/configure.ac | ||
26 | +++ b/configure.ac | ||
27 | @@ -396,50 +396,50 @@ case "${host_os}" in | ||
28 | 9.*) | ||
29 | AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) | ||
30 | AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) | ||
31 | - DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" | ||
32 | - DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" | ||
33 | + DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" | ||
34 | + DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" | ||
35 | ;; | ||
36 | 10.*) | ||
37 | AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) | ||
38 | AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version]) | ||
39 | - DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}" | ||
40 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
41 | + DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" | ||
42 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
43 | ;; | ||
44 | 11.*) | ||
45 | AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) | ||
46 | AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version]) | ||
47 | - DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}" | ||
48 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
49 | + DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" | ||
50 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
51 | ;; | ||
52 | 12.*) | ||
53 | AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) | ||
54 | AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version]) | ||
55 | - DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}" | ||
56 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
57 | + DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" | ||
58 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
59 | ;; | ||
60 | 13.*) | ||
61 | AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks]) | ||
62 | AC_DEFINE([DARWIN_VERS], DARWIN_10_9, [Darwin / Mac OS X version]) | ||
63 | - DEFAULT_SUPP="darwin13.supp ${DEFAULT_SUPP}" | ||
64 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
65 | + DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" | ||
66 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
67 | ;; | ||
68 | 14.*) | ||
69 | AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite]) | ||
70 | AC_DEFINE([DARWIN_VERS], DARWIN_10_10, [Darwin / Mac OS X version]) | ||
71 | - DEFAULT_SUPP="darwin14.supp ${DEFAULT_SUPP}" | ||
72 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
73 | + DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" | ||
74 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
75 | ;; | ||
76 | 15.*) | ||
77 | AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan]) | ||
78 | AC_DEFINE([DARWIN_VERS], DARWIN_10_11, [Darwin / Mac OS X version]) | ||
79 | - DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}" | ||
80 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
81 | + DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" | ||
82 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
83 | ;; | ||
84 | 16.*) | ||
85 | AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) | ||
86 | AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version]) | ||
87 | - DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}" | ||
88 | - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" | ||
89 | + DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" | ||
90 | + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" | ||
91 | ;; | ||
92 | 17.*) | ||
93 | AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) | ||
94 | @@ -464,7 +464,7 @@ case "${host_os}" in | ||
95 | DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" | ||
96 | ;; | ||
97 | *) | ||
98 | - DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}" | ||
99 | + DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}" | ||
100 | ;; | ||
101 | esac | ||
102 | ;; | ||
103 | @@ -472,7 +472,7 @@ case "${host_os}" in | ||
104 | solaris2.12*) | ||
105 | AC_MSG_RESULT([ok (${host_os})]) | ||
106 | VGCONF_OS="solaris" | ||
107 | - DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" | ||
108 | + DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}" | ||
109 | ;; | ||
110 | |||
111 | *) | ||
112 | @@ -1095,29 +1095,29 @@ AC_MSG_CHECKING([the glibc version]) | ||
113 | case "${GLIBC_VERSION}" in | ||
114 | 2.2) | ||
115 | AC_MSG_RESULT(${GLIBC_VERSION} family) | ||
116 | - DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}" | ||
117 | - DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" | ||
118 | - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
119 | + DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}" | ||
120 | + DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" | ||
121 | + DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
122 | ;; | ||
123 | 2.[[3-6]]) | ||
124 | AC_MSG_RESULT(${GLIBC_VERSION} family) | ||
125 | - DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" | ||
126 | - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
127 | - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
128 | + DEFAULT_SUPP="$srcdir/glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" | ||
129 | + DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
130 | + DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
131 | ;; | ||
132 | 2.[[7-9]]) | ||
133 | AC_MSG_RESULT(${GLIBC_VERSION} family) | ||
134 | DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" | ||
135 | - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
136 | - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
137 | + DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
138 | + DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
139 | ;; | ||
140 | 2.10|2.11) | ||
141 | AC_MSG_RESULT(${GLIBC_VERSION} family) | ||
142 | AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1, | ||
143 | [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)]) | ||
144 | DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" | ||
145 | - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
146 | - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
147 | + DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
148 | + DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
149 | ;; | ||
150 | 2.*) | ||
151 | AC_MSG_RESULT(${GLIBC_VERSION} family) | ||
152 | @@ -1126,8 +1126,8 @@ case "${GLIBC_VERSION}" in | ||
153 | AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1, | ||
154 | [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)]) | ||
155 | DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" | ||
156 | - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
157 | - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
158 | + DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
159 | + DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
160 | ;; | ||
161 | darwin) | ||
162 | AC_MSG_RESULT(Darwin) | ||
163 | @@ -1137,7 +1137,7 @@ case "${GLIBC_VERSION}" in | ||
164 | bionic) | ||
165 | AC_MSG_RESULT(Bionic) | ||
166 | AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) | ||
167 | - DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}" | ||
168 | + DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}" | ||
169 | ;; | ||
170 | solaris) | ||
171 | AC_MSG_RESULT(Solaris) | ||
172 | @@ -1164,8 +1164,8 @@ if test "$VGCONF_OS" != "solaris"; then | ||
173 | # attempt to detect whether such libraries are installed on the | ||
174 | # build machine (or even if any X facilities are present); just | ||
175 | # add the suppressions antidisirregardless. | ||
176 | - DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}" | ||
177 | - DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}" | ||
178 | + DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}" | ||
179 | + DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}" | ||
180 | fi | ||
181 | |||
182 | |||
183 | -- | ||
184 | 2.17.1 | ||
185 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch index 0c399ef52c..fea3b00f62 100644 --- a/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001 | 1 | From e244a72c6f8803550f37e81f72bbae039651013b Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Tue, 15 Dec 2015 15:50:44 +0200 | 3 | Date: Tue, 15 Dec 2015 15:50:44 +0200 |
4 | Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats | 4 | Subject: [PATCH] Modify vg_test wrapper to support PTEST formats |
5 | 5 | ||
6 | Change the valgrind regression test script vg_regtest to | 6 | Change the valgrind regression test script vg_regtest to |
7 | support the yocto ptest stdout reporting format. The commit adds | 7 | support the yocto ptest stdout reporting format. The commit adds |
@@ -14,7 +14,7 @@ option, --yocto-ptest, the valgrind regression test output is unchanged. | |||
14 | Enforce 30 seconds limit for the test. | 14 | Enforce 30 seconds limit for the test. |
15 | This resume execution of the remaining tests when valgrind hangs. | 15 | This resume execution of the remaining tests when valgrind hangs. |
16 | 16 | ||
17 | Upstream-Status: Pending | 17 | Upstream-Status: Inappropriate [oe-core specific] |
18 | 18 | ||
19 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> | 19 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> |
20 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | 20 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> |
@@ -25,11 +25,11 @@ Increase time limit to 90 s. | |||
25 | 25 | ||
26 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | 26 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> |
27 | --- | 27 | --- |
28 | tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++-------------- | 28 | tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++------------ |
29 | 1 file changed, 55 insertions(+), 20 deletions(-) | 29 | 1 file changed, 55 insertions(+), 20 deletions(-) |
30 | 30 | ||
31 | diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in | 31 | diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in |
32 | index a441f42..cb05b52 100755 | 32 | index ad18800..e4bd8cb 100755 |
33 | --- a/tests/vg_regtest.in | 33 | --- a/tests/vg_regtest.in |
34 | +++ b/tests/vg_regtest.in | 34 | +++ b/tests/vg_regtest.in |
35 | @@ -47,6 +47,7 @@ | 35 | @@ -47,6 +47,7 @@ |
@@ -49,7 +49,7 @@ index a441f42..cb05b52 100755 | |||
49 | . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n" | 49 | . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n" |
50 | . "\n"; | 50 | . "\n"; |
51 | 51 | ||
52 | @@ -186,6 +187,7 @@ my $outer_args; | 52 | @@ -187,6 +188,7 @@ my $run_outer_args = ""; |
53 | my $valgrind_lib = "$tests_dir/.in_place"; | 53 | my $valgrind_lib = "$tests_dir/.in_place"; |
54 | my $keepunfiltered = 0; | 54 | my $keepunfiltered = 0; |
55 | my $looptillfail = 0; | 55 | my $looptillfail = 0; |
@@ -57,7 +57,7 @@ index a441f42..cb05b52 100755 | |||
57 | 57 | ||
58 | # default filter is the one named "filter_stderr" in the test's directory | 58 | # default filter is the one named "filter_stderr" in the test's directory |
59 | my $default_stderr_filter = "filter_stderr"; | 59 | my $default_stderr_filter = "filter_stderr"; |
60 | @@ -244,6 +246,8 @@ sub process_command_line() | 60 | @@ -245,6 +247,8 @@ sub process_command_line() |
61 | $keepunfiltered = 1; | 61 | $keepunfiltered = 1; |
62 | } elsif ($arg =~ /^--loop-till-fail$/) { | 62 | } elsif ($arg =~ /^--loop-till-fail$/) { |
63 | $looptillfail = 1; | 63 | $looptillfail = 1; |
@@ -66,7 +66,7 @@ index a441f42..cb05b52 100755 | |||
66 | } else { | 66 | } else { |
67 | die $usage; | 67 | die $usage; |
68 | } | 68 | } |
69 | @@ -365,13 +369,28 @@ sub read_vgtest_file($) | 69 | @@ -376,13 +380,28 @@ sub read_vgtest_file($) |
70 | #---------------------------------------------------------------------------- | 70 | #---------------------------------------------------------------------------- |
71 | # Since most of the program time is spent in system() calls, need this to | 71 | # Since most of the program time is spent in system() calls, need this to |
72 | # propagate a Ctrl-C enabling us to quit. | 72 | # propagate a Ctrl-C enabling us to quit. |
@@ -100,7 +100,7 @@ index a441f42..cb05b52 100755 | |||
100 | # if $keepunfiltered, copies $1 to $1.unfiltered.out | 100 | # if $keepunfiltered, copies $1 to $1.unfiltered.out |
101 | # renames $0 tp $1 | 101 | # renames $0 tp $1 |
102 | sub filtered_rename($$) | 102 | sub filtered_rename($$) |
103 | @@ -419,23 +438,25 @@ sub do_diffs($$$$) | 103 | @@ -430,23 +449,25 @@ sub do_diffs($$$$) |
104 | # A match; remove .out and any previously created .diff files. | 104 | # A match; remove .out and any previously created .diff files. |
105 | unlink("$name.$mid.out"); | 105 | unlink("$name.$mid.out"); |
106 | unlink(<$name.$mid.diff*>); | 106 | unlink(<$name.$mid.diff*>); |
@@ -128,7 +128,7 @@ index a441f42..cb05b52 100755 | |||
128 | $vgtest =~ /^(.*)\.vgtest/; | 128 | $vgtest =~ /^(.*)\.vgtest/; |
129 | my $name = $1; | 129 | my $name = $1; |
130 | my $fullname = "$dir/$name"; | 130 | my $fullname = "$dir/$name"; |
131 | @@ -454,7 +475,11 @@ sub do_one_test($$) | 131 | @@ -465,7 +486,11 @@ sub do_one_test($$) |
132 | } elsif (256 == $prereq_res) { | 132 | } elsif (256 == $prereq_res) { |
133 | # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256... | 133 | # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256... |
134 | # Prereq failed, skip. | 134 | # Prereq failed, skip. |
@@ -141,7 +141,7 @@ index a441f42..cb05b52 100755 | |||
141 | return; | 141 | return; |
142 | } else { | 142 | } else { |
143 | # Bad prereq; abort. | 143 | # Bad prereq; abort. |
144 | @@ -472,7 +497,7 @@ sub do_one_test($$) | 144 | @@ -483,7 +508,7 @@ sub do_one_test($$) |
145 | } | 145 | } |
146 | # If there is a progB, let's start it in background: | 146 | # If there is a progB, let's start it in background: |
147 | printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n", | 147 | printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n", |
@@ -150,7 +150,7 @@ index a441f42..cb05b52 100755 | |||
150 | # progB.done used to detect child has finished. See below. | 150 | # progB.done used to detect child has finished. See below. |
151 | # Note: redirection of stdout and stderr is before $progB to allow argsB | 151 | # Note: redirection of stdout and stderr is before $progB to allow argsB |
152 | # to e.g. redirect stdoutB to stderrB | 152 | # to e.g. redirect stdoutB to stderrB |
153 | @@ -488,7 +513,8 @@ sub do_one_test($$) | 153 | @@ -499,7 +524,8 @@ sub do_one_test($$) |
154 | . "touch progB.done) &"); | 154 | . "touch progB.done) &"); |
155 | } | 155 | } |
156 | } else { | 156 | } else { |
@@ -160,7 +160,7 @@ index a441f42..cb05b52 100755 | |||
160 | } | 160 | } |
161 | 161 | ||
162 | # Collect environment variables, if any. | 162 | # Collect environment variables, if any. |
163 | @@ -529,7 +555,7 @@ sub do_one_test($$) | 163 | @@ -540,7 +566,7 @@ sub do_one_test($$) |
164 | # Find all the .stdout.exp files. If none, use /dev/null. | 164 | # Find all the .stdout.exp files. If none, use /dev/null. |
165 | my @stdout_exps = <$name.stdout.exp*>; | 165 | my @stdout_exps = <$name.stdout.exp*>; |
166 | @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps); | 166 | @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps); |
@@ -169,7 +169,7 @@ index a441f42..cb05b52 100755 | |||
169 | 169 | ||
170 | # Filter stderr | 170 | # Filter stderr |
171 | $stderr_filter_args = $name if (! defined $stderr_filter_args); | 171 | $stderr_filter_args = $name if (! defined $stderr_filter_args); |
172 | @@ -538,7 +564,7 @@ sub do_one_test($$) | 172 | @@ -549,7 +575,7 @@ sub do_one_test($$) |
173 | # Find all the .stderr.exp files. At least one must exist. | 173 | # Find all the .stderr.exp files. At least one must exist. |
174 | my @stderr_exps = <$name.stderr.exp*>; | 174 | my @stderr_exps = <$name.stderr.exp*>; |
175 | (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n"; | 175 | (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n"; |
@@ -178,7 +178,7 @@ index a441f42..cb05b52 100755 | |||
178 | 178 | ||
179 | if (defined $progB) { | 179 | if (defined $progB) { |
180 | # wait for the child to be finished | 180 | # wait for the child to be finished |
181 | @@ -562,7 +588,7 @@ sub do_one_test($$) | 181 | @@ -573,7 +599,7 @@ sub do_one_test($$) |
182 | # Find all the .stdoutB.exp files. If none, use /dev/null. | 182 | # Find all the .stdoutB.exp files. If none, use /dev/null. |
183 | my @stdoutB_exps = <$name.stdoutB.exp*>; | 183 | my @stdoutB_exps = <$name.stdoutB.exp*>; |
184 | @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps); | 184 | @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps); |
@@ -187,7 +187,7 @@ index a441f42..cb05b52 100755 | |||
187 | 187 | ||
188 | # Filter stderr | 188 | # Filter stderr |
189 | $stderrB_filter_args = $name if (! defined $stderrB_filter_args); | 189 | $stderrB_filter_args = $name if (! defined $stderrB_filter_args); |
190 | @@ -571,7 +597,7 @@ sub do_one_test($$) | 190 | @@ -582,7 +608,7 @@ sub do_one_test($$) |
191 | # Find all the .stderrB.exp files. At least one must exist. | 191 | # Find all the .stderrB.exp files. At least one must exist. |
192 | my @stderrB_exps = <$name.stderrB.exp*>; | 192 | my @stderrB_exps = <$name.stderrB.exp*>; |
193 | (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n"; | 193 | (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n"; |
@@ -196,7 +196,7 @@ index a441f42..cb05b52 100755 | |||
196 | } | 196 | } |
197 | 197 | ||
198 | # Maybe do post-test check | 198 | # Maybe do post-test check |
199 | @@ -583,7 +609,7 @@ sub do_one_test($$) | 199 | @@ -594,7 +620,7 @@ sub do_one_test($$) |
200 | # Find all the .post.exp files. If none, use /dev/null. | 200 | # Find all the .post.exp files. If none, use /dev/null. |
201 | my @post_exps = <$name.post.exp*>; | 201 | my @post_exps = <$name.post.exp*>; |
202 | @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps); | 202 | @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps); |
@@ -205,7 +205,7 @@ index a441f42..cb05b52 100755 | |||
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | @@ -592,6 +618,13 @@ sub do_one_test($$) | 208 | @@ -603,6 +629,13 @@ sub do_one_test($$) |
209 | print("(cleanup operation failed: $cleanup)\n"); | 209 | print("(cleanup operation failed: $cleanup)\n"); |
210 | } | 210 | } |
211 | 211 | ||
@@ -219,25 +219,25 @@ index a441f42..cb05b52 100755 | |||
219 | $num_tests_done++; | 219 | $num_tests_done++; |
220 | } | 220 | } |
221 | 221 | ||
222 | @@ -631,7 +664,7 @@ sub test_one_dir($$) | 222 | @@ -643,7 +676,7 @@ sub test_one_dir($$) |
223 | my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs)); | ||
224 | 223 | ||
224 | my $tests_start_time = time; | ||
225 | if ($found_tests) { | 225 | if ($found_tests) { |
226 | - print "-- Running tests in $full_dir $dashes\n"; | 226 | - print "-- Running tests in $full_dir $dashes\n"; |
227 | + print "-- Running tests in $full_dir $dashes\n" if ($yoctoptest == 0); | 227 | + print "-- Running tests in $full_dir $dashes\n" if ($yoctoptest == 0); |
228 | } | 228 | } |
229 | foreach my $f (@fs) { | 229 | foreach my $f (@fs) { |
230 | if (-d $f) { | 230 | if (-d $f) { |
231 | @@ -641,7 +674,7 @@ sub test_one_dir($$) | 231 | @@ -657,7 +690,7 @@ sub test_one_dir($$) |
232 | } | 232 | my $end_time = "(in $tests_cost_time sec)"; |
233 | } | 233 | my $end_dashes = "-" x (50 - (length $full_dir) |
234 | if ($found_tests) { | 234 | - (length $end_time) - 1); |
235 | - print "-- Finished tests in $full_dir $dashes\n"; | 235 | - print "-- Finished tests in $full_dir $end_time $end_dashes\n"; |
236 | + print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0); | 236 | + print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0); |
237 | } | 237 | } |
238 | 238 | ||
239 | chdir(".."); | 239 | chdir(".."); |
240 | @@ -667,10 +700,12 @@ sub summarise_results | 240 | @@ -683,10 +716,12 @@ sub summarise_results |
241 | $num_failures{"stdout"}, plural($num_failures{"stdout"}), | 241 | $num_failures{"stdout"}, plural($num_failures{"stdout"}), |
242 | $num_failures{"stderrB"}, plural($num_failures{"stderrB"}), | 242 | $num_failures{"stderrB"}, plural($num_failures{"stderrB"}), |
243 | $num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}), | 243 | $num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}), |
@@ -253,5 +253,5 @@ index a441f42..cb05b52 100755 | |||
253 | print "\n"; | 253 | print "\n"; |
254 | } | 254 | } |
255 | -- | 255 | -- |
256 | 2.6.2 | 256 | 2.30.2 |
257 | 257 | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch deleted file mode 100644 index 6176640e42..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 10 Jun 2017 01:07:59 -0700 | ||
4 | Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl | ||
5 | |||
6 | similar to sun | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | helgrind/tests/tc20_verifywrap.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c | ||
16 | index c110000..a311a49 100644 | ||
17 | --- a/helgrind/tests/tc20_verifywrap.c | ||
18 | +++ b/helgrind/tests/tc20_verifywrap.c | ||
19 | @@ -20,7 +20,7 @@ | ||
20 | |||
21 | #if !defined(__APPLE__) | ||
22 | |||
23 | -#if defined(__sun__) | ||
24 | +#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__)) | ||
25 | /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */ | ||
26 | # define __GLIBC_PREREQ | ||
27 | #else | ||
28 | -- | ||
29 | 2.13.1 | ||
30 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch b/meta/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch index 07774f38a9..51cd3532d3 100644 --- a/meta/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch +++ b/meta/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch | |||
@@ -3,14 +3,14 @@ From: Aneesh Bansal <aneesh.bansal@freescale.com> | |||
3 | Date: Mon, 21 Nov 2011 17:31:39 +0530 | 3 | Date: Mon, 21 Nov 2011 17:31:39 +0530 |
4 | Subject: [PATCH] Added support for PPC instructions mfatbu, mfatbl. | 4 | Subject: [PATCH] Added support for PPC instructions mfatbu, mfatbl. |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com> | ||
9 | --- | ||
10 | Currently Valgrind 3.7.0 does not have support for PPC instructions mfatbu and mfatbl. When we run a USDPAA application with VALGRIND, the following error is given by valgrind : | 6 | Currently Valgrind 3.7.0 does not have support for PPC instructions mfatbu and mfatbl. When we run a USDPAA application with VALGRIND, the following error is given by valgrind : |
11 | dis_proc_ctl(ppc)(mfspr,SPR)(0x20F) | 7 | dis_proc_ctl(ppc)(mfspr,SPR)(0x20F) |
12 | disInstr(ppc): unhandled instruction: 0x7C0F82A6 | 8 | disInstr(ppc): unhandled instruction: 0x7C0F82A6 |
13 | 9 | ||
10 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=289836] | ||
11 | |||
12 | Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com> | ||
13 | --- | ||
14 | 14 | ||
15 | VEX/priv/guest_ppc_defs.h | 2 ++ | 15 | VEX/priv/guest_ppc_defs.h | 2 ++ |
16 | VEX/priv/guest_ppc_helpers.c | 18 ++++++++++++++++++ | 16 | VEX/priv/guest_ppc_helpers.c | 18 ++++++++++++++++++ |
diff --git a/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch b/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch index 5fcfec0015..82b8344279 100644 --- a/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch +++ b/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch | |||
@@ -8,7 +8,7 @@ test 64-bit float copies when building for ARM. Allow it to do so if | |||
8 | possible, but fallback to C when building for ARM targets which don't | 8 | possible, but fallback to C when building for ARM targets which don't |
9 | support neon. | 9 | support neon. |
10 | 10 | ||
11 | Upstream-Status: Pending | 11 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=454346] |
12 | 12 | ||
13 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | 13 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> |
14 | --- | 14 | --- |
diff --git a/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch index b431d3356e..b9804e7451 100644 --- a/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch +++ b/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 67e7a690107efb16d6d5aebfe420b64a552accdf Mon Sep 17 00:00:00 2001 | 1 | From beaa5b64c60d501fa9cd59fdc563e5f5bccf6882 Mon Sep 17 00:00:00 2001 |
2 | From: Qing He <qing.he@intel.com> | 2 | From: Qing He <qing.he@intel.com> |
3 | Date: Tue, 31 Aug 2010 22:51:58 +0800 | 3 | Date: Tue, 31 Aug 2010 22:51:58 +0800 |
4 | Subject: [PATCH] valgrind: fix perl scripts | 4 | Subject: [PATCH] valgrind: fix perl scripts |
@@ -17,35 +17,15 @@ a better fix would need: | |||
17 | Upstream-Status: Inappropriate [configuration] | 17 | Upstream-Status: Inappropriate [configuration] |
18 | 18 | ||
19 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | 19 | Signed-off-by: Maxin B. John <maxin.john@intel.com> |
20 | |||
20 | --- | 21 | --- |
21 | cachegrind/cg_annotate.in | 2 +- | 22 | massif/ms_print.in | 2 +- |
22 | cachegrind/cg_diff.in | 2 +- | 23 | perf/vg_perf.in | 2 +- |
23 | massif/ms_print.in | 2 +- | 24 | tests/vg_regtest.in | 2 +- |
24 | perf/vg_perf.in | 2 +- | 25 | 3 files changed, 3 insertions(+), 3 deletions(-) |
25 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
26 | 26 | ||
27 | diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in | ||
28 | index 69365e8..978265d 100644 | ||
29 | --- a/cachegrind/cg_annotate.in | ||
30 | +++ b/cachegrind/cg_annotate.in | ||
31 | @@ -1,4 +1,4 @@ | ||
32 | -#! @PERL@ | ||
33 | +#! /usr/bin/perl | ||
34 | |||
35 | ##--------------------------------------------------------------------## | ||
36 | ##--- Cachegrind's annotator. cg_annotate.in ---## | ||
37 | diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in | ||
38 | index 395460b..05873cc 100755 | ||
39 | --- a/cachegrind/cg_diff.in | ||
40 | +++ b/cachegrind/cg_diff.in | ||
41 | @@ -1,4 +1,4 @@ | ||
42 | -#! @PERL@ | ||
43 | +#! /usr/bin/perl | ||
44 | |||
45 | ##--------------------------------------------------------------------## | ||
46 | ##--- Cachegrind's differencer. cg_diff.in ---## | ||
47 | diff --git a/massif/ms_print.in b/massif/ms_print.in | 27 | diff --git a/massif/ms_print.in b/massif/ms_print.in |
48 | index e6fae89..3b85b40 100755 | 28 | index a206ce4..df1bc31 100755 |
49 | --- a/massif/ms_print.in | 29 | --- a/massif/ms_print.in |
50 | +++ b/massif/ms_print.in | 30 | +++ b/massif/ms_print.in |
51 | @@ -1,4 +1,4 @@ | 31 | @@ -1,4 +1,4 @@ |
@@ -55,7 +35,7 @@ index e6fae89..3b85b40 100755 | |||
55 | ##--------------------------------------------------------------------## | 35 | ##--------------------------------------------------------------------## |
56 | ##--- Massif's results printer ms_print.in ---## | 36 | ##--- Massif's results printer ms_print.in ---## |
57 | diff --git a/perf/vg_perf.in b/perf/vg_perf.in | 37 | diff --git a/perf/vg_perf.in b/perf/vg_perf.in |
58 | index 7a80cb0..28f6156 100644 | 38 | index 90ee1d2..c585096 100644 |
59 | --- a/perf/vg_perf.in | 39 | --- a/perf/vg_perf.in |
60 | +++ b/perf/vg_perf.in | 40 | +++ b/perf/vg_perf.in |
61 | @@ -1,4 +1,4 @@ | 41 | @@ -1,4 +1,4 @@ |
@@ -65,7 +45,7 @@ index 7a80cb0..28f6156 100644 | |||
65 | ##--- Valgrind performance testing script vg_perf ---## | 45 | ##--- Valgrind performance testing script vg_perf ---## |
66 | ##--------------------------------------------------------------------## | 46 | ##--------------------------------------------------------------------## |
67 | diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in | 47 | diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in |
68 | index cb05b52..032e947 100755 | 48 | index 7152765..ad18800 100755 |
69 | --- a/tests/vg_regtest.in | 49 | --- a/tests/vg_regtest.in |
70 | +++ b/tests/vg_regtest.in | 50 | +++ b/tests/vg_regtest.in |
71 | @@ -1,4 +1,4 @@ | 51 | @@ -1,4 +1,4 @@ |
@@ -74,5 +54,3 @@ index cb05b52..032e947 100755 | |||
74 | ##--------------------------------------------------------------------## | 54 | ##--------------------------------------------------------------------## |
75 | ##--- Valgrind regression testing script vg_regtest ---## | 55 | ##--- Valgrind regression testing script vg_regtest ---## |
76 | ##--------------------------------------------------------------------## | 56 | ##--------------------------------------------------------------------## |
77 | --- | ||
78 | 2.4.0 | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 index 93bfd45a4e..5bfba1c8d3 100644 --- a/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 +++ b/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 | |||
@@ -1,215 +1,8 @@ | |||
1 | gdbserver_tests/hgtls | ||
2 | cachegrind/tests/ann1 | ||
3 | callgrind/tests/simwork1 | ||
4 | callgrind/tests/simwork2 | ||
5 | callgrind/tests/simwork3 | ||
6 | callgrind/tests/simwork-both | ||
7 | callgrind/tests/simwork-cache | ||
8 | callgrind/tests/threads | ||
9 | callgrind/tests/threads-use | ||
10 | drd/tests/annotate_barrier | ||
11 | drd/tests/annotate_barrier_xml | ||
12 | drd/tests/annotate_hbefore | ||
13 | drd/tests/annotate_hb_err | ||
14 | drd/tests/annotate_hb_race | ||
15 | drd/tests/annotate_ignore_read | ||
16 | drd/tests/annotate_ignore_rw | ||
17 | drd/tests/annotate_ignore_rw2 | ||
18 | drd/tests/annotate_ignore_write | ||
19 | drd/tests/annotate_ignore_write2 | ||
20 | drd/tests/annotate_order_1 | ||
21 | drd/tests/annotate_order_2 | ||
22 | drd/tests/annotate_order_3 | ||
23 | drd/tests/annotate_publish_hg | ||
24 | drd/tests/annotate_rwlock | ||
25 | drd/tests/annotate_rwlock_hg | ||
26 | drd/tests/annotate_sem | 1 | drd/tests/annotate_sem |
27 | drd/tests/annotate_smart_pointer | 2 | gdbserver_tests/hgtls |
28 | drd/tests/annotate_smart_pointer2 | ||
29 | drd/tests/annotate_spinlock | ||
30 | drd/tests/annotate_static | ||
31 | drd/tests/annotate_trace_memory | ||
32 | drd/tests/annotate_trace_memory_xml | ||
33 | drd/tests/atomic_var | ||
34 | drd/tests/bar_trivial | ||
35 | drd/tests/bug-235681 | ||
36 | drd/tests/bug322621 | ||
37 | drd/tests/circular_buffer | ||
38 | drd/tests/concurrent_close | ||
39 | drd/tests/custom_alloc | ||
40 | drd/tests/custom_alloc_fiw | ||
41 | drd/tests/dlopen | ||
42 | drd/tests/fork-parallel | ||
43 | drd/tests/fork-serial | ||
44 | drd/tests/fp_race | ||
45 | drd/tests/fp_race2 | ||
46 | drd/tests/fp_race_xml | ||
47 | drd/tests/free_is_write | ||
48 | drd/tests/free_is_write2 | ||
49 | drd/tests/hg01_all_ok | ||
50 | drd/tests/hg02_deadlock | ||
51 | drd/tests/hg03_inherit | ||
52 | drd/tests/hg04_race | ||
53 | drd/tests/hg05_race2 | ||
54 | drd/tests/hg06_readshared | ||
55 | drd/tests/hold_lock_1 | ||
56 | drd/tests/hold_lock_2 | ||
57 | drd/tests/linuxthreads_det | ||
58 | drd/tests/matinv | ||
59 | drd/tests/memory_allocation | ||
60 | drd/tests/monitor_example | ||
61 | drd/tests/new_delete | ||
62 | drd/tests/pth_barrier | ||
63 | drd/tests/pth_barrier2 | ||
64 | drd/tests/pth_barrier3 | ||
65 | drd/tests/pth_barrier_race | ||
66 | drd/tests/pth_barrier_reinit | ||
67 | drd/tests/pth_barrier_thr_cr | ||
68 | drd/tests/pth_broadcast | ||
69 | drd/tests/pth_cancel_locked | ||
70 | drd/tests/pth_cleanup_handler | ||
71 | drd/tests/pth_cond_race | ||
72 | drd/tests/pth_cond_race2 | ||
73 | drd/tests/pth_detached2 | ||
74 | drd/tests/pth_detached3 | ||
75 | drd/tests/pth_detached_sem | ||
76 | drd/tests/pth_inconsistent_cond_wait | ||
77 | drd/tests/pth_mutex_reinit | ||
78 | drd/tests/pth_once | ||
79 | drd/tests/pth_process_shared_mutex | ||
80 | drd/tests/pth_spinlock | ||
81 | drd/tests/pth_uninitialized_cond | ||
82 | drd/tests/read_and_free_race | ||
83 | drd/tests/recursive_mutex | ||
84 | drd/tests/rwlock_race | ||
85 | drd/tests/rwlock_test | ||
86 | drd/tests/rwlock_type_checking | ||
87 | drd/tests/sem_as_mutex | ||
88 | drd/tests/sem_as_mutex2 | ||
89 | drd/tests/sem_as_mutex3 | ||
90 | drd/tests/sem_open | ||
91 | drd/tests/sem_open2 | ||
92 | drd/tests/sem_open3 | ||
93 | drd/tests/sem_open_traced | ||
94 | drd/tests/sem_wait | ||
95 | drd/tests/sigalrm | ||
96 | drd/tests/sigaltstack | ||
97 | drd/tests/std_atomic | ||
98 | drd/tests/std_string | ||
99 | drd/tests/std_thread | ||
100 | drd/tests/std_thread2 | ||
101 | drd/tests/str_tester | ||
102 | drd/tests/tc01_simple_race | ||
103 | drd/tests/tc02_simple_tls | ||
104 | drd/tests/tc03_re_excl | ||
105 | drd/tests/tc04_free_lock | ||
106 | drd/tests/tc05_simple_race | ||
107 | drd/tests/tc06_two_races | ||
108 | drd/tests/tc07_hbl1 | ||
109 | drd/tests/tc08_hbl2 | ||
110 | drd/tests/tc09_bad_unlock | ||
111 | drd/tests/tc10_rec_lock | ||
112 | drd/tests/tc11_XCHG | ||
113 | drd/tests/tc12_rwl_trivial | ||
114 | drd/tests/tc13_laog1 | ||
115 | drd/tests/tc15_laog_lockdel | ||
116 | drd/tests/tc16_byterace | ||
117 | drd/tests/tc17_sembar | ||
118 | drd/tests/tc18_semabuse | ||
119 | drd/tests/tc19_shadowmem | ||
120 | drd/tests/tc21_pthonce | ||
121 | drd/tests/tc22_exit_w_lock | ||
122 | drd/tests/tc23_bogus_condwait | ||
123 | helgrind/tests/annotate_rwlock | ||
124 | helgrind/tests/annotate_smart_pointer | ||
125 | helgrind/tests/bar_bad | ||
126 | helgrind/tests/bar_trivial | ||
127 | helgrind/tests/bug322621 | ||
128 | helgrind/tests/cond_init_destroy | ||
129 | helgrind/tests/cond_timedwait_invalid | ||
130 | helgrind/tests/cond_timedwait_test | ||
131 | helgrind/tests/free_is_write | ||
132 | helgrind/tests/hg01_all_ok | ||
133 | helgrind/tests/hg03_inherit | ||
134 | helgrind/tests/hg04_race | ||
135 | helgrind/tests/hg05_race2 | 3 | helgrind/tests/hg05_race2 |
136 | helgrind/tests/hg06_readshared | ||
137 | helgrind/tests/locked_vs_unlocked1_fwd | ||
138 | helgrind/tests/locked_vs_unlocked1_rev | ||
139 | helgrind/tests/locked_vs_unlocked2 | ||
140 | helgrind/tests/locked_vs_unlocked3 | ||
141 | helgrind/tests/pth_barrier1 | ||
142 | helgrind/tests/pth_barrier2 | ||
143 | helgrind/tests/pth_barrier3 | ||
144 | helgrind/tests/pth_destroy_cond | ||
145 | helgrind/tests/rwlock_race | ||
146 | helgrind/tests/rwlock_test | ||
147 | helgrind/tests/shmem_abits | ||
148 | helgrind/tests/stackteardown | ||
149 | helgrind/tests/t2t_laog | ||
150 | helgrind/tests/tc01_simple_race | ||
151 | helgrind/tests/tc02_simple_tls | ||
152 | helgrind/tests/tc03_re_excl | ||
153 | helgrind/tests/tc04_free_lock | ||
154 | helgrind/tests/tc05_simple_race | ||
155 | helgrind/tests/tc06_two_races | ||
156 | helgrind/tests/tc06_two_races_xml | ||
157 | helgrind/tests/tc07_hbl1 | ||
158 | helgrind/tests/tc08_hbl2 | ||
159 | helgrind/tests/tc09_bad_unlock | ||
160 | helgrind/tests/tc10_rec_lock | ||
161 | helgrind/tests/tc11_XCHG | ||
162 | helgrind/tests/tc12_rwl_trivial | ||
163 | helgrind/tests/tc13_laog1 | ||
164 | helgrind/tests/tc14_laog_dinphils | ||
165 | helgrind/tests/tc15_laog_lockdel | ||
166 | helgrind/tests/tc16_byterace | ||
167 | helgrind/tests/tc17_sembar | ||
168 | helgrind/tests/tc18_semabuse | ||
169 | helgrind/tests/tc19_shadowmem | ||
170 | helgrind/tests/tc20_verifywrap | 4 | helgrind/tests/tc20_verifywrap |
171 | helgrind/tests/tc21_pthonce | ||
172 | helgrind/tests/tc22_exit_w_lock | ||
173 | helgrind/tests/tc23_bogus_condwait | ||
174 | helgrind/tests/tc24_nonzero_sem | ||
175 | helgrind/tests/tls_threads | ||
176 | memcheck/tests/accounting | ||
177 | memcheck/tests/addressable | ||
178 | memcheck/tests/arm64-linux/scalar | ||
179 | memcheck/tests/atomic_incs | ||
180 | memcheck/tests/badaddrvalue | ||
181 | memcheck/tests/badfree | ||
182 | memcheck/tests/badfree-2trace | ||
183 | memcheck/tests/badfree3 | ||
184 | memcheck/tests/badjump | ||
185 | memcheck/tests/badjump2 | ||
186 | memcheck/tests/badloop | ||
187 | memcheck/tests/badpoll | ||
188 | memcheck/tests/badrw | ||
189 | memcheck/tests/big_blocks_freed_list | ||
190 | memcheck/tests/brk2 | ||
191 | memcheck/tests/dw4 | 5 | memcheck/tests/dw4 |
192 | memcheck/tests/err_disable4 | ||
193 | memcheck/tests/err_disable_arange1 | ||
194 | memcheck/tests/leak-autofreepool-5 | ||
195 | memcheck/tests/leak_cpp_interior | ||
196 | memcheck/tests/linux/lsframe1 | ||
197 | memcheck/tests/linux/lsframe2 | ||
198 | memcheck/tests/linux/with-space | ||
199 | memcheck/tests/origin5-bz2 | ||
200 | memcheck/tests/origin6-fp | ||
201 | memcheck/tests/overlap | ||
202 | memcheck/tests/partial_load_dflt | ||
203 | memcheck/tests/pdb-realloc2 | ||
204 | memcheck/tests/sh-mem | ||
205 | memcheck/tests/sh-mem-random | ||
206 | memcheck/tests/sigaltstack | ||
207 | memcheck/tests/sigkill | ||
208 | memcheck/tests/signal2 | ||
209 | memcheck/tests/supp_unknown | ||
210 | memcheck/tests/threadname | ||
211 | memcheck/tests/threadname_xml | ||
212 | memcheck/tests/unit_oset | ||
213 | memcheck/tests/varinfo1 | 6 | memcheck/tests/varinfo1 |
214 | memcheck/tests/varinfo2 | 7 | memcheck/tests/varinfo2 |
215 | memcheck/tests/varinfo3 | 8 | memcheck/tests/varinfo3 |
@@ -217,19 +10,23 @@ memcheck/tests/varinfo4 | |||
217 | memcheck/tests/varinfo5 | 10 | memcheck/tests/varinfo5 |
218 | memcheck/tests/varinfo6 | 11 | memcheck/tests/varinfo6 |
219 | memcheck/tests/varinforestrict | 12 | memcheck/tests/varinforestrict |
220 | memcheck/tests/vcpu_bz2 | 13 | memcheck/tests/atomic_incs |
221 | memcheck/tests/vcpu_fbench | 14 | memcheck/tests/bug464969_d_demangle |
222 | memcheck/tests/vcpu_fnfns | 15 | memcheck/tests/cxx17_aligned_new |
223 | memcheck/tests/wcs | 16 | memcheck/tests/demangle |
224 | memcheck/tests/wrap1 | 17 | memcheck/tests/long_namespace_xml |
225 | memcheck/tests/wrap2 | 18 | memcheck/tests/mismatches |
226 | memcheck/tests/wrap3 | 19 | memcheck/tests/mismatches_xml |
227 | memcheck/tests/wrap4 | 20 | memcheck/tests/new_aligned_delete_default |
228 | memcheck/tests/wrap5 | 21 | memcheck/tests/new_delete_mismatch_size |
229 | memcheck/tests/wrap6 | 22 | memcheck/tests/new_nothrow |
230 | memcheck/tests/wrap7 | 23 | memcheck/tests/realloc_size_zero_mismatch |
231 | memcheck/tests/wrap8 | 24 | memcheck/tests/sized_aligned_new_delete_args |
232 | memcheck/tests/wrapmalloc | 25 | memcheck/tests/sized_aligned_new_delete_misaligned1 |
233 | memcheck/tests/wrapmallocstatic | 26 | memcheck/tests/sized_aligned_new_delete_misaligned1_xml |
234 | memcheck/tests/writev1 | 27 | memcheck/tests/sized_aligned_new_delete_misaligned2 |
235 | memcheck/tests/xml1 | 28 | memcheck/tests/sized_aligned_new_delete_misaligned2_xml |
29 | memcheck/tests/sized_aligned_new_delete_misaligned3 | ||
30 | memcheck/tests/sized_aligned_new_delete_misaligned3_xml | ||
31 | memcheck/tests/sized_delete | ||
32 | none/tests/bigcode | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-for-all b/meta/recipes-devtools/valgrind/valgrind/remove-for-all index d6a85c4735..8435a6d41d 100644 --- a/meta/recipes-devtools/valgrind/valgrind/remove-for-all +++ b/meta/recipes-devtools/valgrind/valgrind/remove-for-all | |||
@@ -1,2 +1,29 @@ | |||
1 | cachegrind/tests/wrap5 | ||
2 | drd/tests/boost_thread | ||
3 | none/tests/amd64/fb_test_amd64 | ||
4 | none/tests/tls | ||
5 | gdbserver_tests/hginfo | ||
6 | gdbserver_tests/mcinvokeRU | ||
7 | memcheck/tests/linux/dlclose_leak-no-keep | ||
8 | memcheck/tests/linux/dlclose_leak | ||
9 | memcheck/tests/linux/timerfd-syscall | ||
10 | memcheck/tests/supp_unknown | ||
11 | memcheck/tests/wrap1 | ||
12 | memcheck/tests/wrap2 | ||
13 | memcheck/tests/wrap3 | ||
14 | memcheck/tests/wrap4 | ||
15 | memcheck/tests/wrap5 | ||
16 | memcheck/tests/wrap6 | ||
17 | memcheck/tests/wrap7 | ||
18 | memcheck/tests/wrap8 | ||
19 | helgrind/tests/tls_threads | ||
20 | helgrind/tests/pth_mempcpy_false_races | ||
1 | drd/tests/bar_bad | 21 | drd/tests/bar_bad |
2 | drd/tests/bar_bad_xml | 22 | drd/tests/bar_bad_xml |
23 | drd/tests/pth_barrier_thr_cr | ||
24 | drd/tests/std_thread2 | ||
25 | drd/tests/thread_name_xml | ||
26 | massif/tests/deep-D | ||
27 | massif/tests/bug469146 | ||
28 | massif/tests/new-cpp | ||
29 | massif/tests/overloaded-new | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest index e8a1a668fc..15cf03f9d2 100755 --- a/meta/recipes-devtools/valgrind/valgrind/run-ptest +++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest | |||
@@ -7,6 +7,7 @@ | |||
7 | # Randy MacLeod <Randy.MacLeod@windriver.com> | 7 | # Randy MacLeod <Randy.MacLeod@windriver.com> |
8 | ############################################################### | 8 | ############################################################### |
9 | VALGRIND_LIB=@libdir@/valgrind | 9 | VALGRIND_LIB=@libdir@/valgrind |
10 | VALGRIND_LIBEXECDIR=@libexecdir@/valgrind | ||
10 | VALGRIND_BIN=@bindir@/valgrind | 11 | VALGRIND_BIN=@bindir@/valgrind |
11 | 12 | ||
12 | LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" | 13 | LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" |
@@ -31,18 +32,35 @@ if [ "$arch" = "aarch64" ]; then | |||
31 | done | 32 | done |
32 | fi | 33 | fi |
33 | 34 | ||
35 | echo "Run non-deterministic tests using taskset to limit them to a single core." | ||
36 | for i in `cat taskset_nondeterministic_tests`; do | ||
37 | # The remove-for-aarch64 and taskset_nondeterministic_tests may overlap so | ||
38 | # check if a file exist. | ||
39 | if test -f "${i}.vgtest"; then | ||
40 | taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG} | ||
41 | mv $i.vgtest $i.IGNORE | ||
42 | fi | ||
43 | done | ||
44 | |||
34 | cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \ | 45 | cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \ |
35 | --valgrind=${VALGRIND_BIN} \ | 46 | --valgrind=${VALGRIND_BIN} \ |
36 | --valgrind-lib=${VALGRIND_LIB} \ | 47 | --valgrind-lib=${VALGRIND_LIBEXECDIR} \ |
37 | --yocto-ptest \ | 48 | --yocto-ptest \ |
38 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ | 49 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ |
39 | 2>&1|tee ${LOG} | 50 | 2>&1|tee -a ${LOG} |
40 | 51 | ||
41 | cd ${VALGRIND_LIB}/ptest && \ | 52 | cd ${VALGRIND_LIB}/ptest && \ |
42 | ./tests/post_regtest_checks $(pwd) \ | 53 | ./tests/post_regtest_checks $(pwd) \ |
43 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ | 54 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ |
44 | 2>&1|tee -a ${LOG} | 55 | 2>&1|tee -a ${LOG} |
45 | 56 | ||
57 | echo "Restore non-deterministic tests" | ||
58 | for i in `cat taskset_nondeterministic_tests`; do | ||
59 | if test -f "${i}.vgtest.IGNORE"; then | ||
60 | mv $i.IGNORE $i.vgtest; | ||
61 | fi | ||
62 | done | ||
63 | |||
46 | if [ "$arch" = "aarch64" ]; then | 64 | if [ "$arch" = "aarch64" ]; then |
47 | echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory" | 65 | echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory" |
48 | for i in `cat remove-for-aarch64`; do | 66 | for i in `cat remove-for-aarch64`; do |
@@ -55,6 +73,16 @@ for i in `cat remove-for-all`; do | |||
55 | mv $i.IGNORE $i.vgtest; | 73 | mv $i.IGNORE $i.vgtest; |
56 | done | 74 | done |
57 | 75 | ||
76 | echo "Failed test details..." | ||
77 | failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'` | ||
78 | for test in $failed_tests; do | ||
79 | for diff_results in `ls $test*.diff`; do | ||
80 | echo $diff_results | ||
81 | echo '************' | ||
82 | cat $diff_results | ||
83 | done | ||
84 | done | ||
85 | |||
58 | passed=`grep PASS: ${LOG}|wc -l` | 86 | passed=`grep PASS: ${LOG}|wc -l` |
59 | failed=`grep FAIL: ${LOG}|wc -l` | 87 | failed=`grep FAIL: ${LOG}|wc -l` |
60 | skipped=`grep SKIP: ${LOG}|wc -l` | 88 | skipped=`grep SKIP: ${LOG}|wc -l` |
diff --git a/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch b/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch index eea671da0a..bde1241dc7 100644 --- a/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch +++ b/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From 8154d38bac5cdb3675cfdaf562ab9da01988b263 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Fan Yu <yifan.yu@windriver.com> | ||
3 | Date: Wed, 17 Mar 2021 12:16:31 -0400 | ||
4 | Subject: [PATCH 19/20] remove s390x_vec_op_t | ||
5 | |||
1 | s390x_vec_op_t is not needed anywhere, only elements of enum are accessed | 6 | s390x_vec_op_t is not needed anywhere, only elements of enum are accessed |
2 | removing it ensures that valgrind can be built with -fno-common option | 7 | removing it ensures that valgrind can be built with -fno-common option |
3 | 8 | ||
@@ -6,14 +11,25 @@ ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-guest_s390_helpers.o):/u | |||
6 | 11 | ||
7 | Upstream-Status: Pending | 12 | Upstream-Status: Pending |
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
14 | |||
15 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
16 | --- | ||
17 | VEX/priv/guest_s390_defs.h | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/VEX/priv/guest_s390_defs.h b/VEX/priv/guest_s390_defs.h | ||
21 | index 9054290..dab8002 100644 | ||
9 | --- a/VEX/priv/guest_s390_defs.h | 22 | --- a/VEX/priv/guest_s390_defs.h |
10 | +++ b/VEX/priv/guest_s390_defs.h | 23 | +++ b/VEX/priv/guest_s390_defs.h |
11 | @@ -286,7 +286,7 @@ enum { | 24 | @@ -284,7 +284,7 @@ typedef enum { |
12 | S390_VEC_OP_VFCHE = 18, | 25 | S390_VEC_OP_VBPERM, |
13 | S390_VEC_OP_VFTCI = 19, | 26 | S390_VEC_OP_VMSL, |
14 | S390_VEC_OP_LAST = 20 // supposed to be the last element in enum | 27 | S390_VEC_OP_LAST // supposed to be the last element in enum |
15 | -} s390x_vec_op_t; | 28 | -} s390x_vec_op_t; |
16 | +}; | 29 | +}; |
17 | 30 | ||
18 | /* Arguments of s390x_dirtyhelper_vec_op(...) which are packed into one | 31 | /* Arguments of s390x_dirtyhelper_vec_op(...) which are packed into one |
19 | ULong variable. | 32 | ULong variable. |
33 | -- | ||
34 | 2.29.2 | ||
35 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests b/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests new file mode 100644 index 0000000000..e15100ade7 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests | |||
@@ -0,0 +1,2 @@ | |||
1 | helgrind/tests/hg05_race2 | ||
2 | helgrind/tests/tc09_bad_unlock | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch index adea405213..f15d04b173 100644 --- a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch +++ b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch | |||
@@ -15,7 +15,7 @@ over-ride that). | |||
15 | 15 | ||
16 | See similar cases in none/tests/arm/Makefile.am | 16 | See similar cases in none/tests/arm/Makefile.am |
17 | 17 | ||
18 | Upstream-Status: Pending | 18 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=454346] |
19 | 19 | ||
20 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | 20 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> |
21 | --- | 21 | --- |
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb index d0aefdf39a..563d99f0e2 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb | |||
@@ -2,7 +2,7 @@ SUMMARY = "Valgrind memory debugger and instrumentation framework" | |||
2 | HOMEPAGE = "http://valgrind.org/" | 2 | HOMEPAGE = "http://valgrind.org/" |
3 | DESCRIPTION = "Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail." | 3 | DESCRIPTION = "Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail." |
4 | BUGTRACKER = "http://valgrind.org/support/bug_reports.html" | 4 | BUGTRACKER = "http://valgrind.org/support/bug_reports.html" |
5 | LICENSE = "GPLv2 & GPLv2+ & BSD" | 5 | LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
7 | file://include/pub_tool_basics.h;beginline=6;endline=29;md5=41c410e8d3f305aee7aaa666b2e4f366 \ | 7 | file://include/pub_tool_basics.h;beginline=6;endline=29;md5=41c410e8d3f305aee7aaa666b2e4f366 \ |
8 | file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ | 8 | file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ |
@@ -18,44 +18,34 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
18 | file://run-ptest \ | 18 | file://run-ptest \ |
19 | file://remove-for-aarch64 \ | 19 | file://remove-for-aarch64 \ |
20 | file://remove-for-all \ | 20 | file://remove-for-all \ |
21 | file://0004-Fix-out-of-tree-builds.patch \ | 21 | file://taskset_nondeterministic_tests \ |
22 | file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ | 22 | file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ |
23 | file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ | ||
24 | file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ | 23 | file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ |
25 | file://avoid-neon-for-targets-which-don-t-support-it.patch \ | 24 | file://avoid-neon-for-targets-which-don-t-support-it.patch \ |
26 | file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ | 25 | file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ |
27 | file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ | 26 | file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ |
28 | file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \ | ||
29 | file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ | 27 | file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ |
30 | file://0002-context-APIs-are-not-available-on-musl.patch \ | ||
31 | file://0003-correct-include-directive-path-for-config.h.patch \ | 28 | file://0003-correct-include-directive-path-for-config.h.patch \ |
32 | file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ | ||
33 | file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ | ||
34 | file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ | ||
35 | file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ | ||
36 | file://0001-fix-opcode-not-supported-on-mips32-linux.patch \ | ||
37 | file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ | ||
38 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ | ||
39 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ | 29 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ |
40 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ | 30 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ |
41 | file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \ | 31 | file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \ |
42 | file://s390x_vec_op_t.patch \ | 32 | file://s390x_vec_op_t.patch \ |
43 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ | 33 | file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ |
44 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ | 34 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ |
45 | file://0001-drd-Port-to-Fedora-33.patch \ | 35 | file://0001-docs-Disable-manual-validation.patch \ |
46 | file://0001-drd-musl-fix.patch \ | 36 | file://0001-valgrind-monitor.py-regular-expressions-should-use-r.patch \ |
47 | file://0001-helgrind-Intercept-libc-functions.patch \ | 37 | file://0002-Bug-476548-valgrind-3.22.0-fails-on-assertion-when-l.patch \ |
48 | file://0001-gdbserver_tests-Disable-nlcontrolc.vgtest-for-x86-64.patch \ | 38 | file://0003-Add-fchmodat2-syscall-on-linux.patch \ |
39 | file://0004-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch \ | ||
49 | " | 40 | " |
50 | SRC_URI[md5sum] = "d1b153f1ab17cf1f311705e7a83ef589" | 41 | SRC_URI[sha256sum] = "c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c" |
51 | SRC_URI[sha256sum] = "c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca" | ||
52 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | 42 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" |
53 | 43 | ||
54 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' | 44 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' |
55 | 45 | ||
56 | # patch 0001-memcheck-vgtests-remove-fullpath-after-flags.patch removes relative path | 46 | # patch 0001-memcheck-vgtests-remove-fullpath-after-flags.patch removes relative path |
57 | # argument. Change expected stderr files accordingly. | 47 | # argument. Change expected stderr files accordingly. |
58 | do_patch_append() { | 48 | do_patch:append() { |
59 | bb.build.exec_func('do_sed_paths', d) | 49 | bb.build.exec_func('do_sed_paths', d) |
60 | } | 50 | } |
61 | 51 | ||
@@ -65,23 +55,23 @@ do_sed_paths() { | |||
65 | } | 55 | } |
66 | 56 | ||
67 | # valgrind supports armv7 and above | 57 | # valgrind supports armv7 and above |
68 | COMPATIBLE_HOST_armv4 = 'null' | 58 | COMPATIBLE_HOST:armv4 = 'null' |
69 | COMPATIBLE_HOST_armv5 = 'null' | 59 | COMPATIBLE_HOST:armv5 = 'null' |
70 | COMPATIBLE_HOST_armv6 = 'null' | 60 | COMPATIBLE_HOST:armv6 = 'null' |
71 | 61 | ||
72 | # valgrind fails with powerpc soft-float | 62 | # valgrind fails with powerpc soft-float |
73 | COMPATIBLE_HOST_powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}" | 63 | COMPATIBLE_HOST:powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}" |
74 | 64 | ||
75 | # X32 isn't supported by valgrind at this time | 65 | # X32 isn't supported by valgrind at this time |
76 | COMPATIBLE_HOST_linux-gnux32 = 'null' | 66 | COMPATIBLE_HOST:linux-gnux32 = 'null' |
77 | COMPATIBLE_HOST_linux-muslx32 = 'null' | 67 | COMPATIBLE_HOST:linux-muslx32 = 'null' |
78 | 68 | ||
79 | # Disable for some MIPS variants | 69 | # Disable for some MIPS variants |
80 | COMPATIBLE_HOST_mipsarchr6 = 'null' | 70 | COMPATIBLE_HOST:mipsarchr6 = 'null' |
81 | COMPATIBLE_HOST_linux-gnun32 = 'null' | 71 | COMPATIBLE_HOST:linux-gnun32 = 'null' |
82 | 72 | ||
83 | # Disable for powerpc64 with musl | 73 | # Disable for powerpc64 with musl |
84 | COMPATIBLE_HOST_libc-musl_powerpc64 = 'null' | 74 | COMPATIBLE_HOST:libc-musl:powerpc64 = 'null' |
85 | 75 | ||
86 | # brokenseip is unfortunately required by ptests to pass | 76 | # brokenseip is unfortunately required by ptests to pass |
87 | inherit autotools-brokensep ptest multilib_header | 77 | inherit autotools-brokensep ptest multilib_header |
@@ -90,7 +80,7 @@ EXTRA_OECONF = "--enable-tls --without-mpicc" | |||
90 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" | 80 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" |
91 | 81 | ||
92 | # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option | 82 | # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option |
93 | EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" | 83 | EXTRA_OECONF:append:arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" |
94 | 84 | ||
95 | EXTRA_OEMAKE = "-w" | 85 | EXTRA_OEMAKE = "-w" |
96 | 86 | ||
@@ -102,53 +92,73 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | |||
102 | # which fixes build path issue in DWARF. | 92 | # which fixes build path issue in DWARF. |
103 | SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" | 93 | SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" |
104 | 94 | ||
105 | do_configure_prepend () { | 95 | # Split out various helper scripts to separate packages to avoid the |
96 | # main package depending on perl and python. | ||
97 | PACKAGES =+ "${PN}-cachegrind ${PN}-massif ${PN}-callgrind" | ||
98 | |||
99 | FILES:${PN}-cachegrind = "${bindir}/cg_*" | ||
100 | FILES:${PN}-massif = "${bindir}/ms_*" | ||
101 | FILES:${PN}-callgrind = "${bindir}/callgrind_*" | ||
102 | |||
103 | RDEPENDS:${PN}-cachegrind = "${PN} python3-core" | ||
104 | RDEPENDS:${PN}-massif = "${PN} perl" | ||
105 | RDEPENDS:${PN}-callgrind = "${PN} perl" | ||
106 | |||
107 | do_configure:prepend () { | ||
106 | rm -rf ${S}/config.h | 108 | rm -rf ${S}/config.h |
107 | sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am | 109 | sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am |
108 | sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am | 110 | sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am |
109 | } | 111 | } |
110 | 112 | ||
111 | do_install_append () { | 113 | do_install:append () { |
112 | install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ | 114 | install -m 644 ${B}/default.supp ${D}/${libexecdir}/valgrind/ |
113 | oe_multilib_header valgrind/config.h | 115 | oe_multilib_header valgrind/config.h |
114 | } | 116 | } |
115 | 117 | ||
116 | VALGRINDARCH ?= "${TARGET_ARCH}" | 118 | VALGRINDARCH ?= "${TARGET_ARCH}" |
117 | VALGRINDARCH_aarch64 = "arm64" | 119 | VALGRINDARCH:aarch64 = "arm64" |
118 | VALGRINDARCH_x86-64 = "amd64" | 120 | VALGRINDARCH:x86-64 = "amd64" |
119 | VALGRINDARCH_x86 = "x86" | 121 | VALGRINDARCH:x86 = "x86" |
120 | VALGRINDARCH_mips = "mips32" | 122 | VALGRINDARCH:mips = "mips32" |
121 | VALGRINDARCH_mipsel = "mips32" | 123 | VALGRINDARCH:mipsel = "mips32" |
122 | VALGRINDARCH_mips64el = "mips64" | 124 | VALGRINDARCH:mips64el = "mips64" |
123 | VALGRINDARCH_powerpc = "ppc" | 125 | VALGRINDARCH:powerpc = "ppc" |
124 | VALGRINDARCH_powerpc64 = "ppc64" | 126 | VALGRINDARCH:powerpc64 = "ppc64" |
125 | VALGRINDARCH_powerpc64el = "ppc64le" | 127 | VALGRINDARCH:powerpc64le = "ppc64le" |
126 | 128 | ||
127 | INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so" | 129 | INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so" |
128 | |||
129 | RDEPENDS_${PN} += "perl" | ||
130 | 130 | ||
131 | # valgrind needs debug information for ld.so at runtime in order to | 131 | # valgrind needs debug information for ld.so at runtime in order to |
132 | # redirect functions like strlen. | 132 | # redirect functions like strlen. |
133 | RRECOMMENDS_${PN} += "${TCLIBC}-dbg" | 133 | RRECOMMENDS:${PN} += "${TCLIBC}-dbg" |
134 | 134 | ||
135 | RDEPENDS_${PN}-ptest += " bash coreutils file \ | 135 | RDEPENDS:${PN}-ptest += " bash coreutils curl file \ |
136 | gdb libgomp \ | 136 | gdb \ |
137 | ${TCLIBC}-src gcc-runtime-dbg \ | ||
138 | libgomp \ | ||
137 | perl \ | 139 | perl \ |
138 | perl-module-file-basename perl-module-file-glob perl-module-getopt-long \ | 140 | perl-module-file-basename perl-module-file-glob perl-module-getopt-long \ |
139 | perl-module-overloading \ | 141 | perl-module-overloading perl-module-cwd perl-module-ipc-open3 \ |
140 | procps sed ${PN}-dbg ${PN}-src" | 142 | perl-module-carp perl-module-symbol \ |
141 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" | 143 | procps \ |
144 | python3-compile \ | ||
145 | sed \ | ||
146 | util-linux-taskset \ | ||
147 | ${PN}-dbg ${PN}-src \ | ||
148 | ${PN}-cachegrind ${PN}-massif ${PN}-callgrind \ | ||
149 | " | ||
150 | RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-gconv-utf-32" | ||
142 | 151 | ||
143 | # One of the tests contains a bogus interpreter path on purpose. | 152 | # One of the tests contains a bogus interpreter path on purpose. |
144 | # Skip file dependency check | 153 | # Skip file dependency check |
145 | SKIP_FILEDEPS_${PN}-ptest = '1' | 154 | SKIP_FILEDEPS:${PN}-ptest = '1' |
146 | INSANE_SKIP_${PN}-ptest = "debug-deps" | 155 | INSANE_SKIP:${PN}-ptest = "debug-deps" |
147 | 156 | ||
148 | do_compile_ptest() { | 157 | do_compile_ptest() { |
149 | oe_runmake check | 158 | oe_runmake check |
150 | } | 159 | } |
151 | 160 | ||
161 | |||
152 | do_install_ptest() { | 162 | do_install_ptest() { |
153 | chmod +x ${B}/tests/vg_regtest | 163 | chmod +x ${B}/tests/vg_regtest |
154 | 164 | ||
@@ -157,7 +167,7 @@ do_install_ptest() { | |||
157 | # | 167 | # |
158 | # The regression tests require scripts and data files that are not | 168 | # The regression tests require scripts and data files that are not |
159 | # copied to the build directory. They must be copied from the | 169 | # copied to the build directory. They must be copied from the |
160 | # source directory. | 170 | # source directory. |
161 | saved_dir=$PWD | 171 | saved_dir=$PWD |
162 | for parent_dir in ${S} ${B} ; do | 172 | for parent_dir in ${S} ${B} ; do |
163 | cd $parent_dir | 173 | cd $parent_dir |
@@ -188,6 +198,7 @@ do_install_ptest() { | |||
188 | cp ${B}/config.h ${D}${PTEST_PATH} | 198 | cp ${B}/config.h ${D}${PTEST_PATH} |
189 | install -D ${WORKDIR}/remove-for-aarch64 ${D}${PTEST_PATH} | 199 | install -D ${WORKDIR}/remove-for-aarch64 ${D}${PTEST_PATH} |
190 | install -D ${WORKDIR}/remove-for-all ${D}${PTEST_PATH} | 200 | install -D ${WORKDIR}/remove-for-all ${D}${PTEST_PATH} |
201 | install -D ${WORKDIR}/taskset_nondeterministic_tests ${D}${PTEST_PATH} | ||
191 | 202 | ||
192 | # Add an executable need by none/tests/bigcode | 203 | # Add an executable need by none/tests/bigcode |
193 | mkdir ${D}${PTEST_PATH}/perf | 204 | mkdir ${D}${PTEST_PATH}/perf |
@@ -211,33 +222,51 @@ do_install_ptest() { | |||
211 | \) \ | 222 | \) \ |
212 | -exec rm {} \; | 223 | -exec rm {} \; |
213 | 224 | ||
214 | # These files need to be newer so touch them. | ||
215 | touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test | ||
216 | |||
217 | # find *_annotate in ${bindir} for yocto build | ||
218 | sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest | ||
219 | sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann2.vgtest | ||
220 | |||
221 | sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest | 225 | sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest |
222 | sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest | 226 | sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest |
223 | 227 | ||
228 | # point the expanded @abs_top_builddir@ of the host to PTEST_PATH | ||
229 | sed -i s:${S}:${PTEST_PATH}:g \ | ||
230 | ${D}${PTEST_PATH}/memcheck/tests/linux/debuginfod-check.vgtest | ||
231 | |||
224 | # handle multilib | 232 | # handle multilib |
225 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest | 233 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest |
234 | sed -i s:@libexecdir@:${libexecdir}:g ${D}${PTEST_PATH}/run-ptest | ||
226 | sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest | 235 | sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest |
227 | 236 | ||
237 | # enable cachegrind ptests | ||
238 | ln -s ${bindir}/cg_annotate ${D}/${PTEST_PATH}/cachegrind/cg_annotate | ||
239 | ln -s ${bindir}/cg_diff ${D}/${PTEST_PATH}/cachegrind/cg_diff | ||
240 | ln -s ${bindir}/cg_merge ${D}/${PTEST_PATH}/cachegrind/cg_merge | ||
241 | |||
228 | # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020) | 242 | # This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020) |
229 | # https://bugs.kde.org/show_bug.cgi?id=402833 | 243 | # https://bugs.kde.org/show_bug.cgi?id=402833 |
230 | rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest | 244 | rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest |
231 | 245 | ||
246 | # This is known failure see https://bugs.kde.org/show_bug.cgi?id=435732 | ||
247 | rm ${D}${PTEST_PATH}/memcheck/tests/leak_cpp_interior.vgtest | ||
248 | |||
249 | # https://bugs.kde.org/show_bug.cgi?id=445743 | ||
250 | rm ${D}${PTEST_PATH}/drd/tests/pth_mutex_signal | ||
251 | |||
232 | # As the binary isn't stripped or debug-splitted, the source file isn't fetched | 252 | # As the binary isn't stripped or debug-splitted, the source file isn't fetched |
233 | # via dwarfsrcfiles either, so it needs to be installed manually. | 253 | # via dwarfsrcfiles either, so it needs to be installed manually. |
234 | mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/ | 254 | mkdir -p ${D}${TARGET_DBGSRC_DIR}/none/tests/ |
235 | install ${S}/none/tests/tls.c ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/ | 255 | install ${S}/none/tests/tls.c ${D}${TARGET_DBGSRC_DIR}/none/tests/ |
256 | } | ||
257 | |||
258 | do_install_ptest:append:x86-64 () { | ||
259 | # https://bugs.kde.org/show_bug.cgi?id=463456 | ||
260 | rm ${D}${PTEST_PATH}/memcheck/tests/origin6-fp.vgtest | ||
261 | # https://bugs.kde.org/show_bug.cgi?id=463458 | ||
262 | rm ${D}${PTEST_PATH}/memcheck/tests/vcpu_fnfns.vgtest | ||
263 | # https://bugs.kde.org/show_bug.cgi?id=463463 | ||
264 | rm ${D}${PTEST_PATH}/none/tests/amd64/fma.vgtest | ||
236 | } | 265 | } |
237 | 266 | ||
238 | # avoid stripping some generated binaries otherwise some of the tests will fail | 267 | # avoid stripping some generated binaries otherwise some of the tests will fail |
239 | # run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail | 268 | # run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail |
240 | INHIBIT_PACKAGE_STRIP_FILES = "\ | 269 | INHIBIT_PACKAGE_STRIP_FILES += "\ |
241 | ${PKGD}${PTEST_PATH}/none/tests/tls \ | 270 | ${PKGD}${PTEST_PATH}/none/tests/tls \ |
242 | ${PKGD}${PTEST_PATH}/none/tests/tls.so \ | 271 | ${PKGD}${PTEST_PATH}/none/tests/tls.so \ |
243 | ${PKGD}${PTEST_PATH}/none/tests/tls2.so \ | 272 | ${PKGD}${PTEST_PATH}/none/tests/tls2.so \ |