summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Yamshchikov <y.yamshchiko@samsung.com>2024-09-20 19:23:39 +0300
committerDongkyun Son <dongkyun.s@samsung.com>2024-10-10 10:45:18 +0900
commitf9d26af309379ea2244be6a4a5169b228acf24fd (patch)
tree2f551e8dff20e9fef97cafccf375ce8d0c1749eb
parent09a3802b00c74bda57911086aeb04ce726be15bd (diff)
downloaddiffutils-sandbox/y.yamshchiko/asan.tar.gz
diffutils-sandbox/y.yamshchiko/asan.tar.bz2
diffutils-sandbox/y.yamshchiko/asan.zip
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 <y.yamshchiko@samsung.com>
-rwxr-xr-xconfigure4
-rw-r--r--m4/sigaltstack.m44
-rw-r--r--packaging/diffutils.spec1
3 files changed, 9 insertions, 0 deletions
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}