m4: Do not use SIGSTKSZ
PATCH 1/4 m4: Do not use SIGSTKSZ
Fixes../../m4-1.4.18/lib/c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
Signed-off-by Khem Raj <[email protected]>
--- meta/recipes-devtools/m4/m4-1.4.18.inc | 1 + .../m4/0001-c-stack-stop-using-SIGSTKSZ.patch | 84 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 meta/recipes-devtools/m4/m4/0001-c-stack-stop-using-SIGSTKSZ.patch
meta/recipes-devtools/m4/m4-1.4.18.inc +1 -0
@@ -9,6 +9,7 @@ inherit autotools texinfo ptest SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ file://ac_config_links.patch \ file://m4-1.4.18-glibc-change-work-around.patch \ + file://0001-c-stack-stop-using-SIGSTKSZ.patch \ " SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ file://run-ptest \
meta/recipes-devtools/m4/m4/0001-c-stack-stop-using-SIGSTKSZ.patch new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH 2/4 findutils: Do not use SIGSTKSZ
Signed-off-by Khem Raj <[email protected]>
--- .../0001-c-stack-stop-using-SIGSTKSZ.patch | 84 +++++++++++++++++++ .../diffutils/diffutils_3.7.bb | 1 + 2 files changed, 85 insertions(+) create mode 100644 meta/recipes-extended/diffutils/diffutils/0001-c-stack-stop-using-SIGSTKSZ.patch
meta/recipes-extended/diffutils/diffutils/0001-c-stack-stop-using-SIGSTKSZ.patch new file +84 -0
@@ -0,0 +1,84 @@ +From 87b3a8f9ceb2cf0a5c8b72e460465fb9ff2d62d9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 30 Apr 2021 17:40:36 -0700 +Subject: [PATCH] c-stack: stop using SIGSTKSZ + +This patch is required with glibc 2.34+ +based on gnulib [1] + +[1] https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f9e2b20a12a230efa30f1d479563ae07d276a94b + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + lib/c-stack.c | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +diff --git a/lib/c-stack.c b/lib/c-stack.c +index 9bbe6fe..e0874c9 100644 +--- a/lib/c-stack.c ++++ b/lib/c-stack.c +@@ -51,13 +51,14 @@ + typedef struct sigaltstack stack_t; + #endif + #ifndef SIGSTKSZ +-# define SIGSTKSZ 16384 +-#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384 ++#define get_sigstksz() (16384) ++#elif HAVE_LIBSIGSEGV + /* libsigsegv 2.6 through 2.8 have a bug where some architectures use + more than the Linux default of an 8k alternate stack when deciding + if a fault was caused by stack overflow. */ +-# undef SIGSTKSZ +-# define SIGSTKSZ 16384 ++#define get_sigstksz() ((SIGSTKSZ) < 16384 ? 16384 : (SIGSTKSZ)) ++#else ++#define get_sigstksz() ((SIGSTKSZ)) + #endif + + #include <stdlib.h> +@@ -136,7 +137,8 @@ die (int signo) + /* Storage for the alternate signal stack. */ + static union + { +- char buffer[SIGSTKSZ]; ++ /* allocate buffer with size from get_sigstksz() */ ++ char *buffer; + + /* These other members are for proper alignment. There's no + standard way to guarantee stack alignment, but this seems enough +@@ -208,10 +210,11 @@ c_stack_action (void (*action) (int)) + program_error_message = _("program error"); + stack_overflow_message = _("stack overflow"); + ++ alternate_signal_stack.buffer = malloc(get_sigstksz()); + /* Always install the overflow handler. */ + if (stackoverflow_install_handler (overflow_handler, + alternate_signal_stack.buffer, +- sizeof alternate_signal_stack.buffer)) ++ get_sigstksz())) + { + errno = ENOTSUP; + return -1; +@@ -284,14 +287,15 @@ c_stack_action (void (*action) (int)) + stack_t st; + struct sigaction act; + st.ss_flags = 0; ++ alternate_signal_stack.buffer = malloc(get_sigstksz()); + # if SIGALTSTACK_SS_REVERSED + /* Irix mistakenly treats ss_sp as the upper bound, rather than + lower bound, of the alternate stack. */ +- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ - sizeof (void *); +- st.ss_size = sizeof alternate_signal_stack.buffer - sizeof (void *); ++ st.ss_sp = alternate_signal_stack.buffer + get_sigstksz() - sizeof (void *); ++ st.ss_size = get_sigstksz() - sizeof (void *); + # else + st.ss_sp = alternate_signal_stack.buffer; +- st.ss_size = sizeof alternate_signal_stack.buffer; ++ st.ss_size = get_sigstksz(); + # endif + r = sigaltstack (&st, NULL); + if (r != 0) +-- +2.31.1 +
meta/recipes-extended/diffutils/diffutils_3.7.bb +1 -0
@@ -6,6 +6,7 @@ require diffutils.inc SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ file://run-ptest \ file://0001-Skip-strip-trailing-cr-test-case.patch \ + file://0001-c-stack-stop-using-SIGSTKSZ.patch \ " SRC_URI[md5sum] = "4824adc0e95dbbf11dfbdfaad6a1e461"
Signature · 1 line
2.31.1
PATCH 3/4 bluez: Fix shadowing of pause function from libc
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- meta/recipes-connectivity/bluez5/bluez5.inc | 1 + ...se-funciton-to-avoid-shadowing-glibc.patch | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
@@ -52,6 +52,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ file://0001-test-gatt-Fix-hung-issue.patch \ + file://0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch \ " S = "${WORKDIR}/bluez-${PV}"
meta/recipes-connectivity/bluez5/bluez5/0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH 4/4 valgrind: Disable leak_cpp_interior test
In reply to Khem RajThis test is known to fail and especially is prominent with GCC-11 where stdc++17 is enabled by default
Signed-off-by Khem Raj <[email protected]>
--- meta/recipes-devtools/valgrind/valgrind_3.17.0.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-devtools/valgrind/valgrind_3.17.0.bb +3 -0
@@ -233,6 +233,9 @@ do_install_ptest() { # https://bugs.kde.org/show_bug.cgi?id=402833 rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest + # This is known failure see https://bugs.kde.org/show_bug.cgi?id=435732 + rm ${D}${PTEST_PATH}/memcheck/tests/leak_cpp_interior.vgtest + # As the binary isn't stripped or debug-splitted, the source file isn't fetched # via dwarfsrcfiles either, so it needs to be installed manually. mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
Signature · 1 line
2.31.1