Subject: Re: bug#78981: 30.1; Crash in display_mode_line, running in macOS

From: 赵一开 <[email-masked]>
Date: Sun, 13 Jul 2025 23:21:20 +0800

On Wed, Jul 9, 2025 at 11:55 PM Eli Zaretskii <[email-masked]> wrote:
>
> > From: Yikai Zhao <[email-masked]>
> > Date: Wed, 09 Jul 2025 22:16:46 +0800
> >
> >
> > Emacs crashed. I cannot reproduce. I was just typing in emacs before the
> > crash, no any particular event that triggered it as I recall.
> >
> > See below for the full crash report generated by macOS.
> >
> > I guess the important stacks are:
> >
> >     8   Emacs                                        0x1047f14f4 deliver_fatal_thread_signal + 128
> >     9   Emacs                                        0x1047f33d8 handle_sigsegv + 64
> >     10  libsystem_platform.dylib                     0x19c900624 _sigtramp + 56
> >     11  Emacs                                        0x10470b838 display_mode_line + 620
> >     12  Emacs                                        0x104742e60 display_mode_lines + 556
> >
> > Here's the output of `otool -function_offsets -tvV -p _display_mode_line /Applications/Emacs.app/Content
> > s/MacOS/Emacs`:
> >
> >     +604 000000010002b828 ldr     x8, [x8, #0x10]
> >     +608 000000010002b82c ldr     x19, [x8, w19, sxtw #3]
> >     +612 000000010002b830 add     x0, sp, #0x18
> >     +616 000000010002b834 bl      _extend_face_to_end_of_line
> >     +620 000000010002b838 ldrb    w8, [x19, #0x100]
> >     +624 000000010002b83c tst     w8, #0x3
> >     +628 000000010002b840 b.eq    0x10002b894
> >
> > It seems that the crashed position is at the line after calling `extend_face_to_end_of_line`.
>
> What was the value of mode-line-format in that buffer,

Value:
("%e" mode-line-front-space
 (:propertize
  ("" mode-line-mule-info mode-line-client mode-line-modified
   mode-line-remote mode-line-window-dedicated)
  display (min-width (6.0)))
 mode-line-frame-identification mode-line-buffer-identification "   "
 mode-line-position evil-mode-line-tag
 (project-mode-line project-mode-line-format) "  " mode-line-modes
 mode-line-misc-info mode-line-end-spaces)

buffer value and global value are the same.

> and if you
> customized the variable used by mode-line-format, what are the
> customized values?

I don't think I have.

I do have customized faces for mode-line:

  (custom-set-faces
   '(mode-line ((t (:height 0.9))))  ;; smaller mode-line
   '(mode-line-inactive ((t (:height 0.9))))