From b64b4431c20afd9e39c1463e736f998ef450688f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 12 Aug 2013 21:12:36 +0200 Subject: [PATCH] avoid deadlock in cache() during spec/cache loading if we end up calling cache() from within the initialization of the base context, we cannot wait for for the completion of that initialization before we proceed, obviously. Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca Reviewed-by: Joerg Bornemann Reviewed-by: Daniel Teske --- src/shared/proparser/qmakebuiltins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/proparser/qmakebuiltins.cpp b/src/shared/proparser/qmakebuiltins.cpp index 90512b1a5ba..0f60a5c4ee3 100644 --- a/src/shared/proparser/qmakebuiltins.cpp +++ b/src/shared/proparser/qmakebuiltins.cpp @@ -1544,7 +1544,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( break; #ifdef PROEVALUATOR_THREAD_SAFE QMutexLocker locker(&baseEnv->mutex); - if (baseEnv->inProgress) { + if (baseEnv->inProgress && baseEnv->evaluator != this) { // The env is still in the works, but it may be already past the cache // loading. So we need to wait for completion and amend it as usual. QThreadPool::globalInstance()->releaseThread();