From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.bugs Subject: bug#20703: 24.4; Stack overflow in regexp matcher Date: Tue, 02 Jun 2015 23:10:33 +0200 Message-ID: <871tht24vq.fsf@heimdali.yagibdah.de> References: <87siac1yqq.fsf@heimdali.yagibdah.de> <556B8A7E.8080705@yandex.ru> <87lhg31f38.fsf@heimdali.yagibdah.de> <556CA839.1090402@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433280458 29757 80.91.229.3 (2 Jun 2015 21:27:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Jun 2015 21:27:38 +0000 (UTC) Cc: 20703@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 02 23:27:27 2015 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 1YztiP-0007WK-S8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jun 2015 23:27:18 +0200 Original-Received: from localhost ([::1]:60973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YztiP-00029O-87 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jun 2015 17:27:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YztiI-00025y-Vn for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2015 17:27:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YztiB-00014E-Im for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2015 17:27:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YztiB-00014A-G9 for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2015 17:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YztiB-0005kz-B5 for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2015 17:27:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: lee Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2015 21:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20703 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20703-submit@debbugs.gnu.org id=B20703.143328039622060 (code B ref 20703); Tue, 02 Jun 2015 21:27:03 +0000 Original-Received: (at 20703) by debbugs.gnu.org; 2 Jun 2015 21:26:36 +0000 Original-Received: from localhost ([127.0.0.1]:37992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzthj-0005jc-4L for submit@debbugs.gnu.org; Tue, 02 Jun 2015 17:26:36 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]:16374) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzthf-0005jF-2g for 20703@debbugs.gnu.org; Tue, 02 Jun 2015 17:26:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1433280389; l=9272; s=domk; d=yagibdah.de; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:Date: In-Reply-To:Subject:Cc:To:From; bh=eOErE5Skasxbjk6ChAuDHzU/ltiWO3pgyMJkMbeD6CE=; b=mymW0GWtJkc+qBipkHTfcJajZOhCntBvqgvbCmzkzKJWqdC3TQW0hD3CMX7qYJvUAF6 gLbnEpumvvTrTG7+3uudNaiyWy9Rb7hEVgOTCAl5KXI3upN/cBwa/PnRV+ouDse68UYmL HD77g8aJw95vkxVKP0Zhabiso7/dj0Uy4Gs= X-RZG-AUTH: :O2kGeEG7b/pS1FS4THaxjVF9w0vVgfQ9xHcw0u9bPwwMFwe5A1Mf1jo8+wbUeX1fjiA= X-RZG-CLASS-ID: mo00 Original-Received: from jarl.yagibdah.de (ip-185-55-75-245.muenet.net [185.55.75.245]) by smtp.strato.de (RZmta 37.6 AUTH) with ESMTPSA id u0229fr52LQT3nU (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 2 Jun 2015 23:26:29 +0200 (CEST) Original-Received: from br-dmz-ip.yagibdah.de ([192.168.1.1] helo=heimdali.yagibdah.de) by jarl.yagibdah.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1Yzthc-0008RD-Fz; Tue, 02 Jun 2015 23:26:28 +0200 Original-Received: from lee by heimdali.yagibdah.de with local (Exim 4.84) (envelope-from ) id 1Yzthc-0000E7-Dv; Tue, 02 Jun 2015 23:26:28 +0200 In-Reply-To: <556CA839.1090402@yandex.ru> (Dmitry Gutov's message of "Mon, 1 Jun 2015 21:45:13 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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:103518 Archived-At: Dmitry Gutov writes: > Please keep the bug address in Cc. > > On 06/01/2015 09:03 PM, lee wrote: > >>> What if you try `M-x find-tag'? >> >> That works. > > What if you type `M-x find-tag TAB' (to ask Emacs for all available tags)? Processing goes to 42% before the debugger comes up: Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") re-search-forward("^\\(\\([^]+[^-a-zA-Z0-9_+*$:]+\\)?\\([-a-zA-Z0-9_+*$= ?:]+\\)[^-a-zA-Z0-9_+*$?:]*\\)\\(\\([^\n.]+\\).\\)?\\([0-9]+\\)?,\\([0-9]= +\\)?\n" nil t) etags-tags-completion-table() #[0 "\303\211C\304\305\"\210\212\306.\242\205.=00\307!\2038. \262.\211\= 242\2031.\310\311\312\313\314\315.=06!\316\"\317\320%.\"\210\202 .\211.\240= \210\202 .)\304\321\"\210\211\242\211.\207" [buffer-file-name tags-complet= ion-table-function tags-completion-table nil message "Making tags completio= n table for %s..." visit-tags-table-buffer t mapatoms make-byte-code 257 "\= 301\302.!\300\242\"\207" vconcat vector [intern symbol-name] 4 "\n\n(fn SYM= )" "Making tags completion table for %s...done"] 9 "\n\n(fn)"]() funcall(#[0 "\303\211C\304\305\"\210\212\306.\242\205.=00\307!\2038. \2= 62.\211\242\2031.\310\311\312\313\314\315.=06!\316\"\317\320%.\"\210\202 .\= 211.\240\210\202 .)\304\321\"\210\211\242\211.\207" [buffer-file-name tags= -completion-table-function tags-completion-table nil message "Making tags c= ompletion table for %s..." visit-tags-table-buffer t mapatoms make-byte-cod= e 257 "\301\302.!\300\242\"\207" vconcat vector [intern symbol-name] 4 "\n\= n(fn SYM)" "Making tags completion table for %s...done"] 9 "\n\n(fn)"]) tags-completion-table() #[771 "r\300q\210\212\302.\303 \210)\304.\305 .=05$*\207" [# enable-recursive-minibuffers t visit-tags-table-buffer complete-wit= h-action tags-completion-table] 8 "\n\n(fn STRING PRED ACTION)"]("" nil met= adata) completion-metadata("" #[771 "r\300q\210\212\302.\303 \210)\304.\305 .=05= $*\207" [# enable-recursive-minibuffers t visit-tags-ta= ble-buffer complete-with-action tags-completion-table] 8 "\n\n(fn STRING PR= ED ACTION)"] nil) completion--field-metadata(28) completion--do-completion(28 28) completion--in-region-1(28 28) #[1028 ".=01.=19\n\203!.\304.!\203.=00.\202.=00\305.!\305.\306\".=03F.\30= 7\310!\210\311.=04\"*\207" [minibuffer-completion-predicate minibuffer-comp= letion-table completion-in-region-mode-predicate completion-in-region--data= markerp copy-marker t completion-in-region-mode 1 completion--in-region-1]= 8 "\n\n(fn START END COLLECTION PREDICATE)"](28 28 #[771 "r\300q\210\212\3= 02.\303 \210)\304.\305 .=05$*\207" [# enable-recursive-= minibuffers t visit-tags-table-buffer complete-with-action tags-completion-= table] 8 "\n\n(fn STRING PRED ACTION)"] nil) apply(#[1028 ".=01.=19\n\203!.\304.!\203.=00.\202.=00\305.!\305.\306\".= =03F.\307\310!\210\311.=04\"*\207" [minibuffer-completion-predicate minibuf= fer-completion-table completion-in-region-mode-predicate completion-in-regi= on--data markerp copy-marker t completion-in-region-mode 1 completion--in-r= egion-1] 8 "\n\n(fn START END COLLECTION PREDICATE)"] (28 28 #[771 "r\300q\= 210\212\302.\303 \210)\304.\305 .=05$*\207" [# enable-r= ecursive-minibuffers t visit-tags-table-buffer complete-with-action tags-co= mpletion-table] 8 "\n\n(fn STRING PRED ACTION)"] nil)) #[771 ".:\2030.=02@\301=3D\203.=00\300\242\302.=05A\"\303.#\207\304.@\305= \306\307\310\311\312\300!\313\"\314\315%.=06A.=06#.#\207\304\316.\"\207" [(= #0) t append nil apply apply-partially make-byte-code 642 "\300\242.=03.#\2= 07" vconcat vector [] 7 "\n\n(fn FUNS GLOBAL &rest ARGS)" #[1028 ".=01.=19\= n\203!.\304.!\203.=00.\202.=00\305.!\305.\306\".=03F.\307\310!\210\311.=04\= "*\207" [minibuffer-completion-predicate minibuffer-completion-table comple= tion-in-region-mode-predicate completion-in-region--data markerp copy-marke= r t completion-in-region-mode 1 completion--in-region-1] 8 "\n\n(fn START E= ND COLLECTION PREDICATE)"]] 12 "\n\n(fn FUNS GLOBAL ARGS)"](nil nil (28 28 = #[771 "r\300q\210\212\302.\303 \210)\304.\305 .=05$*\207" [# enable-recursive-minibuffers t visit-tags-table-buffer complete-with-= action tags-completion-table] 8 "\n\n(fn STRING PRED ACTION)"] nil)) completion--in-region(28 28 #[771 "r\300q\210\212\302.\303 \210)\304.\305= .=05$*\207" [# enable-recursive-minibuffers t visit-ta= gs-table-buffer complete-with-action tags-completion-table] 8 "\n\n(fn STRI= NG PRED ACTION)"] nil) completion-in-region(28 28 #[771 "r\300q\210\212\302.\303 \210)\304.\305 = .=05$*\207" [# enable-recursive-minibuffers t visit-tag= s-table-buffer complete-with-action tags-completion-table] 8 "\n\n(fn STRIN= G PRED ACTION)"] nil) minibuffer-complete() call-interactively(minibuffer-complete nil nil) command-execute(minibuffer-complete) read-from-minibuffer("Find tag (default gAgent): " nil (keymap (menu-bar = keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-compl= ete :help "Complete as far as possible") (space menu-item "Complete Word" m= inibuffer-complete-word :help "Complete at most one word") (63 menu-item "L= ist Completions" minibuffer-completion-help :help "Display all possible com= pletions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . s= witch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-co= mplete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Mi= nibuf" keymap (previous menu-item "Previous History Item" previous-history-= element :help "Put previous minibuffer history element in the minibuffer") = (next menu-item "Next History Item" next-history-element :help "Put next mi= nibuffer history element in the minibuffer") (isearch-backward menu-item "I= search History Backward" isearch-backward :help "Incrementally search minib= uffer history backward") (isearch-forward menu-item "Isearch History Forwar= d" isearch-forward :help "Incrementally search minibuffer history forward")= (return menu-item "Enter" exit-minibuffer :key-sequence "." :help "Termina= te input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit = :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer)= (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-mini= buffer-complete) (9 . self-insert-command) (XF86Back . previous-history-ele= ment) (up . previous-history-element) (prior . previous-history-element) (X= F86Forward . next-history-element) (down . next-history-element) (next . ne= xt-history-element) (27 keymap (114 . previous-matching-history-element) (1= 15 . next-matching-history-element) (112 . previous-history-element) (110 .= next-history-element))) nil nil "gAgent" nil) completing-read-default("Find tag (default gAgent): " #[771 "r\300q\210\2= 12\302.\303 \210)\304.\305 .=05$*\207" [# enable-recurs= ive-minibuffers t visit-tags-table-buffer complete-with-action tags-complet= ion-table] 8 "\n\n(fn STRING PRED ACTION)"] nil nil nil nil "gAgent" nil) completing-read("Find tag (default gAgent): " #[771 "r\300q\210\212\302.\= 303 \210)\304.\305 .=05$*\207" [# enable-recursive-mini= buffers t visit-tags-table-buffer complete-with-action tags-completion-tabl= e] 8 "\n\n(fn STRING PRED ACTION)"] nil nil nil nil "gAgent") find-tag-tag("Find tag: ") find-tag-interactive("Find tag: ") call-interactively(find-tag record nil) command-execute(find-tag record) execute-extended-command(nil "find-tag") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) When I use C-p j and interrupt making the completion table with C-g before the debugger comes up, I can enter what tag I'm searching for and it can be found. >> I cut off roughly the bottom half of the TAGS file and tried again. With >> that, I'm getting the error when progress is at 85% instead of >> 42%. Cutting off the bottom half again, leaving about 1/4 of the >> original file, does not yield an error and says no matching tags were >> found. > > The idea was to split the file in half, and do a sort of binary > search. E.g., try cutting off the top half in the first step now. > >> So I guess the problem might have to do with the size of the TAGS file >> ... > > Not necessarily. The TAGS file is parsed sequentially, without > recursion in the Lisp code. > > In all likelihood, there is a problematic line around 42% of the > original TAGS, and the error goes away when that line is not in the > file anymore. > > We need to know that line to fix the bug. I tried to find the line and only got to the point where so much of the file was cut out that I didn't manage to go back to a step at which I'm getting the error. If I have some time this weekend, I can try again. Isn't there a way to get a better hint than the pretty vague "42%"? --=20 Again we must be afraid of speaking of daemons for fear that daemons might swallow us. Finally, this fear has become reasonable.