macOS: Completely disable lldb backtraces in QtTestLib on Apple Silicon

They result in lldb hanging, which was previously only a case when SIP
was enabled, but can now be reproduced on macOS 15 even with SIP disabled.

 https://github.com/llvm/llvm-project/issues/53254

Pick-to: 6.8
Change-Id: Ifa09f8cf22522b5a1028db1f250ebe9e1543cf9d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 50d5914f28b535790f8eca6210adad24fe76940b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2025-01-07 14:19:21 +01:00 committed by Qt Cherry-pick Bot
parent b04935ed9f
commit b07580da56

View File

@ -258,10 +258,16 @@ void prepareStackTrace()
return;
#if defined(Q_OS_MACOS)
// Try to handle https://github.com/llvm/llvm-project/issues/53254,
// where LLDB will hang and fail to provide a valid stack trace.
# if defined(Q_PROCESSOR_ARM)
return;
#else
#define CSR_ALLOW_UNRESTRICTED_FS (1 << 1)
std::optional<uint32_t> sipConfiguration = qt_mac_sipConfiguration();
if (!sipConfiguration || !(*sipConfiguration & CSR_ALLOW_UNRESTRICTED_FS))
return; // LLDB will fail to provide a valid stack trace
return;
# endif
#endif
#ifdef Q_OS_UNIX