diff options
author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2024-02-12 14:05:00 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-15 21:30:14 +0000 |
commit | 04625c92a12800b36df564247644c2e821793d98 (patch) | |
tree | 1f275410b5fe5120803b86d2176c89774aaf70ef /meta/recipes-devtools/valgrind | |
parent | b1aaadb8286de6eb446bfd10c0d2943d067f136e (diff) | |
download | poky-04625c92a12800b36df564247644c2e821793d98.tar.gz |
valgrind: update from 3.21.0 to 3.22.0
Full release notes: https://valgrind.org/docs/manual/dist.news.html
In summary, there is a new configure option: --with-gdbscripts-dir
that lets you install the gdb valgrind python monitor scripts in a specific location.
It's not used in the valgrind recipe yet. Also, there were a few Memcheck and Cachegrind
improvements made and many bugs fixed.
The update required removing the patch:
0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch
as it's dealt with by these commits:
f7e4bb4af Bug 382034 - Testcases build fixes for musl
306232d40 musl: another fix for building testcases
as described on: https://bugs.kde.org/show_bug.cgi?id=382034
Drop: 002-context-APIs-are-not-available-on-musl.patch
since this is handled in a different way by the following
upstream commits:
c9e88f345 configure, drd: Only build the swapcontext test if swapcontext() is available
7cd4d7816 memcheck/tests/linux/stack_changes: Only run this test if setcontext() is available
And the that tracked the error:
https://bugs.kde.org/show_bug.cgi?id=434775
is closed.
No regression in musl qemux86-64/kvm ptest results.
Drop: 0001-fix-opcode-not-supported-on-mips32-linux.patch
The resolved (works for me) upstream defect rejected this patch:
https://bugs.kde.org/show_bug.cgi?id=396905
and suggested using CFLAGS="-mips32". With this patch dropped, the
qemumips build succeeds perhaps due to using -march=mips32r2
Drop: 0001-Make-local-functions-static-to-avoid-assembler-error.patch
since this was fixed upstream by commit:
d6da48fe5 mips: use local labels for do_acasW()
Confirmed with:
MACHINE=qemumips TCLIBC=musl bitbake valgrind
Ptest Resutls for qemux86-64/kvm
glibc:
=== Test Summary ===
TOTAL: 792
PASSED: 759
FAILED: 14
SKIPPED: 19
musl:
=== Test Summary ===
TOTAL: 792
PASSED: 559
FAILED: 211
SKIPPED: 22
(From OE-Core rev: a04c7714e9f69b7a3fc36adecf7e55c0fcfaa891)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch | 182 | ||||
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch | 82 | ||||
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch | 30 | ||||
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch | 92 | ||||
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.22.0.bb (renamed from meta/recipes-devtools/valgrind/valgrind_3.21.0.bb) | 6 |
5 files changed, 1 insertions, 391 deletions
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-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-none-tests-x86-linux-seg_override.c-add-missing-incl.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch deleted file mode 100644 index 5e36c28523..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 978d9ed7f857f2cdcd2a8632f3c2feb56b99c825 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Mon, 8 May 2023 11:56:35 +0200 | ||
4 | Subject: [PATCH] none/tests/x86-linux/seg_override.c: add missing include for | ||
5 | musl builds | ||
6 | |||
7 | Otherwise SYS_modify_ldt is undefined. | ||
8 | |||
9 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=382034] | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | |||
12 | --- | ||
13 | none/tests/x86-linux/seg_override.c | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c | ||
17 | index ca8fbfe..4ef4394 100644 | ||
18 | --- a/none/tests/x86-linux/seg_override.c | ||
19 | +++ b/none/tests/x86-linux/seg_override.c | ||
20 | @@ -3,6 +3,10 @@ | ||
21 | #include <errno.h> | ||
22 | #include <string.h> | ||
23 | #include "../../../config.h" | ||
24 | +#if defined(MUSL_LIBC) | ||
25 | +#include <syscall.h> | ||
26 | +#include <unistd.h> | ||
27 | +#endif | ||
28 | |||
29 | |||
30 | /* Stuff from Wine. */ | ||
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 7f0e38cb95..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b 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 | Updated patch for valgrind-3.14 | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
10 | |||
11 | Apply same patch to drd/tests/swapcontext.c | ||
12 | for valgrind-3.17. | ||
13 | |||
14 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775] | ||
15 | |||
16 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
17 | --- | ||
18 | drd/tests/swapcontext.c | 6 ++++++ | ||
19 | memcheck/tests/linux/stack_changes.c | 7 ++++++- | ||
20 | 2 files changed, 12 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c | ||
23 | index 622c70bc5..5e72bb0f3 100644 | ||
24 | --- a/drd/tests/swapcontext.c | ||
25 | +++ b/drd/tests/swapcontext.c | ||
26 | @@ -20,6 +20,7 @@ | ||
27 | |||
28 | #define STACKSIZE (PTHREAD_STACK_MIN + 4096) | ||
29 | |||
30 | +#ifdef __GLIBC__ | ||
31 | typedef struct thread_local { | ||
32 | ucontext_t uc[3]; | ||
33 | size_t nrsw; | ||
34 | @@ -67,9 +68,11 @@ void *worker(void *data) | ||
35 | swapcontext(&tlocal->uc[0], &tlocal->uc[1]); | ||
36 | return NULL; | ||
37 | } | ||
38 | +#endif | ||
39 | |||
40 | int main(int argc, char *argv[]) | ||
41 | { | ||
42 | +#ifdef __GLIBC__ | ||
43 | enum { NR = 32 }; | ||
44 | thread_local_t tlocal[NR]; | ||
45 | pthread_t thread[NR]; | ||
46 | @@ -94,6 +97,9 @@ int main(int argc, char *argv[]) | ||
47 | |||
48 | for (i = 0; i < NR; i++) | ||
49 | pthread_join(thread[i], NULL); | ||
50 | +#else | ||
51 | + printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); | ||
52 | +#endif | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c | ||
57 | index 7f97b90a5..a26cb4ae6 100644 | ||
58 | --- a/memcheck/tests/linux/stack_changes.c | ||
59 | +++ b/memcheck/tests/linux/stack_changes.c | ||
60 | @@ -10,6 +10,7 @@ | ||
61 | // This test is checking the libc context calls (setcontext, etc.) and | ||
62 | // checks that Valgrind notices their stack changes properly. | ||
63 | |||
64 | +#ifdef __GLIBC__ | ||
65 | typedef ucontext_t mycontext; | ||
66 | |||
67 | mycontext ctx1, ctx2, oldc; | ||
68 | @@ -51,9 +52,11 @@ int init_context(mycontext *uc) | ||
69 | |||
70 | return ret; | ||
71 | } | ||
72 | +#endif | ||
73 | |||
74 | int main(int argc, char **argv) | ||
75 | { | ||
76 | +#ifdef __GLIBC__ | ||
77 | int c1 = init_context(&ctx1); | ||
78 | int c2 = init_context(&ctx2); | ||
79 | |||
80 | @@ -66,6 +69,8 @@ int main(int argc, char **argv) | ||
81 | //free(ctx1.uc_stack.ss_sp); | ||
82 | VALGRIND_STACK_DEREGISTER(c2); | ||
83 | //free(ctx2.uc_stack.ss_sp); | ||
84 | - | ||
85 | +#else | ||
86 | + printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); | ||
87 | +#endif | ||
88 | return 0; | ||
89 | } | ||
90 | -- | ||
91 | 2.17.1 | ||
92 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb index 0903008e61..dc00edb24e 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.21.0.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb | |||
@@ -25,10 +25,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
25 | file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ | 25 | file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ |
26 | 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 \ |
27 | file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ | 27 | file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ |
28 | file://0002-context-APIs-are-not-available-on-musl.patch \ | ||
29 | file://0003-correct-include-directive-path-for-config.h.patch \ | 28 | file://0003-correct-include-directive-path-for-config.h.patch \ |
30 | file://0001-fix-opcode-not-supported-on-mips32-linux.patch \ | ||
31 | file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ | ||
32 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ | 29 | file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \ |
33 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ | 30 | file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \ |
34 | file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \ | 31 | file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \ |
@@ -36,9 +33,8 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
36 | 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 \ |
37 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ | 34 | file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ |
38 | file://0001-docs-Disable-manual-validation.patch \ | 35 | file://0001-docs-Disable-manual-validation.patch \ |
39 | file://0001-none-tests-x86-linux-seg_override.c-add-missing-incl.patch \ | ||
40 | " | 36 | " |
41 | SRC_URI[sha256sum] = "10ce1618bb3e33fad16eb79552b0a3e1211762448a0d7fce11c8a6243b9ac971" | 37 | SRC_URI[sha256sum] = "c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c" |
42 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | 38 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" |
43 | 39 | ||
44 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' | 40 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' |