Subject: bug#23949: 25.0.95; Regression in handling error caused by (string-match-p "." nil)

From: Kaushal Modi <[email-masked]>
Date: Tue, 12 Jul 2016 13:37:57 +0000

Some interesting discovery .. hope this helps debug this:

Searched the whole emacs source and my ~/.emacs.d for 'is relative, it is
com'. And the only place I found it was in lisp/progmodes/compile.el, line
2679:

=====
km²~/downloads/:git/emacs> ag 'is relative, it is com'
lisp/progmodes/compile.el
2679:If DIRECTORY is relative, it is combined with `default-directory'.
=====

Somehow "(nil" replaced "If DIRECT", the whole thing got lower-cased,
string after "com" in "combined" got truncated, and we got:

"(nilory is relative, it is com"

On Tue, Jul 12, 2016 at 9:33 AM Kaushal Modi <[email-masked]> wrote:

> Hi Eli,
>
> This is what I get (obviously odd-looking string):
>
> (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?
>
> (BTW this debug session is on the 2f67f8a commit of master (very recent,
> today). But the bug is present on emacs-25 too.)
>
> On Tue, Jul 12, 2016 at 9:14 AM Eli Zaretskii <[email-masked]> wrote:
>
>> In this frame, please show the value of 'string', like this:
>>
>>  (gdb) frame 9
>>  (gdb) p string
>>  (gdb) xstring
>
> Kaushal Modi
>
-- 

-- 
Kaushal Modi