From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#18577: Regexp I-search: [(error Stack overflow in regexp matcher)] Date: Sun, 28 Sep 2014 12:37:17 +0000 Message-ID: <20140928123717.GC3157@acm.acm> References: <20140928085554.GA3157@acm.acm> <87mw9kt3m7.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1411908213 3975 80.91.229.3 (28 Sep 2014 12:43:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Sep 2014 12:43:33 +0000 (UTC) Cc: 18577@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 28 14:43:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XYDow-00031T-6S for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 14:43:22 +0200 Original-Received: from localhost ([::1]:59662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYDov-0004ay-Rc for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 08:43:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYDon-0004ag-9d for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 08:43:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYDoh-0003ik-UV for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 08:43:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYDoh-0003iH-Nr for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 08:43:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XYDoc-000241-4u for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 08:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Sep 2014 12:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18577-submit@debbugs.gnu.org id=B18577.14119081767918 (code B ref 18577); Sun, 28 Sep 2014 12:43:01 +0000 Original-Received: (at 18577) by debbugs.gnu.org; 28 Sep 2014 12:42:56 +0000 Original-Received: from localhost ([127.0.0.1]:54160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYDoV-00023d-Ps for submit@debbugs.gnu.org; Sun, 28 Sep 2014 08:42:56 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:47934 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYDoS-00023U-Va for 18577@debbugs.gnu.org; Sun, 28 Sep 2014 08:42:54 -0400 Original-Received: (qmail 21653 invoked by uid 3782); 28 Sep 2014 12:42:51 -0000 Original-Received: from acm.muc.de (pD951AB19.dip0.t-ipconnect.de [217.81.171.25]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 28 Sep 2014 14:42:50 +0200 Original-Received: (qmail 4488 invoked by uid 1000); 28 Sep 2014 12:37:17 -0000 Content-Disposition: inline In-Reply-To: <87mw9kt3m7.fsf@igel.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93821 Archived-At: Good afternoon, Andreas! On Sun, Sep 28, 2014 at 12:56:48PM +0200, Andreas Schwab wrote: > Alan Mackenzie writes: > > With point at BOB, do C-M-s and enter this regular expression at the > > prompt: > > /\*\(\([^'*]\|\*[^/']\)*\*?'\([^'*]\|\*[^/']\)*\*?'\)*\([^'*]\|\*[^'/]\)*\*?'\([^'*]\|\*[^/']\)*\*?\*/ > \(...\(...\)*...\)* is bad. \(...\)*\(...\)* is also bad. But they both seem essential to the regexp's purpose. > Both can cause combinatorial explosions in backtracking. Is this a defect in my regexp or in the regexp engine? If the former, how could I rewrite the regexp so that it would not hit these problems? > Andreas. > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." -- Alan Mackenzie (Nuremberg, Germany).