Hi, developers, thank you for your checking. It seems the lock NewThread->StartMutex is not released correctly when !KSUCCESS(KernelStatus)?
|
pthread_mutex_lock(&(NewThread->StartMutex)); |
|
|
|
// |
|
// Block all possible signals in the new thread while it sets itself up, |
|
// including the internal signals. |
|
// |
|
|
|
FILL_SIGNAL_SET(InternalSignals); |
|
NewThread->SignalMask = OsSetSignalBehavior(SignalMaskBlocked, |
|
SignalMaskOperationOverwrite, |
|
&InternalSignals); |
|
|
|
KernelStatus = OsCreateThread(NULL, |
|
0, |
|
ClpThreadStart, |
|
NewThread, |
|
NewThread->Attribute.StackBase, |
|
NewThread->Attribute.StackSize, |
|
NewThread->OsData, |
|
&(NewThread->ThreadId)); |
|
|
|
OsSetSignalBehavior(SignalMaskBlocked, |
|
SignalMaskOperationOverwrite, |
|
&(NewThread->SignalMask)); |
|
|
|
if (!KSUCCESS(KernelStatus)) { |
|
Status = ClConvertKstatusToErrorNumber(KernelStatus); |
|
ClpDestroyThreadKeyData(NewThread); |
|
ClpDestroyThread(NewThread); |
|
return Status; |
|
} |
Hi, developers, thank you for your checking. It seems the lock
NewThread->StartMutexis not released correctly when!KSUCCESS(KernelStatus)?os/apps/libc/dynamic/pthread/pthread.c
Lines 248 to 278 in 460ae51