[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stack overflow in regexp matcher
From: |
Stephen Berman |
Subject: |
Re: Stack overflow in regexp matcher |
Date: |
Sun, 06 Feb 2011 14:31:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
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.
Steve Berman