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

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

> From: Gerd Möllmann <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 26 Jan 2024 15:47:06 +0100
> 
> > And second, what do you mean by "possibly requiring relocation"?  Do
> > you mean relocation after restoring from dump, or do you mean
> > relocation during dumping?  Or something else entirely?
> 
> Lisp_Object fields require writing something to the dump file that can
> be used, when the dump is loaded, to compute the real value in the the
> new Emacs session. So, something is done when dumping, and when loading.

Something _is_ being done, AFAIU.  If you step through dump_field_lv,
you will see that it dumps a placeholder (0xDEADF00D) instead of the
actual value, and records a "fixup" to be processed later.  When the
fixup is processed, it schedules a "relocation", which AFAIU is
supposed to replace the placeholder with the offset of the actual Lisp
object in the dump file.  So the machinery seems to be in place, it
just doesn't work somehow in this case...