* [libgo] Reduce fmt_test.TestScanInts recursion depth (PR go/48553)
@ 2011-04-18 17:31 Rainer Orth
2011-04-23 0:34 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2011-04-18 17:31 UTC (permalink / raw)
To: gcc-patches; +Cc: Ian Lance Taylor
As described in the PR, fmt FAILs on targets without split-stack support
(anything but Linux, it seems) since the 32-bit TestScanInts tests
overflows the default thread stack of 1 MB. To avoid this, I've reduced
the recursion depth from 1000 to 800 which lets the test pass.
Rainer
2011-04-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR go/48553
* go/fmt/scan_test.go (intCount): Reduce to 800.
diff --git a/libgo/go/fmt/scan_test.go b/libgo/go/fmt/scan_test.go
--- a/libgo/go/fmt/scan_test.go
+++ b/libgo/go/fmt/scan_test.go
@@ -810,7 +810,7 @@ func TestScanInts(t *testing.T) {
})
}
-const intCount = 1000
+const intCount = 800
func testScanInts(t *testing.T, scan func(*RecursiveInt, *bytes.Buffer) os.Error) {
r := new(RecursiveInt)
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [libgo] Reduce fmt_test.TestScanInts recursion depth (PR go/48553)
2011-04-18 17:31 [libgo] Reduce fmt_test.TestScanInts recursion depth (PR go/48553) Rainer Orth
@ 2011-04-23 0:34 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-04-23 0:34 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> As described in the PR, fmt FAILs on targets without split-stack support
> (anything but Linux, it seems) since the 32-bit TestScanInts tests
> overflows the default thread stack of 1 MB. To avoid this, I've reduced
> the recursion depth from 1000 to 800 which lets the test pass.
Thanks. Committed upstream and brought back to libgo as follows.
Committed to mainline.
Ian
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 480 bytes --]
diff -r 62a12171bf58 libgo/go/fmt/scan_test.go
--- a/libgo/go/fmt/scan_test.go Fri Apr 22 17:00:44 2011 -0700
+++ b/libgo/go/fmt/scan_test.go Fri Apr 22 17:06:09 2011 -0700
@@ -810,7 +810,9 @@
})
}
-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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-23 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 17:31 [libgo] Reduce fmt_test.TestScanInts recursion depth (PR go/48553) Rainer Orth
2011-04-23 0:34 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).