Further harden glibc malloc metadata against 1-byte overflows.
[glibc.git] / nptl / tst-exit2.c
blob0b7a2caf6ae3eacb379eced1ce7c59d8dcae07a7
1 #include <pthread.h>
2 #include <signal.h>
3 #include <stdio.h>
4 #include <string.h>
5 #include <unistd.h>
7 static int do_test (void);
9 #define TEST_FUNCTION do_test ()
10 #include "../test-skeleton.c"
12 static void *
13 tf (void *arg)
15 while (1)
16 sleep (100);
18 /* NOTREACHED */
19 return NULL;
23 static int
24 do_test (void)
26 pthread_t th;
28 int e = pthread_create (&th, NULL, tf, NULL);
29 if (e != 0)
31 printf ("create failed: %s\n", strerror (e));
32 return 1;
35 delayed_exit (1);
37 /* Terminate only this thread. */
38 pthread_exit (NULL);
40 /* NOTREACHED */
41 return 1;