From 3eab2a79629628c20136d064db168a3e3599aa20 Mon Sep 17 00:00:00 2001 From: Yaroslav Yamshchikov Date: Fri, 20 Sep 2024 19:17:54 +0300 Subject: [PATCH] Fixed bugged SIGALTSTACK_SS_REVERSED determination SIGALTSTACK_SS_REVERSED had been set to 1 if ASan enabled because of different variable layout. This commit makes determination of sigaltstack semantics independent from variable layout. m4 and makeinfo packets added to build requirements as they needed to process m4 scripts. Change-Id: I49582f40086de1a950e2e7d265fa25ee55e42667 Signed-off-by: Yaroslav Yamshchikov --- configure | 4 ++++ m4/sigaltstack.m4 | 4 ++++ packaging/m4.spec | 2 ++ 3 files changed, 10 insertions(+) diff --git a/configure b/configure index 883336a..d2934c4 100755 --- a/configure +++ b/configure @@ -46690,8 +46690,12 @@ static void check_stack_location (volatile char *addr) } static void stackoverflow_handler (int sig) { +#if __GNUC__ >= 4 + check_stack_location (__builtin_frame_address(0)); +#else char dummy; check_stack_location (&dummy); +#endif } char mystack[2 * (1 << 24)]; int main () diff --git a/m4/sigaltstack.m4 b/m4/sigaltstack.m4 index 47e9000..f249df1 100644 --- a/m4/sigaltstack.m4 +++ b/m4/sigaltstack.m4 @@ -150,8 +150,12 @@ static void check_stack_location (volatile char *addr) } static void stackoverflow_handler (int sig) { +#if __GNUC__ >= 4 + check_stack_location (__builtin_frame_address(0)); +#else char dummy; check_stack_location (&dummy); +#endif } char mystack[2 * (1 << 24)]; int main () diff --git a/packaging/m4.spec b/packaging/m4.spec index c11b2cd..5c1c271 100644 --- a/packaging/m4.spec +++ b/packaging/m4.spec @@ -1,4 +1,6 @@ Name: m4 +BuildRequires: m4 +BuildRequires: makeinfo Version: 1.4.19 Release: 0 License: GPL-3.0+ -- 2.7.4