blob: 3549db432f38afa13597f725986a6c57adbb0717 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* test stack unwinding for a new thread */
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include "Test.cpp"
static void *
thr_routine(void *arg __unused)
{
Test test;
pthread_exit(NULL);
printf("Bug, thread shouldn't be here\n");
}
int
main()
{
pthread_t td;
pthread_create(&td, NULL, thr_routine, NULL);
pthread_join(td, NULL);
check_destruct();
return (0);
}
|