aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-08-07 17:58:46 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-26 18:47:44 +0100
commitfbcf269207b41978221fba796bf3625536e7e68c (patch)
tree5cc049dc6945aed2a748b261363f3cf84f905eb6
parentcc0affa523aabbbfe2d01462d5deb77ff02c71da (diff)
Core/CrashHandler: Skip logging stack trace of the thread writing the crash log, it was launched by windows with same context as crashing thread
(cherry picked from commit dd34651f4d42ca598b2f1b2ed32e27b4742f4be7)
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index beca7b43c05..16d14803205 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -428,6 +428,7 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables)
THREADENTRY32 te32;
DWORD dwOwnerPID = GetCurrentProcessId();
+ DWORD dwCurrentTID = GetCurrentThreadId();
m_hProcess = GetCurrentProcess();
// Take a snapshot of all running threads
HANDLE hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
@@ -451,7 +452,7 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables)
// associated with the specified process
do
{
- if (te32.th32OwnerProcessID == dwOwnerPID)
+ if (te32.th32OwnerProcessID == dwOwnerPID && te32.th32ThreadID != dwCurrentTID)
{
CONTEXT context;
context.ContextFlags = 0xffffffff;