From xemacs-m  Thu Jan 30 10:30:19 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id KAA12584 for <xemacs-beta@xemacs.org>; Thu, 30 Jan 1997 10:30:18 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id IAA15710;
	Thu, 30 Jan 1997 08:41:09 -0800
To: xemacs-beta@xemacs.org
Subject: Re: regex dump on DUNIX
References: <9701301207.AA12266@fornet.gvc.dec.com>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Steve Carney's message of Thu, 30 Jan 1997 13:07:17 +0100
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: text/plain; charset=US-ASCII
Date: 30 Jan 1997 08:41:07 -0800
Message-ID: <m2enf39kv0.fsf@altair.xemacs.org>
Lines: 59
X-Mailer: Gnus v5.4.8/XEmacs 20.0

Steve Carney writes:

> Hardware  : DEC 3000-500
> OS        : Digital UNIX V3.2D (41)
> Compiler  : gcc-2.7.2
> Libraries : X11R5, Motif
> XEmacs    : 20.0-b93 (full kit)

> Configured for `alpha-dec-osf3.2'.
                  ^^^^^

> I startup up vm and got a dump before any text hit the screen.  This is
> the same regex problems I was having before, but they were only with
> much more complicated regexs (10+ subexpressions).  This is some kind of
> allocation bug that I haven't been able to resolve.

> I noticed Steve's recent posting to comp.emacs.xemacs indicating there
> have been regex changes in this beta.  Is that right (I'd check my copy,
> but I deleted b92 before ensuring that b93 was ok)?

The following change was made to regex.c between b90 and b91:

Index: regex.c
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/regex.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- regex.c	1996/12/18 22:44:03	1.1.1.1
+++ regex.c	1997/01/23 05:30:14	1.2
@@ -1125,7 +1125,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
@@ -1348,7 +1348,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						\


It appears to fix everyone else's problems with running up against
regexp limits, but note the comment about alphas.  Try replacing the
re_max_failures assignment in regex.c with 4000 and see if that helps.
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

