]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: decrease recursion depth
authorIan Lance Taylor <iant@golang.org>
Fri, 22 Apr 2011 23:59:21 +0000 (16:59 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 22 Apr 2011 23:59:21 +0000 (16:59 -0700)
This permits the test to run when using gccgo on system
without split-stack support.  See
http://gcc.gnu.org/ml/gcc-patches/2011-04/msg01420.html
http://gcc.gnu.org/PR48553

R=r
CC=golang-dev
https://golang.org/cl/4440062

src/pkg/fmt/scan_test.go

index b8b3ac97547047f1749fb50b44f81b8346cb9ada..acc7cc521b9d07882beea275e3cb2b4fe7184e95 100644 (file)
@@ -810,7 +810,9 @@ func TestScanInts(t *testing.T) {
        })
 }
 
-const intCount = 1000
+// 800 is small enough to not overflow the stack when using gccgo on a
+// platform that does not support split stack.
+const intCount = 800
 
 func testScanInts(t *testing.T, scan func(*RecursiveInt, *bytes.Buffer) os.Error) {
        r := new(RecursiveInt)