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 08:55:55 +0000 Message-ID: <20140928085554.GA3157@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1411897284 16051 80.91.229.3 (28 Sep 2014 09:41:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Sep 2014 09:41:24 +0000 (UTC) To: 18577@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 28 11:41:16 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 1XYAyi-0001kU-2M for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 11:41:16 +0200 Original-Received: from localhost ([::1]:59003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYAyh-0008UV-LD for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 05:41:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYAyU-0008QI-Vz for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:41:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYAyK-0005i3-UU for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:41:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYAyK-0005hi-RP for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:40:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XYAj0-0004Q5-Jd for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:25: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 09:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141189628416959 (code B ref -1); Sun, 28 Sep 2014 09:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Sep 2014 09:24:44 +0000 Original-Received: from localhost ([127.0.0.1]:54075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYAih-0004PS-MZ for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:24:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33020) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYAie-0004PJ-GW for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:24:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYAiO-0001rM-Qd for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:24:40 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYAiO-0001q2-Oa for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:24:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYASu-0004PB-Qq for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:08:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYASn-0006uJ-CK for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:08:24 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43297 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYASn-0006tS-2q for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 05:08:17 -0400 Original-Received: (qmail 87938 invoked by uid 3782); 28 Sep 2014 09:01:29 -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 11:01:28 +0200 Original-Received: (qmail 3291 invoked by uid 1000); 28 Sep 2014 08:55:55 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:93813 Archived-At: Hi, Emacs. In the trunk, emacs -Q. Visit our favourite big file, xdisp.c. With point at BOB, do C-M-s and enter this regular expression at the prompt: /\*\(\([^'*]\|\*[^/']\)*\*?'\([^'*]\|\*[^/']\)*\*?'\)*\([^'*]\|\*[^'/]\)*\*?'\([^'*]\|\*[^/']\)*\*?\*/ Press C-s. This gives the error message "[(error Stack overflow in regexp matcher)]". This feels like a bug. Regexp searching with this expression (which finds a block comment containing an odd number of apostrophes) works fine in the rest of the buffer. Only in the second (large) comment in xdisp.c does it trigger this error. Surely an iterative regexp (which all regexps are, surely?) shouldn't be triggering unbounded recursive behaviour in the search engine. [N.B. the regexp when parsed a bit looks like this: /\*\( \)*\( \| \)*\*?'\( \| \)*\*?\*/ \( \| \)*\*?'\( \| \)*\*?' [^'*] \*[^'/] [^'*] \*[^/'] [^'*] \*[^/'] [^'*] \*[^/'] ]. -- Alan Mackenzie (Nuremberg, Germany).