From 60c2aae02350364564599b358d267046417ad472 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 19 Jun 2019 12:46:17 +0200 Subject: [PATCH] qtcreator: Set thread pool stack size to 2MiB Visual C++ sets 1MiB as stack size, macOSX has 512KiB. Both crash with a specified project. MinGW sets 2MiB as stack size, the specified project loads just fine. Fixes: QTCREATORBUG-22496 Change-Id: I6f19e74a681977e4fe1dceee292ea9c838999a1a Reviewed-by: Nikolai Kosjar Reviewed-by: Eike Ziller --- src/plugins/cpptools/cppmodelmanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 99d008aa3d1..c82355b31b0 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -513,6 +514,10 @@ CppModelManager::CppModelManager() d->m_indexingSupporter = nullptr; d->m_enableGC = true; + // Visual C++ has 1MiB, macOSX has 512KiB + if (Utils::HostOsInfo::isWindowsHost() || Utils::HostOsInfo::isMacHost()) + d->m_threadPool.setStackSize(2 * 1024 * 1024); + qRegisterMetaType >(); connect(this, &CppModelManager::sourceFilesRefreshed, this, &CppModelManager::onSourceFilesRefreshed);