summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch65
1 files changed, 54 insertions, 11 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch b/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch
index 44d707a235..f407d8191b 100644
--- a/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch
@@ -1,25 +1,31 @@
1From 90fdb0ae0418f7907f09b763343a457bdf6855fa Mon Sep 17 00:00:00 2001 1From 92fcf75d6d3903e45492b041bf4ad07787d2e58a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 27 Jan 2020 17:17:19 -0800 3Date: Mon, 27 Jan 2020 19:50:04 -0800
4Subject: [PATCH] tests: Make pthread_detatch call portable across platforms 4Subject: [PATCH] drd/tests/pth_detached3: Make pthread_detach() call portable
5 across platforms
5 6
6pthread_t is opaque type therefore we can not apply simple arithmetic to variables of pthread_t type 7pthread_t is opaque type therefore we can not apply simple arithmetic to
7this test needs to pass a invalid pthread_t handle, typcasting to uintptr_t works too and is portable 8variables of pthread_t type this test needs to pass a invalid pthread_t
8across glibc and musl 9handle, typcasting to uintptr_t works too and is portable across glibc and
10musl
9 11
10Fixes 12Fixes
11| pth_detached3.c:24:25: error: invalid use of undefined type 'struct __pthread' 13| pth_detached3.c:24:25: error: invalid use of undefined type 'struct __pthread'
12| 24 | pthread_detach(thread + 8); 14| 24 | pthread_detach(thread + 8);
13| | ^ 15| | ^
14 16
15Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36910506/] 17[ bvanassche: reformatted patch description and fixed up line numbers ]
18
19Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=92fcf75d6d3903e45492b041bf4ad07787d2e58a]
16Signed-off-by: Khem Raj <raj.khem@gmail.com> 20Signed-off-by: Khem Raj <raj.khem@gmail.com>
17--- 21---
18 drd/tests/pth_detached3.c | 3 ++- 22 drd/tests/pth_detached3.c | 3 ++-
19 1 file changed, 2 insertions(+), 1 deletion(-) 23 drd/tests/pth_detached3.stderr.exp1 | 4 ++--
24 drd/tests/pth_detached3.stderr.exp2 | 4 ++--
25 3 files changed, 6 insertions(+), 5 deletions(-)
20 26
21diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c 27diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
22index c02eef11a..efeb15b72 100644 28index c02eef1..efeb15b 100644
23--- a/drd/tests/pth_detached3.c 29--- a/drd/tests/pth_detached3.c
24+++ b/drd/tests/pth_detached3.c 30+++ b/drd/tests/pth_detached3.c
25@@ -4,6 +4,7 @@ 31@@ -4,6 +4,7 @@
@@ -39,6 +45,43 @@ index c02eef11a..efeb15b72 100644
39 45
40 fprintf(stderr, "Finished.\n"); 46 fprintf(stderr, "Finished.\n");
41 47
48diff --git a/drd/tests/pth_detached3.stderr.exp1 b/drd/tests/pth_detached3.stderr.exp1
49index 58412ec..8dd58ba 100644
50--- a/drd/tests/pth_detached3.stderr.exp1
51+++ b/drd/tests/pth_detached3.stderr.exp1
52@@ -1,11 +1,11 @@
53
54 pthread_detach(): invalid thread ID 0x........
55 at 0x........: pthread_detach (drd_pthread_intercepts.c:?)
56- by 0x........: main (pth_detached3.c:21)
57+ by 0x........: main (pth_detached3.c:22)
58
59 pthread_detach(): invalid thread ID 0x........
60 at 0x........: pthread_detach (drd_pthread_intercepts.c:?)
61- by 0x........: main (pth_detached3.c:24)
62+ by 0x........: main (pth_detached3.c:25)
63
64 Finished.
65
66diff --git a/drd/tests/pth_detached3.stderr.exp2 b/drd/tests/pth_detached3.stderr.exp2
67index bdc5cf8..e82dee1 100644
68--- a/drd/tests/pth_detached3.stderr.exp2
69+++ b/drd/tests/pth_detached3.stderr.exp2
70@@ -2,12 +2,12 @@
71 pthread_detach(): invalid thread ID 0x........
72 at 0x........: vgDrd_set_joinable (drd_pthread_intercepts.c:?)
73 by 0x........: pthread_detach (drd_pthread_intercepts.c:?)
74- by 0x........: main (pth_detached3.c:21)
75+ by 0x........: main (pth_detached3.c:22)
76
77 pthread_detach(): invalid thread ID 0x........
78 at 0x........: vgDrd_set_joinable (drd_pthread_intercepts.c:?)
79 by 0x........: pthread_detach (drd_pthread_intercepts.c:?)
80- by 0x........: main (pth_detached3.c:24)
81+ by 0x........: main (pth_detached3.c:25)
82
83 Finished.
84
42-- 85--
432.25.0 862.9.3
44 87