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

From: Jonathan Mitchell <[email-masked]>
Date: Thu, 14 Jul 2022 13:42:35 -0500

I guess it could be an Apple quality problem :-). Unless I'm reading LLDB
incorrectly, it says m->charpos = 0 for that frame.

On Thu, Jul 14, 2022 at 11:52 AM Eli Zaretskii <[email-masked]> wrote:

> > From: Jonathan Mitchell <[email-masked]>
> > Date: Thu, 14 Jul 2022 11:18:02 -0500
> > Cc: [email-masked]
> >
> > I think this should be the "m" variable in the assert:
> >
> > (lldb) frame select 9
> >
> > frame #9: 0x000000010020bab4 emacs`adjust_markers_for_insert(from=1,
> > from_byte=1, to=15403, to_byte=15413, before_markers=false) at
> insdel.c:294:
> > 7
> >    291   adjust_suspend_auto_hscroll (from, to);
> >    292   for (m = BUF_MARKERS (current_buffer); m; m = m->next)
> >    293     {
> > -> 294       eassert (m->bytepos >= m->charpos
> >    295        && m->bytepos - m->charpos <= Z_BYTE - Z);
> >    296
> >    297       if (m->bytepos == from_byte)
> > (lldb) p *(struct Lisp_Marker *) m
> > (struct Lisp_Marker) $1158 = {
> >   header = (size = 4611686018477740032)
> >   buffer = 0x00000001026b2718
> >   need_adjustment = false
> >   insertion_type = true
> >   next = 0x00000001026f5f70
> >   charpos = 0
> >   bytepos = 11043
> > }
>
> ??? charpos = 0?  How can that happen?  charpos can never be zero, it
> starts at 1.
>
> Are you sure your machine doesn't have problems with its memory chips?
>