forked from qt-creator/qt-creator
Work around QRegularExpression crashes on macOS with Rosetta
Looks like the regular expression jitting is not reentrant when running under Rosetta for some reason. It was crashing when loading bigger subdir .pro files which regular expressions in it, like qtcreator.pro. Disable JIT if we run under Rosetta. Task-number: QTBUG-97085 Change-Id: Icbab1ca8f62afa9cc86045983e84087a7694b5ad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
@@ -492,6 +492,11 @@ int main(int argc, char **argv)
|
||||
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
|
||||
}
|
||||
|
||||
if (Utils::HostOsInfo::isRunningUnderRosetta()) {
|
||||
// work around QTBUG-97085: QRegularExpression jitting is not reentrant under Rosetta
|
||||
qputenv("QT_ENABLE_REGEXP_JIT", "0");
|
||||
}
|
||||
|
||||
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX");
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
|
Reference in New Issue
Block a user