Hi all,
Our bug scanner has reported a data race issue at thread.cpp#L131 and thread.cpp#L202.
Followings are code snippets.
void Thread::_runChild()
{
setName(boost::lexical_cast<std::string>(_impl->index));
_impl->id._impl->pthread = pthread_self();
and
bool Thread::start()
{
...
// avoid memleak, we don't use pthread_join
pthread_detach(_impl->id._impl->pthread);
The race occurs when _impl->id._impl->pthread = pthread_self(); and pthread_detach(_impl->id._impl->pthread); are executed simultaneously.
SourceBrella Inc.,
Yu
Hi all,
Our bug scanner has reported a data race issue at thread.cpp#L131 and thread.cpp#L202.
Followings are code snippets.
and
The race occurs when _impl->id._impl->pthread = pthread_self(); and pthread_detach(_impl->id._impl->pthread); are executed simultaneously.
SourceBrella Inc.,
Yu