diff options
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0001-tests-Make-pthread_detatch-call-portable-across-plat.patch | 65 |
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 @@ | |||
| 1 | From 90fdb0ae0418f7907f09b763343a457bdf6855fa Mon Sep 17 00:00:00 2001 | 1 | From 92fcf75d6d3903e45492b041bf4ad07787d2e58a Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 27 Jan 2020 17:17:19 -0800 | 3 | Date: Mon, 27 Jan 2020 19:50:04 -0800 |
| 4 | Subject: [PATCH] tests: Make pthread_detatch call portable across platforms | 4 | Subject: [PATCH] drd/tests/pth_detached3: Make pthread_detach() call portable |
| 5 | across platforms | ||
| 5 | 6 | ||
| 6 | pthread_t is opaque type therefore we can not apply simple arithmetic to variables of pthread_t type | 7 | pthread_t is opaque type therefore we can not apply simple arithmetic to |
| 7 | this test needs to pass a invalid pthread_t handle, typcasting to uintptr_t works too and is portable | 8 | variables of pthread_t type this test needs to pass a invalid pthread_t |
| 8 | across glibc and musl | 9 | handle, typcasting to uintptr_t works too and is portable across glibc and |
| 10 | musl | ||
| 9 | 11 | ||
| 10 | Fixes | 12 | Fixes |
| 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 | ||
| 15 | Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36910506/] | 17 | [ bvanassche: reformatted patch description and fixed up line numbers ] |
| 18 | |||
| 19 | Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=92fcf75d6d3903e45492b041bf4ad07787d2e58a] | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 20 | Signed-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 | ||
| 21 | diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c | 27 | diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c |
| 22 | index c02eef11a..efeb15b72 100644 | 28 | index 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 | ||
| 48 | diff --git a/drd/tests/pth_detached3.stderr.exp1 b/drd/tests/pth_detached3.stderr.exp1 | ||
| 49 | index 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 | |||
| 66 | diff --git a/drd/tests/pth_detached3.stderr.exp2 b/drd/tests/pth_detached3.stderr.exp2 | ||
| 67 | index 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 | -- |
| 43 | 2.25.0 | 86 | 2.9.3 |
| 44 | 87 | ||
