From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Davison Newsgroups: gmane.emacs.help Subject: Re: Stack overflow in regexp matcher Date: Sun, 06 Feb 2011 14:30:26 +0000 Message-ID: References: <87wrldcmrk.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297039368 7399 80.91.229.12 (7 Feb 2011 00:42:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Feb 2011 00:42:48 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 07 01:42:38 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 1PmFBd-0004Ng-8b for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Feb 2011 01:42:37 +0100 Original-Received: from localhost ([127.0.0.1]:38204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmFBd-0006Qt-7f for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Feb 2011 19:42:37 -0500 Original-Received: from [140.186.70.92] (port=59313 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pm5dK-0003Jq-40 for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 09:30:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pm5dJ-00016D-02 for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 09:30:33 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:64972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pm5dI-000166-PG; Sun, 06 Feb 2011 09:30:32 -0500 Original-Received: by wyj26 with SMTP id 26so4023828wyj.0 for ; Sun, 06 Feb 2011 06:30:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=UB9iKfjiaXAt1oVMZ+XBwYk9/v68kG3dRaUSIvizJpc=; b=BJT8PgtugjVuvhyFTRjgwzl4Zl7ZB904jdG2ifIsgW6dYEyd/IBBmEYVv4rIicDKft 6qdSqBl+/37BmCQ9hIXY3QjymGH7M3D/OWDZSTh261o8Who0EXZSKHq9soJ4M2G+xMUW 7WRb6ytOTNNmmWKRgE8Kg3YVtj4vJ8+8qRyWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=iKQZMLvfhE36sHK+HsW9CjV89NbFMCtSGQuGWOC4vcIiRD8NgP+18tQCkhn3JbD3jQ 0laErGtdr5as53PxAFuNjX02gxQab4ouSxMQ+PgAc8Fp3DZZLNddXG7oEJejE+pXcosS W5XB4G7+N97PKUHyM1AjR9rILdtOY76ereuow= Original-Received: by 10.216.81.69 with SMTP id l47mr13265379wee.56.1297002631007; Sun, 06 Feb 2011 06:30:31 -0800 (PST) Original-Received: from 94.196.159.117.threembb.co.uk (94.196.159.117.threembb.co.uk [94.196.159.117]) by mx.google.com with ESMTPS id 7sm1592252wet.0.2011.02.06.06.30.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 06 Feb 2011 06:30:30 -0800 (PST) In-Reply-To: (Eli Zaretskii's message of "Sun, 06 Feb 2011 09:17:50 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (darwin) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 X-Mailman-Approved-At: Sun, 06 Feb 2011 19:41:18 -0500 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:78994 Archived-At: Eli Zaretskii writes: >> From: Stephen Berman >> Date: Sun, 06 Feb 2011 14:31:43 +0100 >> >> 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. > > 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 *** 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 * 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.