unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel R. Grayson" <danielrichardgrayson@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 55744@debbugs.gnu.org
Subject: bug#55744: infinite loop
Date: Wed, 1 Jun 2022 08:47:38 -0700	[thread overview]
Message-ID: <CABWu70G1BYLg4b3GndJMsJdNUE7N+ELMHUJD7YQOrWL3aX5K-Q@mail.gmail.com> (raw)
In-Reply-To: <87a6aw4ct3.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

Ah, you're right -- if I wait 45 seconds or so, it finally finishes and
moves on,
and that file has strings that should have matched it.  And it needs to
match all the text
from the start of the file, since string starts and string ends look the
same.  And the result is the same
if I search for any other string that first occurs deep into the file.

Thanks, it's not a bug in emacs!



On Wed, Jun 1, 2022 at 8:35 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:

> "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
>

[-- Attachment #2: Type: text/html, Size: 1739 bytes --]

  reply	other threads:[~2022-06-01 15:47 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
2022-06-01 15:47               ` Daniel R. Grayson [this message]
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=CABWu70G1BYLg4b3GndJMsJdNUE7N+ELMHUJD7YQOrWL3aX5K-Q@mail.gmail.com \
    --to=danielrichardgrayson@gmail.com \
    --cc=55744@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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).