diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 88cd043d1e359a2e9d5b97a9f384d7911601c427..ea075f9cbda902e7eba873484ba8e946224f043d 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -90,6 +90,8 @@ static ReturnedValue throwTypeError(CallContext *ctx)
     return ctx->throwTypeError();
 }
 
+const int MinimumStackSize = 256; // in kbytes
+
 quintptr getStackLimit()
 {
     quintptr stackLimit;
@@ -149,7 +151,7 @@ quintptr getStackLimit()
 #endif
 
     // 256k slack
-    return stackLimit + 256*1024;
+    return stackLimit + MinimumStackSize*1024;
 }
 
 
@@ -203,6 +205,8 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
     // set up stack limits
     jsStackLimit = jsStackBase + JSStackLimit/sizeof(Value);
     cStackLimit = getStackLimit();
+    if (!recheckCStackLimits())
+        qFatal("Fatal: Not enough stack space available for QML. Please increase the process stack size to more than %d KBytes.", MinimumStackSize);
 
     Scope scope(this);