bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18022: 24.3; Emacs hard locks when attempting to do a replacement wi


From: Alan Mackenzie
Subject: bug#18022: 24.3; Emacs hard locks when attempting to do a replacement with ^M in it.
Date: Wed, 16 Jul 2014 21:41:44 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, Marty and Eli.

On Tue, Jul 15, 2014 at 07:46:08PM +0300, Eli Zaretskii wrote:
> > Date: Tue, 15 Jul 2014 12:28:10 -0400
> > From: Marty Rosenberg <address@hidden>

> > Oh. I also opened a new file called "test.cc". I think that cc-mode is part
> > of the issue.

> Yes, that makes the difference.

> Alan, can you take a look?

OK, I've made some progress.  Just to be specific what the problem is:
When in 64-bit Gnu/Linux, a C++ file is exactly this (where ^M is a
carriage return)

template <bool b>^MSimulatorBase<b>::foobar()

(there being no newline at EOB), font-locking hangs, though hitting a
frame changing command followed by C-g often enough will switch frames.

With the help of elp-instrument-package RET c- RET, it is apparent that
c-beginning-of-macro is being called in a loop.  By putting this at the
start of c-beginning-of-macro:

  (message "1. %s" (backtrace-frame 1))
  (message "2. %s" (backtrace-frame 2))
  (message "3. %s" (backtrace-frame 3))
  (message "4. %s" (backtrace-frame 4))
  (message "5. %s" (backtrace-frame 5))
  (message "6. %s" (backtrace-frame 6))
  (message "7. %s" (backtrace-frame 7))
  (message "8. %s" (backtrace-frame 8))
  (message "9. %s" (backtrace-frame 9))
  (message "a. %s" (backtrace-frame 10))
  (message "b. %s" (backtrace-frame 11))
  (message "c. %s" (backtrace-frame 12))

, it becomes clear that the looping is in c-backward-sws, the function
generated by macro c-backward-syntactic-ws, which is being called from
c-font-lock-<>-arglists.

I don't know c-backward-sws very well, but it looks like that's about to
change.  ;-)

Marty, thanks for such a high quality bug report.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]