#include #include #include #define THREAD_COUNT 16 static void __attribute__((noinline)) ssp_canary_killer(void) { } static void * condef_thread(void *data __unused) { int i; i = 0; for (;;) ssp_canary_killer(); return (NULL); } static void __attribute__((__constructor__)) condef() { pthread_t thr[THREAD_COUNT]; pthread_attr_t attr; int thrc; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, 1); for (thrc = 0; thrc < THREAD_COUNT; ++thrc) { pthread_create(&thr[thrc], &attr, condef_thread, NULL); } pthread_yield(); } int main(int argc, char *argv[]) { sleep(1); return (0); }