GNU bug report logs -
#11109
24.0.94; vc-git-state: Stack overflow in regexp matcher
Previous Next
Reported by: Sven Joachim <svenjoac <at> gmx.de>
Date: Wed, 28 Mar 2012 08:14:01 UTC
Severity: normal
Found in version 24.0.94
Done: Andreas Schwab <schwab <at> linux-m68k.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 11109 <at> debbugs.gnu.org (full text, mbox):
Sven Joachim <svenjoac <at> gmx.de> 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 <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
This bug report was last modified 13 years and 118 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.