Unwinding phase for non-i386 builds is already skipped via asm .seh_handler
directive where is specified only @except keyword.

For i386 builds the skip needs to be explicit in SetThreadName_SEH handler
itself as i386 build does not use asm .seh_handler directive.
---
 mingw-w64-libraries/winpthreads/src/thread.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mingw-w64-libraries/winpthreads/src/thread.c 
b/mingw-w64-libraries/winpthreads/src/thread.c
index 3251c2cbb9c5..c1100c20e420 100644
--- a/mingw-w64-libraries/winpthreads/src/thread.c
+++ b/mingw-w64-libraries/winpthreads/src/thread.c
@@ -91,6 +91,12 @@ SetThreadName_SEH (EXCEPTION_RECORD *ExceptionRecord, PVOID 
EstablisherFrame, CO
    * SEH handlers like this one return value from EXCEPTION_DISPOSITION enum 
which has CamelCase constants.
    * UPPER_CASE EXCEPTION_CONTINUE_SEARCH and CamelCase 
ExceptionContinueSearch are different constants.
    */
+
+#if defined(__i386__)
+  if (ExceptionRecord->ExceptionFlags & EXCEPTION_UNWINDING)
+    return ExceptionContinueSearch;
+#endif
+
   if (!(ExceptionRecord->ExceptionFlags & EXCEPTION_NONCONTINUABLE) &&
       ExceptionRecord->ExceptionCode == EXCEPTION_SET_THREAD_NAME)
     return ExceptionContinueExecution;
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to