From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#11109: 24.0.94; vc-git-state: Stack overflow in regexp matcher Date: Wed, 28 Mar 2012 10:36:08 +0200 Message-ID: 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 1332923817 3433 80.91.229.3 (28 Mar 2012 08:36:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2012 08:36:57 +0000 (UTC) Cc: 11109@debbugs.gnu.org To: Sven Joachim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 28 10:36:54 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 1SCoNB-0006MR-MW for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2012 10:36:53 +0200 Original-Received: from localhost ([::1]:45191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCoN8-0005QA-HF for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Mar 2012 04:36:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCoN2-0005Ow-Ao for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 04:36:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCoN0-0004IG-Er for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 04:36:43 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCoN0-0004IC-Bh for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 04:36:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SCorJ-0006D4-Md for bug-gnu-emacs@gnu.org; Wed, 28 Mar 2012 05:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Mar 2012 09:08:01 +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.133292566923852 (code B ref 11109); Wed, 28 Mar 2012 09:08:01 +0000 Original-Received: (at 11109) by debbugs.gnu.org; 28 Mar 2012 09:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:42227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCor6-0006Cf-L3 for submit@debbugs.gnu.org; Wed, 28 Mar 2012 05:07:49 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:38672) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCoqo-0006CG-FC for 11109@debbugs.gnu.org; Wed, 28 Mar 2012 05:07:46 -0400 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3VHj9P1X0Yz3hjxJ; Wed, 28 Mar 2012 10:36:08 +0200 (CEST) Original-Received: from igel.home (ppp-93-104-152-34.dynamic.mnet-online.de [93.104.152.34]) by mail.mnet-online.de (Postfix) with ESMTPA id 3VHj9P1yRhz4KK2Y; Wed, 28 Mar 2012 10:36:09 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 501) id BF306CA29F; Wed, 28 Mar 2012 10:36:08 +0200 (CEST) X-Yow: I OWN six pink HIPPOS!! In-Reply-To: <87ehsdw4sr.fsf@turtle.gmx.de> (Sven Joachim's message of "Wed, 28 Mar 2012 09:41:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) 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:58225 Archived-At: 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? Andreas. 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: -- 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."