From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.bugs Subject: bug#11109: 24.0.94; vc-git-state: Stack overflow in regexp matcher Date: Wed, 28 Mar 2012 10:49:58 +0200 Message-ID: <871uodw1mx.fsf@turtle.gmx.de> References: <87ehsdw4sr.fsf@turtle.gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1332924660 9720 80.91.229.3 (28 Mar 2012 08:51:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2012 08:51:00 +0000 (UTC) Cc: 11109@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 28 10:51:00 2012 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 1SCoam-00080T-OT for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2012 10:50:57 +0200 Original-Received: from localhost ([::1]:46271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCoam-0007ZF-6s for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2012 04:50:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCoaf-0007Y7-0q for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 04:50:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCoaY-0007va-Pp for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 04:50:48 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCoaY-0007vW-MR for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 04:50:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SCp4s-0006aF-Aq for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 05:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sven Joachim Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Mar 2012 09:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11109 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11109-submit@debbugs.gnu.org id=B11109.133292648625264 (code B ref 11109); Wed, 28 Mar 2012 09:22:02 +0000 Original-Received: (at 11109) by debbugs.gnu.org; 28 Mar 2012 09:21:26 +0000 Original-Received: from localhost ([127.0.0.1]:42247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCp4F-0006ZM-JX for submit@debbugs.gnu.org; Wed, 28 Mar 2012 05:21:25 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:37283) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SCp4B-0006ZD-Mi for 11109@debbugs.gnu.org; Wed, 28 Mar 2012 05:21:21 -0400 Original-Received: (qmail invoked by alias); 28 Mar 2012 08:49:58 -0000 Original-Received: from p4FC763F0.dip.t-dialin.net (EHLO turtle.gmx.de) [79.199.99.240] by mail.gmx.net (mp033) with SMTP; 28 Mar 2012 10:49:58 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX19VteojjWBVDQNmgPokqr5ueI6wefCNJ8L0k99Apt b2IKKLHSX2TmlE Original-Received: by turtle.gmx.de (Postfix, from userid 1000) id 739463F499; Wed, 28 Mar 2012 10:49:58 +0200 (CEST) In-Reply-To: (Andreas Schwab's message of "Wed, 28 Mar 2012 10:36:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58226 Archived-At: On 2012-03-28 10:36 +0200, Andreas Schwab wrote: > Sven Joachim writes: > >> I'm getting frequent "Stack overflow in regexp matcher" errors when >> visiting files under git version control with uncommitted changes. This >> started to happen rather recently. > > Does that help? Yes, that seems to work. Thanks. > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > index bf7b7fb..b71dc95 100644 > --- a/lisp/vc/vc-git.el > +++ b/lisp/vc/vc-git.el > @@ -220,11 +220,10 @@ matching the resulting Git log output, and KEYWORDS is a list of > (let ((diff (vc-git--run-command-string > file "diff-index" "-p" "--raw" "-z" "HEAD" "--"))) > (if (and diff > - (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(\\(?:.\\|\n\\)*\\)\\'" > + (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(.\\)?" > diff)) > - (let ((diff-letter (match-string 1 diff)) > - (diff-contents (match-string 2 diff))) > - (if (not (string-match "\n." diff-contents)) > + (let ((diff-letter (match-string 1 diff))) > + (if (not (match-beginning 2)) > ;; Empty diff: file contents is the same as the HEAD > ;; revision, but timestamps are different (eg, file > ;; was "touch"ed). Update timestamp in index: Cheers, Sven