From f9d26af309379ea2244be6a4a5169b228acf24fd Mon Sep 17 00:00:00 2001 From: Yaroslav Yamshchikov Date: Fri, 20 Sep 2024 19:23:39 +0300 Subject: 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. makeinfo packet added to build requirements. Change-Id: Ic76af456980d49d961d03b7814c9e2ee0aa661ee Signed-off-by: Yaroslav Yamshchikov --- configure | 4 ++++ m4/sigaltstack.m4 | 4 ++++ packaging/diffutils.spec | 1 + 3 files changed, 9 insertions(+) diff --git a/configure b/configure index 5cddf21..78faf57 100755 --- a/configure +++ b/configure @@ -38002,8 +38002,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 03180fc..4c68c31 100644 --- a/m4/sigaltstack.m4 +++ b/m4/sigaltstack.m4 @@ -151,8 +151,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/diffutils.spec b/packaging/diffutils.spec index a4e20de..aa3ce9e 100644 --- a/packaging/diffutils.spec +++ b/packaging/diffutils.spec @@ -8,6 +8,7 @@ Group: System/Utilities Source: %{name}-%{version}.tar.xz Source1001: diffutils.manifest BuildRequires: xz +BuildRequires: makeinfo Provides: diff = %{version} Obsoletes: diff < %{version} -- cgit v1.2.3