all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: 18577@debbugs.gnu.org
Subject: bug#18577: Regexp I-search: [(error Stack overflow in regexp matcher)]
Date: Sun, 28 Sep 2014 08:55:55 +0000	[thread overview]
Message-ID: <20140928085554.GA3157@acm.acm> (raw)

Hi, Emacs.

In the trunk, emacs -Q.  Visit our favourite big file, xdisp.c.

With point at BOB, do C-M-s and enter this regular expression at the
prompt:

/\*\(\([^'*]\|\*[^/']\)*\*?'\([^'*]\|\*[^/']\)*\*?'\)*\([^'*]\|\*[^'/]\)*\*?'\([^'*]\|\*[^/']\)*\*?\*/

Press C-s.  This gives the error message "[(error Stack overflow in
regexp matcher)]".

This feels like a bug.  Regexp searching with this expression (which
finds a block comment containing an odd number of apostrophes) works fine
in the rest of the buffer.  Only in the second (large) comment in xdisp.c
does it trigger this error.  Surely an iterative regexp (which all
regexps are, surely?) shouldn't be triggering unbounded recursive
behaviour in the search engine.

[N.B. the regexp when parsed a bit looks like this:

/\*\(                                              \)*\(     \|       \)*\*?'\(     \|       \)*\*?\*/
     \(     \|       \)*\*?'\(     \|       \)*\*?'     [^'*]  \*[^'/]         [^'*]  \*[^/']
       [^'*]  \*[^/']         [^'*]  \*[^/']

].  

-- 
Alan Mackenzie (Nuremberg, Germany).





             reply	other threads:[~2014-09-28  8:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28  8:55 Alan Mackenzie [this message]
2014-09-28 10:56 ` bug#18577: Regexp I-search: [(error Stack overflow in regexp matcher)] Andreas Schwab
2014-09-28 12:37   ` Alan Mackenzie
2014-09-28 12:48     ` Andreas Schwab
2014-09-28 17:35       ` Stefan Monnier
2014-11-27  8:44         ` Tassilo Horn
2021-10-23  2:47         ` Stefan Kangas
2021-10-23  7:32           ` Eli Zaretskii
2021-10-23  8:30             ` Stefan Kangas
2021-10-23  8:39               ` Eli Zaretskii
2021-10-23  9:32                 ` Stefan Kangas
2021-10-23 11:27                   ` Eli Zaretskii
2021-10-24 22:08                     ` Stefan Kangas

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=20140928085554.GA3157@acm.acm \
    --to=acm@muc.de \
    --cc=18577@debbugs.gnu.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 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.