summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Yamshchikov <y.yamshchiko@samsung.com>2024-09-20 19:17:54 +0300
committerJinWang An <jinwang.an@samsung.com>2024-11-13 09:50:14 +0000
commita750b1607a7f1c5c8cc66108c668ba814ad6076b (patch)
treefe3a86ffad34f791e4e113f703146a440147ee36
parent99e9924709cb0e4ec762e79a7f1aa8a39b1c5953 (diff)
downloadm4-a750b1607a7f1c5c8cc66108c668ba814ad6076b.tar.gz
m4-a750b1607a7f1c5c8cc66108c668ba814ad6076b.tar.bz2
m4-a750b1607a7f1c5c8cc66108c668ba814ad6076b.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. m4 and makeinfo packets added to build requirements as they needed to process m4 scripts. Change-Id: I49582f40086de1a950e2e7d265fa25ee55e42667 Signed-off-by: Yaroslav Yamshchikov <y.yamshchiko@samsung.com> (cherry picked from commit 3eab2a79629628c20136d064db168a3e3599aa20)
-rwxr-xr-xconfigure4
-rw-r--r--m4/sigaltstack.m44
-rw-r--r--packaging/m4.spec2
3 files changed, 10 insertions, 0 deletions
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+