From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#22149: 24.4; gdb stack overflow in regexp matcher Date: Thu, 30 Jun 2016 23:16:38 -0400 Message-ID: <87a8i2hwtl.fsf@users.sourceforge.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1467343047 15221 80.91.229.3 (1 Jul 2016 03:17:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jul 2016 03:17:27 +0000 (UTC) Cc: Cheng-An Yang , 22149@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 01 05:17:16 2016 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 1bIox6-0002m1-B1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2016 05:17:12 +0200 Original-Received: from localhost ([::1]:53476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIox5-0003Kl-FL for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 23:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIowz-0003JZ-6x for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 23:17:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIoww-0003gr-0m for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 23:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIowv-0003gm-Sb for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 23:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bIowv-0004tO-NU for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 23:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jul 2016 03:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22149-submit@debbugs.gnu.org id=B22149.146734300018773 (code B ref 22149); Fri, 01 Jul 2016 03:17:01 +0000 Original-Received: (at 22149) by debbugs.gnu.org; 1 Jul 2016 03:16:40 +0000 Original-Received: from localhost ([127.0.0.1]:32974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIowa-0004se-5j for submit@debbugs.gnu.org; Thu, 30 Jun 2016 23:16:40 -0400 Original-Received: from mail-it0-f53.google.com ([209.85.214.53]:35521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIowX-0004sM-KC; Thu, 30 Jun 2016 23:16:38 -0400 Original-Received: by mail-it0-f53.google.com with SMTP id g127so8006736ith.0; Thu, 30 Jun 2016 20:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Gq+tNGDO+/GuKD5XKwD62g3W/d6s51zCtVyc3KAZL8I=; b=C8l3GWyP3oWtjiknAjN7PtJqZ2M2VKPAqhw5L1TMqTDe2pXIpHzlv2fsBnJKYXdghm IeTs8v3FC4uGMJklrD+wZyV7qKZS7t1JhD9mfRjXKTqdRZ2EBkJTqbL9D16FNygMxXne SifgEVh3vXyh40Jvczcx5m+uR2VXwaiUHnK0N1u6KO9wPxhfutAMTjD1iPRkOo7LZoS+ kee+D+JCeTpI4REABOl/OgHcYuHLWUejwkV7FUFbZJZfebNee8rqJ6efdkNC3T3ulkDh 3xiorXM51VKTFJE2haEnCP4zfEQouBzDOByrT6TAZUEcTXUjvwOR//mAUz4ThOU0svnL HiBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Gq+tNGDO+/GuKD5XKwD62g3W/d6s51zCtVyc3KAZL8I=; b=TAxmkv/5K5XnjkVnTBTxh0ZsWeG7BFDBC0XIiN/fSzTItJEFRq9TPtRdVAXwwRUxki w+wDTl+8ethsbZnJmVq74cPaQUEtDNE/7/0APG6WwS9YKdQyKv+Zo6ZeP/Fw2PDUASUB b0uTpnfbfi9lcZPReVUmcnnPPvzQgXSPRQKp8vVdz4tFo6T7Q/5xPt4t0WkOiuT/2bGw zxsa10QZaTVMpBuogR7J0szlJG+0pn577B2v+3QAOTXR9GzJQt+XI9r8MZcyj98/MR4B cIz9F/A5MqeuDna5ps0CHITupzqDorK1tyOzH+VhQmxh88ajVM4uNjtJ/t1KQs5c/YZE P4pg== X-Gm-Message-State: ALyK8tLygohRJJJkdt3XDKDhY+BdMeb8sqaOSIUwFcqSNbNNNXsMUopfHWJuEK5M8fRlBA== X-Received: by 10.36.111.81 with SMTP id x78mr28952598itb.6.1467342992162; Thu, 30 Jun 2016 20:16:32 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id s17sm1203922ioi.24.2016.06.30.20.16.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 20:16:29 -0700 (PDT) In-Reply-To: (Andreas Schwab's message of "Sat, 12 Dec 2015 11:13:13 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:120248 Archived-At: --=-=-= Content-Type: text/plain tags 22149 confirmed found 22149 25.0.95 retitle 22149 stack overflow in regexp matcher quit Andreas Schwab writes: > Cheng-An Yang writes: > >> I am using Emacs GDB Graphical Interface to debug a large C++ project. >> When I stop at certain functions, it breaks the GDB interface with the >> error message "Stack overflow in regexp matcher". > > I cannot reproduce that error with Emacs 24.5 when evaluating the > string-match from the backtrace. I'm able to reproduce with both 24.5 and 25.0.95. Attaching testcase as el file to avoid ambiguity. Run as emacs -Q -l bug-22149-regexp-overflow.el I'm entirely sure why this regexp triggers an overflow, but one that doesn't trigger overflow, and I think should match the same is: "\\([~@&]\\)\\(\"\\(?:\\\\\"\\|[^\"]\\)*\"\\)\n" --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=bug-22149-regexp-overflow.el Content-Transfer-Encoding: quoted-printable Content-Description: testcase to trigger overflow (string-match "\\([~@&]\\)\\(\"\\(?:[^\\\"]\\|\\\\.\\)*\"\\)\n" "~\"5 breakpoint keep y 0x00002aaac4d594fa in SIMULATION_VP::= ETC_VP_Frontend::chanDecodeComputing (boost::shared_ptr, std::vector= >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >*, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > > const&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >&, std::vector >&, std::vector >, std::allocator > > >&, std::vector >, std::vector >, std::allocator > > >, std::allocator >, std::allocator > >= > > >, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > > const&, std::vector >, std::allocat= or > > >&, std::vector >, std::allocator > > >, std::allocato= r >, std::allocator > > > > >&, std::vec= tor >, std::allocator > > >, std::allocato= r >, std::allocator > > > > >&, std::vec= tor >, std::allocator > > >, std::allocator >, std::allocator = > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >*, std::vector >, std::allocator > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::vector >, unsigned int, bool, std::vector >, std::vector >,= std::allocator > > >, std::vector >, std::vector > const&, std::vector > const&, std::vector >, std::allocator > > >, std::allocato= r >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > > const&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >, std::allocator >, std::allocator > > >, std::allocator >, std::allocator > > > > > > > const&, std::vector >, std::allocat= or > > >, finite::Finite, std::vecto= r >, unsigned int, unsigned int, bool, bool, std::vector > const*, std::vector >, = std::allocator > > > const*, unsigned int, bool, st= d::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > > const*, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > > const*) at points/apple/rx_hw/VP/ETC_VP_Frontend.cpp:4520\\n") --=-=-=--