Is this a bug in the pthread implementation or am I missing something obvious in the test case?
I confirm it is a bug in our current pthread implementation (since eglibc 2.13-22). It exhibits only when pthread_exit() is called without any prior pthread_create(). I hope proper fix will be in eglibc 2.13-25. Petr