Subject: Re: bug#56527: 28.1; Crash on macOS with magit

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 Jul 2022 10:11:52 +0300

> From: Jonathan Mitchell <[email-masked]>
> Date: Thu, 14 Jul 2022 01:11:27 -0500
> Cc: [email-masked]
> 
> I think I've worked out how to print basic values in LLDB. The
> vector=0x0000000102931240 appears to be a Marker object in the buffer
> "magit-log: emacs". Both the marker and buffer are printed in the
> attached debugger log.

Thanks.

> (lldb) p *(struct Lisp_Marker *) 0x0000000102931240
> (struct Lisp_Marker) $1248 = {
>   header = (size = 4611686018477740032)
>   buffer = 0x0000000131008600
>   need_adjustment = false
>   insertion_type = false
>   next = nullptr
>   charpos = 1
>   bytepos = 1

So the problem happens because sweep_buffer doesn't set the marker's
buffer to NULL, which is supposed to happen in unchain_dead_markers,
called by sweep_buffers.  The question is why.