Increase alternate signal stack size.

Creating an alternate signal stack with a size of SIGSTKSZ (usually 8k) is
not enough on some targets because unw_cursor_t is bigger than that already.
Since the size of unw_cursor_t is part of the ABI the UNW_TDEP_CURSOR_LEN
can't be changed without breaking existent code. Therefore size of the
alternate signal stack has been increased to 1 MiB.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
diff --git a/tests/Gtest-bt.c b/tests/Gtest-bt.c
index 152e2af..1a40496 100644
--- a/tests/Gtest-bt.c
+++ b/tests/Gtest-bt.c
@@ -45,6 +45,8 @@
 typedef RETSIGTYPE (*sighandler_t) (int);
 #endif
 
+#define SIG_STACK_SIZE 0x100000
+
 int verbose;
 int num_errors;
 
@@ -226,10 +228,10 @@
 
   if (verbose)
     printf ("\nBacktrace across signal handler on alternate stack:\n");
-  stk.ss_sp = malloc (SIGSTKSZ);
+  stk.ss_sp = malloc (SIG_STACK_SIZE);
   if (!stk.ss_sp)
-    panic ("failed to allocate SIGSTKSZ (%u) bytes\n", SIGSTKSZ);
-  stk.ss_size = SIGSTKSZ;
+    panic ("failed to allocate %u bytes\n", SIG_STACK_SIZE);
+  stk.ss_size = SIG_STACK_SIZE;
   stk.ss_flags = 0;
   if (sigaltstack (&stk, NULL) < 0)
     panic ("sigaltstack: %s\n", strerror (errno));
diff --git a/tests/Gtest-trace.c b/tests/Gtest-trace.c
index 1e966b2..311848f 100644
--- a/tests/Gtest-trace.c
+++ b/tests/Gtest-trace.c
@@ -44,6 +44,8 @@
 typedef RETSIGTYPE (*sighandler_t) (int);
 #endif
 
+#define SIG_STACK_SIZE 0x100000
+
 int verbose;
 int num_errors;
 
@@ -240,10 +242,10 @@
 
   if (verbose)
     printf ("\nBacktrace across signal handler on alternate stack:\n");
-  stk.ss_sp = malloc (SIGSTKSZ);
+  stk.ss_sp = malloc (SIG_STACK_SIZE);
   if (!stk.ss_sp)
-    panic ("failed to allocate SIGSTKSZ (%u) bytes\n", SIGSTKSZ);
-  stk.ss_size = SIGSTKSZ;
+    panic ("failed to allocate %u bytes\n", SIG_STACK_SIZE);
+  stk.ss_size = SIG_STACK_SIZE;
   stk.ss_flags = 0;
   if (sigaltstack (&stk, NULL) < 0)
     panic ("sigaltstack: %s\n", strerror (errno));