From b07580da56e0156104666c40e3bbe5b5a877354b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 7 Jan 2025 14:19:21 +0100 Subject: [PATCH] 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 (cherry picked from commit 50d5914f28b535790f8eca6210adad24fe76940b) Reviewed-by: Qt Cherry-pick Bot --- src/testlib/qtestcrashhandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcrashhandler.cpp b/src/testlib/qtestcrashhandler.cpp index 2a62044b14e..bc4e1629dd9 100644 --- a/src/testlib/qtestcrashhandler.cpp +++ b/src/testlib/qtestcrashhandler.cpp @@ -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 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