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 <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2019-06-19 12:46:17 +02:00
committed by Cristian Adam
parent 77c90f0856
commit 60c2aae023

View File

@@ -62,6 +62,7 @@
#include <projectexplorer/projectmacro.h> #include <projectexplorer/projectmacro.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QCoreApplication> #include <QCoreApplication>
@@ -513,6 +514,10 @@ CppModelManager::CppModelManager()
d->m_indexingSupporter = nullptr; d->m_indexingSupporter = nullptr;
d->m_enableGC = true; 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<QSet<QString> >(); qRegisterMetaType<QSet<QString> >();
connect(this, &CppModelManager::sourceFilesRefreshed, connect(this, &CppModelManager::sourceFilesRefreshed,
this, &CppModelManager::onSourceFilesRefreshed); this, &CppModelManager::onSourceFilesRefreshed);