Subject: bug#59029: Dumping Emacs crashes when buffers have overlays

From: Eli Zaretskii <[email-masked]>
Date: Tue, 08 Nov 2022 18:59:29 +0200

> Cc: [email-masked]
> From: Matt Armstrong <[email-masked]>
> Date: Tue, 08 Nov 2022 07:59:45 -0800
> 
> a) Drop support for dumping overlays in buffers, as if
> `delete-all-overlays' were called for all buffers before dumping.  Fix
> involves relaxing the abort() calls to merely print warnings.
> 
> b) Restore support, and test it.

a) could be a short-term band-aid, but if we want ever to support
re-dumping, b) is a must.

> For (b) I'm not keen on wiring up a single-purpose test under test/*
> somewhere just to test pdumping with overlays.  How about hooking in to
> loadup.el to populate a dummy buffer with overlays before dumping?

For testing purposes, you could perhaps use eval-after-load to do
something after loading loadup.el?