Subject: bug#68690: Segmentation fault building with native-comp

From: Eli Zaretskii <[email-masked]>
Date: Fri, 26 Jan 2024 16:36:52 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
>  text editors" <[email-masked]>,  Eli Zaretskii <[email-masked]>,
>   [email-masked],  [email-masked]
> Date: Fri, 26 Jan 2024 08:48:46 -0500
> 
> > I remembered seeing something in pdumper.c that could be related, namely
> >
> >   /* Start the cold section.  This section contains bytes that should
> >      never change and so can be direct-mapped from the dump without
> >      special processing.  */
> >   dump_drain_cold_data (ctx);
> >
> > And if you follow that function you'll see that it treats charsets
> > specially.
> >
> > I find the comment about directly mapping very suspicious, when the
> > charset contains a Lisp_Object, possibly requiring relocation. But it
> > could well be that I misundertand something here.
> 
> Hmm... would a patch like the one below fix the problem, then?

What is the logic behind this patch?

Anyway, the offending charset (ASCII) doesn't have a non-NULL
code_space_mask, so it is not processed by dump_cold_charset.  I
therefore doubt that this will have any effect on the problem.