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