mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-28 06:14:10 +08:00
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
This commit is contained in:
parent
895aa8e113
commit
0717bdbfbd
@ -1,4 +1,4 @@
|
|||||||
672db63f342c99bdc7ed46f040038440f429e600
|
3b9c57a35370f26e6cf5839084e367e75e45ec97
|
||||||
|
|
||||||
The first line of this file holds the git revision number of the last
|
The first line of this file holds the git revision number of the last
|
||||||
merge done from the gofrontend repository.
|
merge done from the gofrontend repository.
|
||||||
|
@ -19,9 +19,9 @@ import (
|
|||||||
// templates. This limit is only practically reached by accidentally
|
// templates. This limit is only practically reached by accidentally
|
||||||
// recursive template invocations. This limit allows us to return
|
// recursive template invocations. This limit allows us to return
|
||||||
// an error instead of triggering a stack overflow.
|
// 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.
|
// on non-split-stack systems.
|
||||||
const maxExecDepth = 10000
|
const maxExecDepth = 1000
|
||||||
|
|
||||||
// state represents the state of an execution. It's not part of the
|
// state represents the state of an execution. It's not part of the
|
||||||
// template so that multiple executions of the same template
|
// template so that multiple executions of the same template
|
||||||
|
Loading…
Reference in New Issue
Block a user