diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-08 01:44:17 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-08 01:44:17 (GMT) |
commit | 9f0660744ceb5e04221cf4090d5e68aa8a718baa (patch) | |
tree | cea2c1c0dc09b070dfb1811e3b66647c00ca21b4 /generic/regc_nfa.c | |
parent | 52c2de3cb8140e9017dbdc839a06b995670d2ed6 (diff) | |
download | tcl-9f0660744ceb5e04221cf4090d5e68aa8a718baa.zip tcl-9f0660744ceb5e04221cf4090d5e68aa8a718baa.tar.gz tcl-9f0660744ceb5e04221cf4090d5e68aa8a718baa.tar.bz2 |
[3603557]: Increase the maximum depth of recursion used when duplicating an
automaton in response to encountering a "wild" RE that hit the previous limit.
Allow the limit (DUPTRAVERSE_MAX_DEPTH) to be set by defining its value in the
Makefile. Problem reported by Jonathan Mills.
Diffstat (limited to 'generic/regc_nfa.c')
-rw-r--r-- | generic/regc_nfa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 4fb3ea6..2c2397f 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -759,7 +759,9 @@ duptraverse( * Arbitrary depth limit. Needs tuning, but this value is sufficient to * make all normal tests (not reg-33.14) pass. */ -#define DUPTRAVERSE_MAX_DEPTH 500 +#ifndef DUPTRAVERSE_MAX_DEPTH +#define DUPTRAVERSE_MAX_DEPTH 700 +#endif if (depth++ > DUPTRAVERSE_MAX_DEPTH) { NERR(REG_ESPACE); |