From xemacs-m  Fri Mar 14 13:54:09 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 NAA12943
	for <xemacs-beta@xemacs.org>; Fri, 14 Mar 1997 13:54:06 -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 LAA22519 for <xemacs-beta@xemacs.org>; Fri, 14 Mar 1997 11:53:55 -0800 (PST)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id LAA06013; Fri, 14 Mar 1997 11:55:59 -0800
Sender: dmoore@sdnp5.ucsd.edu
To: XEmacs Mailing List <xemacs-beta@xemacs.org>
Subject: Re: Lisp font-lock keywords?
References: <15554.858360832@rtp.ericsson.se> <9703141810.AA00792@mage.silicon-sorcery.com>
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
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=US-ASCII
From: David Moore <dmoore@ucsd.edu>
Date: 14 Mar 1997 11:55:56 -0800
In-Reply-To: mac@silicon-sorcery.com's message of Fri, 14 Mar 97 10:10:04 PST
Message-ID: <rv7mjamenn.fsf@sdnp5.ucsd.edu>
Lines: 49
X-Mailer: Gnus v5.4.24/XEmacs 19.15

mac@silicon-sorcery.com writes:

[ problem with make-regexp ]

make-regexp seems to infinite recurse.  And here's why.  A bug
in XEmacs all-completions.

> 	  (let ((letters (let ((completion-regexp-list '("^.$")))
> 			   (all-completions "" (mapcar 'list strings)))))

all-completions is returning everything rather than just the single
character items.  I think I saw someone mail a patch for this out a
couple weeks ago, but it looks like it didn't make it into the current
betas.  Does someone have this fix?


> 	(setq max-specpdl-size (* 1024 1024))
> 
> and evaluating the same production causes xemacs-19.14 to dump core!!

Well, we can't have that!  But unfortunately this kind of core dump part
isn't anything xemacs (or fsf emacs or anyone) can do much about.
Setting max-lisp-eval-depth _too_ large in the face of infinite
recursion will cause crashes that emacs can't prevent.  When you
inf-recurse the system is piling up C function call frames on the C
stack.  Most OS's limit the stack size to something not too large (try
typing `limit' in your shell window).  Once you've exceeded this max
stack size provided by the OS, you get a memory fault that you can't
really recover from.  This is a good reason to not go willy nilly upping
the value of max-lisp-eval-depth, even if you do want to recurse fairly
deeply.

Just for humor, I notice that my stacksize on my bsdi machines defaults
to 2M.  Setting max-lisp-eval-depth to 1M means that it would only not
crash if a C stack frame took less than 2 bytes, and they take
significantly more (and you actually get more than one per recursive
call to make-regexp too).  On my sun where I normally run my emacsen,
I've raised my OS stacksize limit much higher.  I ended up killing the
process when it hit about 120M.

Perhaps the ``You can safely make it considerably larger than its
default value, if that proves inconveniently small.'' comment in the
docstring for max-lisp-eval-depth needs to be rethought.

-- 
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.

