From: Dan Davison <dandavison7@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Stack overflow in regexp matcher
Date: Sun, 06 Feb 2011 14:30:26 +0000 [thread overview]
Message-ID: <m139o11bi5.fsf@94.196.159.117.threembb.co.uk> (raw)
In-Reply-To: <E1Pm5R0-0007ee-7c@fencepost.gnu.org> (Eli Zaretskii's message of "Sun, 06 Feb 2011 09:17:50 -0500")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Stephen Berman <stephen.berman@gmx.net>
>> Date: Sun, 06 Feb 2011 14:31:43 +0100
>>
>> On Sun, 06 Feb 2011 10:47:42 +0000 Dan Davison <dandavison7@gmail.com> wrote:
>>
>> > The following fails with "Stack overflow in regexp matcher" in emacs 23
>> > and 24:
>> >
>> > (string-match
>> > "^\\[.+\\]$"
>> > (concat
>> > "["
>> > (mapconcat (lambda (i) "x") (number-sequence 1 33500) "")
>> > "]"))
>> >
>> > This surprised me; I assumed that the ^ and $ anchors, and the simple
>> > ".+" requirement in the middle would result in a simple, efficient
>> > regexp.
>>
>> It does not fail on my GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+
>> Version 2.20.1) of 2011-01-13, but returns, as expected, 0.
>
> Nor does it fail here:
>
> GNU Emacs 23.2.91.1 (i386-mingw-nt5.1.2600) of 2010-12-11 on 3249CTO
>
> but does enter the debugger here:
>
> GNU Emacs 23.2.93.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2011-02-03 on fencepost
It fails on these (I didn't find any machines/builds where it worked):
* OS X
** 23
*** local build
GNU Emacs 23.2.1 (x86_64-apple-darwin10.6.0, NS
apple-appkit-1038.35) of 2011-01-20 on <my OS X 10.6.6 machine>
*** aquamacs
GNU Emacs 23.2.91.1 (x86_64-apple-darwin10.6.0, NS
apple-appkit-1038.35) of 2011-02-01 on
94.196.104.92.threembb.co.uk - Aquamacs Distribution 2.2dev
*** emacsformacosx
GNU Emacs 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29) of
2010-05-09 on black.local
** 24
*** local build
GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.6.0, NS
apple-appkit-1038.35) of 2011-01-13 on <my OS X 10.6.6 machine>
* Ubuntu
** 23
GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.0) of
2010-03-29 on yellow, modified by Debian
> I guess it depends on how large is the available stack space.
next prev parent reply other threads:[~2011-02-06 14:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 10:47 Stack overflow in regexp matcher Dan Davison
2011-02-06 13:31 ` Stephen Berman
2011-02-06 14:01 ` guivho
2011-02-06 14:17 ` Eli Zaretskii
2011-02-06 14:30 ` Dan Davison [this message]
2011-02-06 16:02 ` Stephen Berman
-- strict thread matches above, loose matches on Subject: below --
2014-10-24 6:41 Alan Schmitt
2014-10-24 19:02 ` Charles Berry
2014-10-24 19:51 ` Gregor Zattler
2014-10-25 17:00 ` Charles C. Berry
2014-10-25 18:34 ` Charles C. Berry
2014-11-28 18:33 ` Alan Schmitt
2014-10-26 11:11 ` Alan Schmitt
2014-10-25 9:24 ` Alan Schmitt
[not found] <mailman.0.1296989279.10345.help-gnu-emacs@gnu.org>
2011-02-07 20:24 ` Stefan Monnier
2011-02-08 22:58 ` Dan Davison
2010-11-20 16:03 Michael Brand
2010-11-28 20:08 ` Matt Lundin
2009-12-16 17:15 akaiser
2009-12-17 17:01 ` Barry Margolin
2009-12-17 22:10 ` Ilya Zakharevich
2009-12-17 22:13 ` akaiser
2003-10-16 16:35 Sam Steingold
2003-10-16 18:56 ` Stefan Monnier
2003-10-17 6:13 ` Stephen J. Turnbull
2003-10-17 13:55 ` Stefan Monnier
2003-10-17 14:24 ` Andreas Schwab
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=m139o11bi5.fsf@94.196.159.117.threembb.co.uk \
--to=dandavison7@gmail.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@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.