summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/sigaltstack.m44
1 files changed, 4 insertions, 0 deletions
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 ()