* reproducible but very odd make-mode crash
@ 2005-05-24 21:33 Joshua Varner
2005-05-25 21:32 ` Joshua Varner
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Varner @ 2005-05-24 21:33 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
I found a file that would consitently cause the problem from my last
e-mail - same stack trace and everything. So, i updated to CVS Head
and verified the bug is still there. I then tried to strip that file
down to a minimal test case and had some very strange results. While
trying to take out anything internal to the company I started just
replacing names with the string "stuff" and discovered that the text
was mainly irrelevant, then someone suggested i change all the text to
x's so i did that and the looping continued. For some reason the loop
is more sensitive to the length of the text and whitespace changes
than to any of the actual characters in the file.
I've attached the two makefiles that cause this problem on my system.
If they seem odd, that's because at this point they are.
Josh
[-- Attachment #2: test.mk --]
[-- Type: application/octet-stream, Size: 674 bytes --]
# $Header: SSTUFFSTUFSTUFFFSTUFFSTUFFSTFSTUFFSTFSTUFFSTFSTUFFFFFstuffstuffstuffstuffstuffstuffstu $
default: all
STUFF=../../..
include $(STUFF)/stuff
STUFF = \
stuffstuffstuffstuffs \
# stuff
# stuff
# stuff
# stuff
# stuffstuffstuffs \
# stuffstuffstuffs \
## End PRGS
stuff-stuff:
stuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuff
stuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffs
stuffstuffstuffstuffstuffstuffstuf
stuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstu
stuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffstuffs
[-- Attachment #3: test1.mk --]
[-- Type: application/octet-stream, Size: 674 bytes --]
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx
x xxxxx
x xxxxx
x xxxxx
x xxxxx
x xxxxxxxxxxxxxxxxxx
x xxxxxxxxxxxxxxxxxx
xx xxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[-- Attachment #4: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: reproducible but very odd make-mode crash
2005-05-24 21:33 reproducible but very odd make-mode crash Joshua Varner
@ 2005-05-25 21:32 ` Joshua Varner
2005-05-25 22:49 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Varner @ 2005-05-25 21:32 UTC (permalink / raw)
The following patch resolves the problem i was having (I could only
reproduce this on my machine at work with RH9.0, but it was consistent
on that machine). By restricting the regexp to the current line (sort
of) i was able to avoid whatever strange thing was causing the regexp
to loop infinitely. I tried to use string-match but received some out
of range errors, I don't know what caused those, but that may be
faster than the narrowing. I, however, didn't notice any speed issue.
Josh
P.S. I don't know if this counts as trivial or not, but if you need
papers from me just let me know what I should do.
emacs]$ cvs diff -u lisp/progmodes/make-mode.el
Index: lisp/progmodes/make-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/make-mode.el,v
retrieving revision 1.97
diff -u -r1.97 make-mode.el
--- lisp/progmodes/make-mode.el 21 May 2005 02:45:27 -0000 1.97
+++ lisp/progmodes/make-mode.el 25 May 2005 21:23:43 -0000
@@ -1687,8 +1687,10 @@
(or (eq (char-after) ?=)
(get-text-property (1- (point)) 'face)
(when (save-excursion
- (beginning-of-line)
- (looking-at makefile-dependency-regex))
+ (save-restriction
+ (narrow-to-region pt (point))
+ (beginning-of-line)
+ (looking-at makefile-dependency-regex)))
(end-of-line)
(throw 'found (point)))))
(goto-char pt))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: reproducible but very odd make-mode crash
2005-05-25 21:32 ` Joshua Varner
@ 2005-05-25 22:49 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2005-05-25 22:49 UTC (permalink / raw)
Cc: emacs-devel
> - (beginning-of-line)
> - (looking-at makefile-dependency-regex))
> + (save-restriction
> + (narrow-to-region pt (point))
> + (beginning-of-line)
> + (looking-at makefile-dependency-regex)))
Maybe it's makefile-dependency-regex which should be fixed to behave better.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-25 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-24 21:33 reproducible but very odd make-mode crash Joshua Varner
2005-05-25 21:32 ` Joshua Varner
2005-05-25 22:49 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).