libCom: exitWait() from thread exit handler corrupts stack
The epicsThreadCallEntryPoint() function stores a pointer to a local variable in epicsThread::pWaitReleaseFlag. Calling epicsAtThreadExit::exitWait() from that thread's epicsAtThreadExit() handler writes to this pointer after epicsThreadCallEntryPoint() has returned. Thus corrupting the stack. Set pWaitReleaseFlag=NULL before return to prevent this. fixes lp:1558206
This commit is contained in:
@@ -109,6 +109,7 @@ extern "C" void epicsThreadCallEntryPoint ( void * pPvt )
|
||||
// once the terminated flag is set and we release the lock
|
||||
// then the "this" pointer must not be touched again
|
||||
}
|
||||
pThread->pWaitReleaseFlag = NULL;
|
||||
}
|
||||
|
||||
bool epicsThread::beginWait () throw ()
|
||||
|
||||
Reference in New Issue
Block a user