APPROVE COMMIT 21.4
Thanks for the patch, Malcolm. It will appear in 21.4.20.
- Vin
Malcolm Purvis <malcolmp(a)xemacs.org> writes:
[I have already posted this to -beta but since Pete Forman has
recently posted
a bug report that this fixes I'll make it an offical patch.]
This patch changes the maximum number of regex failure points to the values
currently found in GNU Emacs. This fixes the "Stack overflow: Stack overflow
in regexp matcher" error that can occur then using next-error on large
compilation buffers.
Malcolm
src/ChangeLog addition:
2006-03-21 Malcolm Purvis <malcolmp(a)xemacs.org>
* regex.c: Bump INIT_FAILURE_ALLOC and re_max_failures to the
current values found in GNU Emacs.
xemacs-21.5-micro-patches source patch:
Diff command: cvs -q diff -u
Files affected: src/regex.c
Index: src/regex.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/regex.c,v
retrieving revision 1.56
diff -u -r1.56 regex.c
--- src//regex.c 2005/03/09 04:59:31 1.56
+++ src//regex.c 2006/03/21 10:34:45
@@ -1314,7 +1314,7 @@
when matching. If this number is exceeded, we allocate more
space, so it is not a hard limit. */
#ifndef INIT_FAILURE_ALLOC
-#define INIT_FAILURE_ALLOC 5
+#define INIT_FAILURE_ALLOC 20
#endif
/* Roughly the maximum number of failure points on the stack. Would be
@@ -1324,9 +1324,9 @@
#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 = 20000;
+int re_max_failures = 40000;
#else
-int re_max_failures = 2000;
+int re_max_failures = 4000;
#endif
union fail_stack_elt
--
Malcolm Purvis <malcolmp(a)xemacs.org>