diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-08-08 22:55:29 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-08-08 22:55:29 +0000 |
commit | 0717bdbfbd941c1b830fe11a21eff67dae04bdab (patch) | |
tree | 36b752cd7fa3d9897c3f58b892f0a8942e6ed389 /libgo/go | |
parent | 895aa8e11319635104e6fa0dc1468fd6aec7b5b1 (diff) | |
download | gcc-0717bdbfbd941c1b830fe11a21eff67dae04bdab.zip gcc-0717bdbfbd941c1b830fe11a21eff67dae04bdab.tar.gz gcc-0717bdbfbd941c1b830fe11a21eff67dae04bdab.tar.bz2 |
text/template: reduce maxExecDepth for gccgo further
We already lowered the limit of recursive template invocations from
100,000 to 10,000, but the tests still fail occasionally on
x86_64-pc-linux-gnu when using GNU ld (so that split stacks are not
fully functional). Reduce the limit further, to 1000, enough so that
the test passes consistently.
Permitting 1000 recursive template invocations still seems capacious
enough for real world use.
Reviewed-on: https://go-review.googlesource.com/25590
From-SVN: r239261
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/text/template/exec.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/text/template/exec.go b/libgo/go/text/template/exec.go index 7cf7bb6..c7c6d50 100644 --- a/libgo/go/text/template/exec.go +++ b/libgo/go/text/template/exec.go @@ -19,9 +19,9 @@ import ( // templates. This limit is only practically reached by accidentally // recursive template invocations. This limit allows us to return // an error instead of triggering a stack overflow. -// For gccgo we make this 10000 rather than 100000 to avoid stack overflow +// For gccgo we make this 1000 rather than 100000 to avoid stack overflow // on non-split-stack systems. -const maxExecDepth = 10000 +const maxExecDepth = 1000 // state represents the state of an execution. It's not part of the // template so that multiple executions of the same template |