Mercurial > hg > xemacs-beta
diff src/regex.c @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | ac2d302a0011 |
children | 441bb1e64a06 |
line wrap: on
line diff
--- a/src/regex.c Mon Aug 13 08:48:43 2007 +0200 +++ b/src/regex.c Mon Aug 13 08:49:20 2007 +0200 @@ -1044,7 +1044,7 @@ #if defined (MATCH_MAY_ALLOCATE) /* 4400 was enough to cause a crash on Alpha OSF/1, whose default stack limit is 2mb. */ -int re_max_failures = 4000; +int re_max_failures = 20000; #else int re_max_failures = 2000; #endif @@ -1267,7 +1267,10 @@ #endif /* We push at most this many items on the stack. */ -#define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) +/* We used to use (num_regs - 1), which is the number of registers + this regexp will save; but that was changed to 5 + to avoid stack overflow for a regexp with lots of parens. */ +#define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS) /* We actually push this many items. */ #define NUM_FAILURE_ITEMS \