all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Marty Rosenberg <marty.rosenberg@gmail.com>, 18022@debbugs.gnu.org
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	[thread overview]
Message-ID: <20140716214144.GA4052@acm.acm> (raw)
In-Reply-To: <8338e28t9r.fsf@gnu.org>

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 <marty.rosenberg@gmail.com>

> > 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	other threads:[~2014-07-16 21:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15  3:13 bug#18022: 24.3; Emacs hard locks when attempting to do a replacement with ^M in it Marty Rosenberg
2014-07-15 14:19 ` Eli Zaretskii
     [not found]   ` <CAGv7PEAuRvfarf=Lumi-x-S2UCiK-29=DfET1On6jpyBX1y9=w@mail.gmail.com>
2014-07-15 16:46     ` Eli Zaretskii
2014-07-16 21:41       ` Alan Mackenzie [this message]
2014-07-19 20:33         ` Alan Mackenzie
2014-07-23 18:41           ` Alan Mackenzie
     [not found]           ` <20140723184146.GA2969@acm.acm>
2014-07-25 22:23             ` Stefan Monnier
2014-10-04 18:38             ` Alan Mackenzie
     [not found]             ` <20141004183822.GA3144@acm.acm>
2014-10-04 22:31               ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140716214144.GA4052@acm.acm \
    --to=acm@muc.de \
    --cc=18022@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=marty.rosenberg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.