Avoid tail calls which breaks the test in finalizer-exception.cs.
authorZoltan Varga <vargaz@gmail.com>
Wed, 31 Jul 2013 02:07:39 +0000 (04:07 +0200)
committerZoltan Varga <vargaz@gmail.com>
Wed, 31 Jul 2013 02:07:39 +0000 (04:07 +0200)
mono/tests/finalizer-exception.cs

index 1496dc54b476a8d1e9b3bfe11895500e59a79ea6..f11a1dcdeffd2ce3eb23d16d088a431977b999aa 100644 (file)
@@ -10,7 +10,9 @@ public class FinalizerException {
         * We allocate the exception object deep down the stack so
         * that it doesn't get pinned.
         */
-       public static void MakeException (int depth) {
+       public static unsafe void MakeException (int depth) {
+               // Avoid tail calls
+               int* values = stackalloc int [20];
                if (depth <= 0) {
                        new FinalizerException ();
                        return;
@@ -24,7 +26,7 @@ public class FinalizerException {
                        Environment.Exit (0);
                };
 
-               MakeException (100);
+               MakeException (1024);
 
                GC.Collect ();
                GC.WaitForPendingFinalizers ();