summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/DafnyDriver/DafnyDriver.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/DafnyDriver/DafnyDriver.cs b/Source/DafnyDriver/DafnyDriver.cs
index 8046a7ac..2bda7cf0 100644
--- a/Source/DafnyDriver/DafnyDriver.cs
+++ b/Source/DafnyDriver/DafnyDriver.cs
@@ -26,6 +26,18 @@ namespace Microsoft.Dafny
public static int Main(string[] args)
{
+ int ret = 0;
+ var thread = new System.Threading.Thread(
+ new System.Threading.ThreadStart(() =>
+ { ret = ThreadMain(args); }),
+ 0x10000000); // 256MB stack size to prevent stack overflow
+ thread.Start();
+ thread.Join();
+ return ret;
+ }
+
+ public static int ThreadMain(string[] args)
+ {
Contract.Requires(cce.NonNullElements(args));
printer = new DafnyConsolePrinter();