From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Stack overflow in regexp matcher Date: Sun, 06 Feb 2011 14:31:43 +0100 Message-ID: <87wrldcmrk.fsf@escher.home> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296999148 18726 80.91.229.12 (6 Feb 2011 13:32:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Feb 2011 13:32:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 06 14:32:22 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pm4iz-0001OE-Nw for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Feb 2011 14:32:21 +0100 Original-Received: from localhost ([127.0.0.1]:44618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pm4iz-0002wb-5j for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Feb 2011 08:32:21 -0500 Original-Received: from [140.186.70.92] (port=51608 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pm4id-0002wW-0d for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 08:31:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pm4ic-0007ou-32 for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 08:31:58 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:40483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pm4ib-0007on-QD for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 08:31:58 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pm4iY-0001CK-SQ for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 14:31:54 +0100 Original-Received: from i59f56f18.versanet.de ([89.245.111.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Feb 2011 14:31:54 +0100 Original-Received: from stephen.berman by i59f56f18.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Feb 2011 14:31:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: i59f56f18.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78986 Archived-At: On Sun, 06 Feb 2011 10:47:42 +0000 Dan Davison 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