If it is invalid, GetThreadBacktraceContext will fail anyway.
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
# include "../Darwin/DarwinThreadHelpers.h"
|
# include "../Darwin/DarwinThreadHelpers.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern uint64_t GetInvalidThreadId();
|
||||||
extern const char *g_pCrashHandlerArgv0;
|
extern const char *g_pCrashHandlerArgv0;
|
||||||
|
|
||||||
static void safe_print(int fd, ...)
|
static void safe_print(int fd, ...)
|
||||||
@@ -420,6 +421,12 @@ void ForceCrashHandlerDeadlock( const CString& reason, const BacktraceContext *c
|
|||||||
/* iCrashHandle comes from ThreadImpl_Pthreads::GetThreadId. */
|
/* iCrashHandle comes from ThreadImpl_Pthreads::GetThreadId. */
|
||||||
void ForceCrashHandlerDeadlock( CString reason, uint64_t iCrashHandle )
|
void ForceCrashHandlerDeadlock( CString reason, uint64_t iCrashHandle )
|
||||||
{
|
{
|
||||||
|
if ( iCrashHandle == GetInvalidThreadId() )
|
||||||
|
{
|
||||||
|
ForceCrashHandler( reason );
|
||||||
|
_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
BacktraceContext ctx;
|
BacktraceContext ctx;
|
||||||
|
|
||||||
/* How can this possibly work without suspending the thread first? What
|
/* How can this possibly work without suspending the thread first? What
|
||||||
|
|||||||
Reference in New Issue
Block a user