X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fgc-graystack-stress.cs;h=79743cd249664beb3986a257c37cdf06d5445ba8;hb=fcf4e1b7bfb8e7f9f9910b651ce9fddaa4466380;hp=7d711d9a259a7dca28f474dd175f0dac85e2f5c3;hpb=12b712c8917ac1411c3f85436845ec53d8c33a18;p=mono.git diff --git a/mono/tests/gc-graystack-stress.cs b/mono/tests/gc-graystack-stress.cs index 7d711d9a259..79743cd2496 100644 --- a/mono/tests/gc-graystack-stress.cs +++ b/mono/tests/gc-graystack-stress.cs @@ -33,7 +33,11 @@ class Program { if (args.Length > 0) width = Math.Max (width, Int32.Parse (args [0])); - int depth = 10000; + // Windows x64 only has 1 MB of stack per thread which is less than other x86 64-bit OSes. + // Using 10000 for depth will cause a stack overflow on Windows x64. 5000 will fit. + int platform = (int) Environment.OSVersion.Platform; + bool isWin64 = !(platform == 4 || platform == 128) && Environment.Is64BitProcess; + int depth = isWin64 ? 5000 : 10000; if (args.Length > 1) depth = Math.Max (depth, Int32.Parse (args [1]));