From: <Randy.MacLeod@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <alex.kanavin@gmail.com>
Subject: [RFC 3/5] valgrind: drop context API musl patch
Date: Wed, 8 Nov 2023 17:25:53 -0800 [thread overview]
Message-ID: <20231109012555.4074359-3-Randy.MacLeod@windriver.com> (raw)
In-Reply-To: <20231109012555.4074359-1-Randy.MacLeod@windriver.com>
From: Randy MacLeod <Randy.MacLeod@windriver.com>
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 resutls.:
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
...ntext-APIs-are-not-available-on-musl.patch | 92 -------------------
.../valgrind/valgrind_3.22.0.bb | 1 -
2 files changed, 93 deletions(-)
delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
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 @@
-From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <Randy.MacLeod@windriver.com>
-Date: Tue, 16 Oct 2018 21:27:46 -0400
-Subject: [PATCH] context APIs are not available on musl
-
-Updated patch for valgrind-3.14
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
-
-Apply same patch to drd/tests/swapcontext.c
-for valgrind-3.17.
-
-Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775]
-
-Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
----
- drd/tests/swapcontext.c | 6 ++++++
- memcheck/tests/linux/stack_changes.c | 7 ++++++-
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c
-index 622c70bc5..5e72bb0f3 100644
---- a/drd/tests/swapcontext.c
-+++ b/drd/tests/swapcontext.c
-@@ -20,6 +20,7 @@
-
- #define STACKSIZE (PTHREAD_STACK_MIN + 4096)
-
-+#ifdef __GLIBC__
- typedef struct thread_local {
- ucontext_t uc[3];
- size_t nrsw;
-@@ -67,9 +68,11 @@ void *worker(void *data)
- swapcontext(&tlocal->uc[0], &tlocal->uc[1]);
- return NULL;
- }
-+#endif
-
- int main(int argc, char *argv[])
- {
-+#ifdef __GLIBC__
- enum { NR = 32 };
- thread_local_t tlocal[NR];
- pthread_t thread[NR];
-@@ -94,6 +97,9 @@ int main(int argc, char *argv[])
-
- for (i = 0; i < NR; i++)
- pthread_join(thread[i], NULL);
-+#else
-+ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
-+#endif
-
- return 0;
- }
-diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
-index 7f97b90a5..a26cb4ae6 100644
---- a/memcheck/tests/linux/stack_changes.c
-+++ b/memcheck/tests/linux/stack_changes.c
-@@ -10,6 +10,7 @@
- // This test is checking the libc context calls (setcontext, etc.) and
- // checks that Valgrind notices their stack changes properly.
-
-+#ifdef __GLIBC__
- typedef ucontext_t mycontext;
-
- mycontext ctx1, ctx2, oldc;
-@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
-
- return ret;
- }
-+#endif
-
- int main(int argc, char **argv)
- {
-+#ifdef __GLIBC__
- int c1 = init_context(&ctx1);
- int c2 = init_context(&ctx2);
-
-@@ -66,6 +69,8 @@ int main(int argc, char **argv)
- //free(ctx1.uc_stack.ss_sp);
- VALGRIND_STACK_DEREGISTER(c2);
- //free(ctx2.uc_stack.ss_sp);
--
-+#else
-+ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
-+#endif
- return 0;
- }
---
-2.17.1
-
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
index 6dcd028075..0ebf08eb28 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.22.0.bb
@@ -25,7 +25,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
- file://0002-context-APIs-are-not-available-on-musl.patch \
file://0003-correct-include-directive-path-for-config.h.patch \
file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
--
2.42.0
next prev parent reply other threads:[~2023-11-09 1:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 1:25 [RFC 1/5] valgrind: make ptest depend on all components Randy.MacLeod
2023-11-09 1:25 ` [RFC 2/5] valgrind: update from 3.21.0 to 3.22.0 Randy.MacLeod
2023-11-09 1:25 ` Randy.MacLeod [this message]
2023-11-09 1:25 ` [RFC 4/5] valgrind: drop mips32 opcode patch Randy.MacLeod
2023-11-09 1:25 ` [RFC 5/5] valgrind: drop Make-local-function-static patch Randy.MacLeod
[not found] ` <1795D005CB9AFA17.15940@lists.openembedded.org>
2023-11-09 1:31 ` [OE-core] [RFC 2/5] valgrind: update from 3.21.0 to 3.22.0 Randy MacLeod
[not found] ` <1795D005D4290C63.6123@lists.openembedded.org>
2023-11-09 1:39 ` [OE-core] [RFC 3/5] valgrind: drop context API musl patch Randy MacLeod
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231109012555.4074359-3-Randy.MacLeod@windriver.com \
--to=randy.macleod@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox