[gnu.emacs.bug] bug in skip-chars-forward

hasker@CS.UIUC.EDU (Rob Hasker) (01/19/90)

I don't regularly read the bug announcements for gnuemacs, so I apologize
if this has already been fixed.  I found a way to hard-crash gnuemacs (on
the Multimax that I'm on, I get an `IOT trap' error).  First, I load the
following defun:

	(defun x ()
	  (interactive)
	  (skip-chars-forward "^\n" (+ (point) 3)))

Then I set debug-on-error to `t', go to a new buffer (say `y'), and type
`M-x x\n\n' (where the \n's are newlines, of course).  This is a pretty
minimal sequence; I do not get the trap if debug-on-error is nil or I use
carriage returns instead of newlines.  But I suspect that I'd get the trap
sooner or later if I did something slightly different

I believe the bug is in skip-chars-forward which apparently does not check
for the end of the buffer correctly.  Of course, the work-around is to make
sure one isn't at the end of the buffer, but I thought you'd like to know
of the problem.  This is with version 18.55.2.  Just so you can see exactly
what happened, here's a typescript of the bug in action (I'm on a terminal
emulating a vt100):

Script started on Thu Jan 18 10:34:37 1990
1+ m: ge -q -l x.el
[?1h=[?1h=[;H[2J
2+ m: 3+ m: 
3+ m: 
3+ m: ^D
script done on Thu Jan 18 10:35:29 1990

Let me know if you have any questions.

Rob Hasker			University of Illinois at Urbana-Champaign
hasker@cs.uiuc.edu		{uunet|convex|pur-ee}!uiucdcs!hasker