Warning, /graphics/krita/3rdparty/ext_qt/0129-Use-DebugBreak-instead-of-fast-fail-exception-to-abo.patch is written in an unsupported language. File is not indexed.

0001 From 5d368320f93c75e5e94ed34309f8d1baf27cda14 Mon Sep 17 00:00:00 2001
0002 From: Alvin Wong <alvinhochun@gmail.com>
0003 Date: Wed, 18 May 2022 23:09:51 +0800
0004 Subject: [PATCH] Use DebugBreak instead of fast-fail exception to abort
0005 
0006 Fast-fail exception bypasses DrMingw which we use to dump backtraces on
0007 crashes. To make DrMingw work when Qt does an abort, use DebugBreak at
0008 first so DrMingw is not bypassed.
0009 ---
0010  src/corelib/global/qlogging.cpp | 10 ++++++++++
0011  1 file changed, 10 insertions(+)
0012 
0013 diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
0014 index 3c82097cfe..6c565a8bd2 100644
0015 --- a/src/corelib/global/qlogging.cpp
0016 +++ b/src/corelib/global/qlogging.cpp
0017 @@ -1891,6 +1891,16 @@ static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const
0018      // [support.start.term]). So we bypass std::abort() and directly
0019      // terminate the application.
0020  
0021 +    // Fast-fail exception bypasses DrMingw and we don't want that. Try
0022 +    // something else first. A debug breakpoint (`int 3` on x86) should
0023 +    // terminate the process when not attached to a debugger, and it should
0024 +    // trigger DrMingw to dump the backtrace.
0025 +#  if defined(Q_CC_MSVC)
0026 +    __debugbreak();
0027 +#  else
0028 +    DebugBreak();
0029 +#  endif
0030 +
0031  #  if defined(Q_CC_MSVC) && !defined(Q_CC_INTEL)
0032      if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
0033          __fastfail(FAST_FAIL_FATAL_APP_EXIT);
0034 -- 
0035 2.24.1.windows.2
0036