From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23949: 25.0.95; Regression in handling error caused by (string-match-p "." nil) Date: Tue, 12 Jul 2016 17:01:33 +0300 Message-ID: <83h9bvarb6.fsf@gnu.org> References: <83lh17ati6.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468332211 4734 80.91.229.3 (12 Jul 2016 14:03:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2016 14:03:31 +0000 (UTC) Cc: 23949@debbugs.gnu.org To: Kaushal Modi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 12 16:03:20 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 1bMyHO-00028r-9B for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jul 2016 16:03:18 +0200 Original-Received: from localhost ([::1]:40699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMyHN-0005LI-Gz for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jul 2016 10:03:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMyHE-0005JN-Kw for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 10:03:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMyH8-0003dA-R9 for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 10:03:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMyH8-0003d6-OB for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMyH8-0004K7-Fq for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2016 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23949-submit@debbugs.gnu.org id=B23949.146833213316557 (code B ref 23949); Tue, 12 Jul 2016 14:03:02 +0000 Original-Received: (at 23949) by debbugs.gnu.org; 12 Jul 2016 14:02:13 +0000 Original-Received: from localhost ([127.0.0.1]:48449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMyGH-0004Iw-4L for submit@debbugs.gnu.org; Tue, 12 Jul 2016 10:02:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMyGB-0004IJ-9Z for 23949@debbugs.gnu.org; Tue, 12 Jul 2016 10:02:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMyG0-0003NK-6r for 23949@debbugs.gnu.org; Tue, 12 Jul 2016 10:01:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMyG0-0003NG-3I; Tue, 12 Jul 2016 10:01:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2180 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMyFy-0004GV-QJ; Tue, 12 Jul 2016 10:01:51 -0400 In-reply-to: (message from Kaushal Modi on Tue, 12 Jul 2016 13:33:05 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:120908 Archived-At: > From: Kaushal Modi > Date: Tue, 12 Jul 2016 13:33:05 +0000 > Cc: 23949@debbugs.gnu.org > > (gdb) frame 9 > #9 0x0000000000624397 in Fread_from_string (string=54138084, start=0, end=0) at lread.c:2075 > 2075 ret = read_internal_start (string, start, end); > (gdb) p string > $15 = 54138084 > (gdb) xstring > $16 = (struct Lisp_String *) 0x33a14e0 > "(nilory is relative, it is com" > > Looks like the 'nil' argument in '(string-match-p "." nil)' somehow did this? string-match-p just signals an error, because its 2nd arg must be a string. Look up the backtrace, and you will see that Emacs is trying to signal an error: #47 0x00000000005f6a41 in Fapply (nargs=2, args=0x7fffffff7270) at eval.c:2329 #48 0x00000000005f6f90 in apply1 (fn=16848, arg=56618787) at eval.c:2545 #49 0x00000000005f23b6 in call_debugger (arg=56618787) at eval.c:308 #50 0x00000000005f4e2b in maybe_call_debugger (conditions=9578427, sig=51984, data=56618835) at eval.c:1723 #51 0x00000000005f48dd in Fsignal (error_symbol=51984, data=56618835) at eval.c:1541 #52 0x00000000005f4a06 in xsignal (error_symbol=51984, data=56618835) at eval.c:1578 #53 0x00000000005f4a9a in xsignal2 (error_symbol=51984, arg1=44400, arg2=0) at eval.c:1599 #54 0x00000000005d7967 in wrong_type_argument (predicate=44400, value=0) at data.c:151 #55 0x000000000055388b in CHECK_STRING (x=0) at lisp.h:2807 #56 0x00000000005b2278 in string_match_1 (regexp=55505044, string=0, start=0, posix=false) at search.c:373 #57 0x00000000005b25e5 in Fstring_match (regexp=55505044, string=0, start=0) at search.c:444 What happens next is that Emacs calls the debugger, and then your advices kick in, starting at apply1. And that's where the trouble begins. I asked why help-function-arglist is trying to read from a string, but got no answer. > (BTW this debug session is on the 2f67f8a commit of master (very recent, today). But the bug is present on > emacs-25 too.) Sorry, I see no bug yet, just a lot of ad-FOO stuff that tries to do something silly during an error, when it should have moved out of the way. If there is a bug, its root cause hides inside help-function-arglist, and the way it is called by the advices you (or maybe it's Projectile?) have set up. That's where we should be looking, not in string-match-p, which did what it was supposed to do: signaled an error when called with nil instead of a string.