Subject: bug#66744: 30.0.50; Emacs crashes when re-dumping into the same dump file another Emacs instance is using

From: Gerd Möllmann <[email-masked]>
Date: Thu, 26 Oct 2023 20:42:29 +0200

Ihor Radchenko <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>> Then maybe I don't understand what bothers you.  What are the "changes
>> made to the dump file in step 3" to which you allude?  AFRAIU, step 3
>> simply loads the dump file, it doesn't change the file.  What did I
>> miss?
>
> step 1: create the dump file
> step 2: load Emacs with the created dump file
> step 3: repeat step 1 while Emacs is running -> running Emacs crashes
>      once I interact with its frame.
>
> Hope it is more clear.

Ihor, maybe you could run emacs in a debuuger with a breakpoint on dump_map_file, so that we know
for sure if mmap is called?

gdb emacs
(gdb) b dump_map_file
(gbd) r -Q --dump-file <file>  # or what the command line was...