From: Eli Zaretskii <eliz@gnu.org>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: 23949@debbugs.gnu.org
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 [thread overview]
Message-ID: <83h9bvarb6.fsf@gnu.org> (raw)
In-Reply-To: <CAFyQvY2O-DNDGhvjKezwAkACaAAkeL7BqHtbXskRpZsEc0OuGw@mail.gmail.com> (message from Kaushal Modi on Tue, 12 Jul 2016 13:33:05 +0000)
> From: Kaushal Modi <kaushal.modi@gmail.com>
> 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.
next prev parent reply other threads:[~2016-07-12 14:01 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-06 1:56 bug#24166: With --eval, errors in string-match-p do not produce backtraces (but errors in string-match do?!) Clément Pit--Claudel
2016-08-06 2:15 ` npostavs
2016-08-06 3:03 ` Clément Pit--Claudel
2016-08-06 7:25 ` Eli Zaretskii
2016-08-06 10:28 ` Noam Postavsky
2016-08-06 10:34 ` Eli Zaretskii
2016-08-06 10:49 ` Noam Postavsky
2016-08-06 11:19 ` Eli Zaretskii
2016-08-06 12:25 ` npostavs
2016-08-07 14:12 ` Eli Zaretskii
2016-08-07 14:27 ` npostavs
2016-07-11 20:12 ` bug#23949: 25.0.95; Regression in handling error caused by (string-match-p "." nil) Kaushal Modi
2016-07-12 12:29 ` Kaushal Modi
2016-07-12 13:14 ` Eli Zaretskii
2016-07-12 13:33 ` Kaushal Modi
2016-07-12 13:37 ` Kaushal Modi
2016-07-12 14:03 ` Eli Zaretskii
2016-07-12 14:01 ` Eli Zaretskii [this message]
2016-07-12 18:35 ` Kaushal Modi
2016-07-12 18:55 ` Noam Postavsky
2016-07-12 19:00 ` Kaushal Modi
2016-07-12 19:12 ` Eli Zaretskii
2016-07-12 19:10 ` Eli Zaretskii
2016-07-12 19:19 ` Eli Zaretskii
2016-07-12 19:29 ` Kaushal Modi
2016-07-12 20:27 ` Stefan Monnier
2016-07-13 13:10 ` Kaushal Modi
2016-07-13 13:59 ` Stefan Monnier
2016-07-13 15:06 ` Eli Zaretskii
2016-07-13 15:03 ` Eli Zaretskii
2016-07-13 14:24 ` Eli Zaretskii
2016-07-13 14:48 ` Stefan Monnier
2016-07-13 15:14 ` Eli Zaretskii
2016-07-13 16:00 ` Stefan Monnier
2016-07-13 16:18 ` Eli Zaretskii
2016-07-13 16:41 ` Stefan Monnier
2016-07-13 15:03 ` Andreas Schwab
2016-07-13 15:17 ` Eli Zaretskii
2016-07-12 14:15 ` Andreas Schwab
[not found] ` <handler.23949.C.147058007223290.notifdonectrl.2@debbugs.gnu.org>
2016-08-09 15:56 ` bug#23949: acknowledged by developer (Re: bug#24166: With --eval, errors in string-match-p do not produce backtraces (but errors in string-match do?!)) Kaushal Modi
2016-08-07 15:43 ` bug#24166: With --eval, errors in string-match-p do not produce backtraces (but errors in string-match do?!) Clément Pit--Claudel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h9bvarb6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=23949@debbugs.gnu.org \
--cc=kaushal.modi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).