In the latest version of Common C++ I get a segfault
from said method.
I inherit from PosixThread in a simple class. I create
potentially thousands of threads in the applications
lifetime but each thread only executes for
approximately 10 seconds max before exited. However,
after an indetermninate (e.g. sporadic) amount of time
the main (calling) process or thread segfaults here:
#0 ost::Thread::detach (this=0xb4b00470, st=0x0) at
909 if(!rtn && priv->_tid)
As gdb shows (this is from a core dump). This happens
in more than one application.
Does 'priv' suddenly become unavailable or something
after pthread_create returns? The thread is (obviously)
created in a detached state. Perhaps the executing
thread has already exited by the time the calling
thread gets to test priv->foobar?
Log in to post a comment.