Subject: Re: bug#60220: 29.0.60; macOS 13.1 crash shortly after starting Emacs

From: Eli Zaretskii <[email-masked]>
Date: Tue, 20 Dec 2022 17:41:00 +0200

> From: Aaron Jensen <[email-masked]>
> Date: Tue, 20 Dec 2022 10:25:39 -0500
> 
> Here is another trace I just got during a restart. It's slightly
> different. This one seems to point to rng-loc at least as part of the
> trace.

AFAIU, it says that Emacs was _loading_ rng-loc.  That doesn't mean
the problem is in rng-loc's code.  The fatal signal comes from the
maxOS implementation of dlopen, so I suspect that the way we restart
Emacs messes up some OS data structures regarding loaded shared
libraries or something.

Note that the previous crash you posted also crashes inside dlopen.

So I think it's safe to say that restarting Emacs makes loading of
*.eln files (and maybe share libraries in general) fragile and tending
to crash, for some reason.  Maybe we should explicitly unload all the
*.eln files when we restart?