mysterious hang in pthread_create
Andriy Gapon
avg at icyb.net.ua
Thu Aug 28 21:42:02 UTC 2008
on 28/08/2008 23:52 Andriy Gapon said the following:
> So can all this be a result of an exception thrown before threads are
> initialized?
This seems to be it.
I can reproduce the issue with the following small C++ program:
/*********************************************/
#include <pthread.h>
static void * thrfunc(void * arg)
{
return NULL;
}
int main(void)
{
pthread_t thr;
try {
throw int(1);
}
catch (...) {}
pthread_create(&thr, NULL, thrfunc, NULL);
return 0;
}
/*********************************************/
$ uname -a
... FreeBSD 7.0-STABLE #9: Sun Jul 6 17:13:22 EEST 2008 ... i386
--
Andriy Gapon
More information about the freebsd-threads
mailing list