unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Daniel R. Grayson" <danielrichardgrayson@gmail.com>
Cc: 55744@debbugs.gnu.org
Subject: bug#55744: infinite loop
Date: Wed, 01 Jun 2022 17:35:04 +0200	[thread overview]
Message-ID: <87a6aw4ct3.fsf@gnus.org> (raw)
In-Reply-To: <CABWu70GoQjcc-LJufu9NP4DSOuYuBtsOzLpj-bNJYrTV_BPouA@mail.gmail.com> (Daniel R. Grayson's message of "Wed, 1 Jun 2022 07:27:22 -0700")

"Daniel R. Grayson" <danielrichardgrayson@gmail.com> writes:

> Okay, I did that, and it seems to be this:
>
> (defconst M2-mode-font-lock-keywords
>           '("///\\(/?/?[^/]\\|\\(//\\)*////[^/]\\)*\\(//\\)*///" .
> 'font-lock-string-face) )

That's a regexp with a lot of backtracking, I think (i.e., elements that
can be matched both by the ?'s as well as the two *'s).  So matching
this will be slow, which results in the hangs you're seeing when Emacs
is trying to match that to the text in the buffer.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2022-06-01 15:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 19:49 bug#55744: infinite loop Daniel R. Grayson
2022-05-31 20:12 ` Lars Ingebrigtsen
2022-05-31 20:26   ` Daniel R. Grayson
2022-05-31 20:28     ` Lars Ingebrigtsen
2022-05-31 20:42       ` Daniel R. Grayson
2022-06-01  2:29         ` Lars Ingebrigtsen
2022-06-01 14:27           ` Daniel R. Grayson
2022-06-01 15:35             ` Lars Ingebrigtsen [this message]
2022-06-01 15:47               ` Daniel R. Grayson
2022-06-01 15:48                 ` Lars Ingebrigtsen
2022-06-06 22:15               ` Richard Stallman
2022-06-06 22:46                 ` Daniel R. Grayson
2022-06-07  2:28                 ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87a6aw4ct3.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=55744@debbugs.gnu.org \
    --cc=danielrichardgrayson@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 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).