8 #if defined(HAVE_SYS_PRCTL_H)
10 #endif /* HAVE_SYS_PRCTL_H */
11 #include <sys/types.h>
16 static pthread_t children
[3];
18 void bad_things(int offset
)
20 char* m
= malloc(sizeof(char)*offset
);
25 void* child_fn_2 ( void* arg
)
27 const char* threadname
= "012345678901234";
29 # if !defined(VGO_darwin)
30 pthread_setname_np(pthread_self(), threadname
);
32 pthread_setname_np(threadname
);
40 void* child_fn_1 ( void* arg
)
42 const char* threadname
= "try1";
45 # if !defined(VGO_darwin)
46 pthread_setname_np(pthread_self(), threadname
);
48 pthread_setname_np(threadname
);
52 VALGRIND_PRINTF("%s", "I am in child_fn_1\n");
54 r
= pthread_create(&children
[2], NULL
, child_fn_2
, NULL
);
57 r
= pthread_join(children
[2], NULL
);
63 void* child_fn_0 ( void* arg
)
69 r
= pthread_create(&children
[1], NULL
, child_fn_1
, NULL
);
72 r
= pthread_join(children
[1], NULL
);
78 int main(int argc
, const char** argv
)
84 r
= pthread_create(&children
[0], NULL
, child_fn_0
, NULL
);
87 r
= pthread_join(children
[0], NULL
);