Article View: gnu.emacs.bug
Article #87698Emacs crash with query-replace-regexp
From: peter
Date: Fri, 02 Sep 1994 08:38
Date: Fri, 02 Sep 1994 08:38
78 lines
2898 bytes
2898 bytes
Hello,
I wrote a little macro to convert #include "..." to #include <...>. It
caused my emacs to crash. Here's how:
1. Here's my .emacs:
------------------------------ CUT HERE -------------------------------------
(defun fix () (interactive) (query-replace-regexp "^\\(# *include *\\)\"\\(.*\\)\"" "\\1<\\2>"))
------------------------------ CUT HERE -------------------------------------
2. Here's a C source file (called junk.c)
------------------------------ CUT HERE -------------------------------------
#include "foo.h"
------------------------------ CUT HERE -------------------------------------
3. This causes emacs to crash:
% emacs junk.c
[emacs comes up in an X window]
ESC-X fix
[Segmentation fault (core dumped)]
Emacs also crashes if I enter the command manually, instead of
defining it in my .emacs file, i.e.:
ESC-X query-replace-regexp ^\(# *include *\)\"\(.*\)\"" "\1<\2>
4. The problem only seems to happen when the buffer being edited is
unmodified. If I type, say, 'A' followed by <backspace>, so that
the buffer content is the same, but the little status line shows
--**-Emacs: instead of -----Emacs:, then the problem does not
occur.
Another possible hint: With other (longer) files and the same
procedure, emacs will sometimes crash, sometimes survive but
replace the first "include" with a string of NUL characters
(displayed as ^@^@^@^@^@)
- Emacs version
`M-x emacs-version RET' reports:
GNU Emacs 19.22.4 of Wed Jan 5 1994 on pumpkin (hpux)
- Machine type
HP 9000/715 running HP-UX - `uname -a' outputs:
HP-UX leek A.09.03 C 9000/715 2016156441 32-user license
- Operands given to the configure command
Unknown
- Modifications of Emacs source code
Believed to be completely unmodified
- Terminal
I am displaying on an SGI Indigo 17" 1024x768 with 8 bit planes,
running IRIX 5.1.1
The problem does not occur if I run the same version of emacs on
the Indigo and display locally.
If you are interested in fixing this problem and need more information,
I'll be pleased to help you.
Sincerely,
Peter Helfer
Technical Details
Message-ID:
<9408291853.AA18095@vedge.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!math.ohio-state.edu!cis.ohio-state.edu!vedge.UUCP!peterShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,ea0dab2dffada992,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-02 04:30:46 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!math.ohio-state.edu!cis.ohio-state.edu!vedge.UUCP!peter From: peter@vedge.UUCP Newsgroups: gnu.emacs.bug Subject: Emacs crash with query-replace-regexp Date: 2 Sep 1994 04:38:28 -0400 Organization: GNUs Not Usenet Lines: 79 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408291853.AA18095@vedge.com>