Subject: bug#26961: 26.0.50; Possible timming issue in regex-tests.el

From: Eli Zaretskii <[email-masked]>
Date: Fri, 19 May 2017 10:14:03 +0300

> From: Tino Calancha <[email-masked]>
> Cc: Andreas Schwab <[email-masked]>, Eli Zaretskii <[email-masked]>
> Date: Fri, 19 May 2017 12:31:10 +0900
> 
> Following diff hunk from commit
> 'Improve unescaped character literal warnings'
> (16004397f4)
> seems the origin of the problem: those lists with
> defsym's in their heads.
> 
> diff --git a/src/lread.c b/src/lread.c
> --- a/src/lread.c
> +++ b/src/lread.c
> @@ -963,9 +963,11 @@ load_warn_unescaped_character_literals (Lisp_Object file)
>    AUTO_STRING (format,
>                 "Loading `%s': unescaped character literals %s detected!");
>    AUTO_STRING (separator, ", ");
> +  AUTO_STRING (inner_format, "`?%c'");
>    CALLN (Fmessage,
>           format, file,
> -         Fmapconcat (Qstring,
> +         Fmapconcat (list3 (Qlambda, list1 (Qchar),
> +                            list3 (Qformat, inner_format, Qchar)),
>                       Fsort (Vlread_unescaped_character_literals, Qlss),
>                       separator));
>  }
> 
> Do you think this code is wrong?

This does indeed look dangerous: we are in effect consing Lisp data
structures from stack-based Lisp objects, and then process them in a
way that could leave some of them lying around when this function
returns, and its stack becomes invalid.

Can you present the evidence that caused you to suspect this
particular change?  Were the "unescaped character literals" warning
displayed during the session which crashed?