summaryrefslogtreecommitdiff
path: root/stdlib/tst-setcontext.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-12-12 18:13:35 +0000
committerJakub Jelinek <jakub@redhat.com>2007-12-12 18:13:35 +0000
commit574e283890a6ca92325a06dafa76ff307a8019a2 (patch)
tree055e44e24a55fb4863e5d9cdc04e320cde52ffe9 /stdlib/tst-setcontext.c
parenta162e5955f7e324be82d9318bbcbe869c66ffb86 (diff)
Updated to fedora-glibc-20071212T1051
Diffstat (limited to 'stdlib/tst-setcontext.c')
-rw-r--r--stdlib/tst-setcontext.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/stdlib/tst-setcontext.c b/stdlib/tst-setcontext.c
index e8b1e22671..28bf230264 100644
--- a/stdlib/tst-setcontext.c
+++ b/stdlib/tst-setcontext.c
@@ -123,9 +123,26 @@ test_stack(volatile int a, volatile int b,
volatile int global;
+
+static int back_in_main;
+
+
+static void
+check_called (void)
+{
+ if (back_in_main == 0)
+ {
+ puts ("program did no reach main again");
+ _exit (1);
+ }
+}
+
+
int
main (void)
{
+ atexit (check_called);
+
char st1[32768];
puts ("making contexts");
@@ -185,6 +202,7 @@ main (void)
exit (1);
}
puts ("back at main program");
+ back_in_main = 1;
if (was_in_f1 == 0)
{