From xemacs-m  Mon Feb 24 17:16:34 1997
Received: from mailbox2.ucsd.edu (mailbox2.ucsd.edu [132.239.1.54])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA19649
	for <xemacs-beta@xemacs.org>; Mon, 24 Feb 1997 17:16:32 -0600 (CST)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by mailbox2.ucsd.edu (8.8.5/8.6.9) with SMTP id PAA11308 for <xemacs-beta@xemacs.org>; Mon, 24 Feb 1997 15:16:32 -0800 (PST)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id PAA29513; Mon, 24 Feb 1997 15:18:56 -0800
Sender: dmoore@sdnp5.ucsd.edu
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Subject: regex.c patch
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
Mail-Copies-To: never
From: David Moore <dmoore@ucsd.edu>
Date: 24 Feb 1997 15:18:55 -0800
Message-ID: <rvsp2lg5cw.fsf@sdnp5.ucsd.edu>
Lines: 39
X-Mailer: Gnus v5.4.8/XEmacs 19.15


	I'm still catching up from being out of town (512 messages to
go), so this may have already been addressed.  Here's a patch to regex.c
which fixes something I think is broken in our version.  If someone has
a repeatable crash in the mule/regex world, please see if this helps
any.  This patch is against 19.15b90, which is the latest I have, but it
should apply to the more recent versions.

--- regex.c.orig	Mon Feb 24 15:09:28 1997
+++ regex.c	Mon Feb 24 15:14:33 1997
@@ -4597,10 +4597,19 @@
                   = *p2 == (unsigned char) endline ? '\n' : p2[2];
 #endif
 
+#if 1
+                /* dmoore@ucsd.edu - emacs 19.34 uses this: */
+
                 if ((re_opcode_t) p1[3] == exactn
-		    && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
-			  && (p2[1 + p1[4] / BYTEWIDTH]
-			      & (1 << (p1[4] % BYTEWIDTH)))))
+                    && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
+                          && (p2[2 + p1[5] / BYTEWIDTH]
+                              & (1 << (p1[5] % BYTEWIDTH)))))
+#else
+                if ((re_opcode_t) p1[3] == exactn
+                    && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
+                          && (p2[1 + p1[4] / BYTEWIDTH]
+                              & (1 << (p1[4] % BYTEWIDTH)))))
+#endif
                   {
   		    p[-3] = (unsigned char) pop_failure_jump;
                     DEBUG_PRINT3 ("  %c != %c => pop_failure_jump.\n",

-- 
David Moore <dmoore@ucsd.edu>       | Computer Systems Lab      __o
UCSD Dept. Computer Science - 0114  | Work: (619) 534-8604    _ \<,_
La Jolla, CA 92093-0114             | Fax:  (619) 534-1445   (_)/ (_)
<URL:http://oj.egbt.org/dmoore/>    | In a cloud bones of steel.

