[svn] r6509: nemerle/trunk/ncc/testsuite/test.n
dragonfox
svnadmin at nemerle.org
Fri Aug 11 11:36:57 CEST 2006
Log:
Workaround stack overflow in test.exe (same as in ncc.exe)
Author: dragonfox
Date: Fri Aug 11 11:36:55 2006
New Revision: 6509
Modified:
nemerle/trunk/ncc/testsuite/test.n
Modified: nemerle/trunk/ncc/testsuite/test.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/test.n (original)
+++ nemerle/trunk/ncc/testsuite/test.n Fri Aug 11 11:36:55 2006
@@ -649,8 +649,30 @@
}
}
+ private static mutable global_exit_code : int;
+
public static Main () : int
{
+ def needs_bigger_stack ()
+ {
+ typeof (object).Assembly.GetType ("System.RuntimeType") != null
+ }
+ if (needs_bigger_stack ()) {
+ def thread = System.Threading.Thread (main_with_exit_code, 12 * 1024 * 1024);
+ thread.Start ();
+ thread.Join ();
+ } else
+ main_with_exit_code ();
+ global_exit_code
+ }
+
+ private static main_with_exit_code () : void
+ {
+ global_exit_code = main ()
+ }
+
+ private static main () : int
+ {
mutable dnet_env = "";
mutable runtime_parms = [];
mutable nem_comp = "ncc.exe";
More information about the svn
mailing list