Subject: bug#38757: emacs-27; reliably crashes when wrapping visual lines

From: Eli Zaretskii <[email-masked]>
Date: Fri, 27 Dec 2019 16:01:00 +0200

> Date: Fri, 27 Dec 2019 12:29:24 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > 1. checkout emacs-27 branch and build
> > 2. emacs --fg-daemon
> > 3. emacsclient -nw
> > 4. in *scratch*
> > 
> >     (let ((margin (/ (window-body-width) 4)))
> >       (visual-line-mode 1)
> >       (insert (make-string (window-body-width) ?x))
> >       (set-window-margins nil margin margin))
> > 
> > Expected resutls:
> > 
> > The window should have symetrical margins each half the window body
> > width. The window text should be a line of 'x' wrapped at the window
> > body edge.
> > 
> > Actual results:
> > 
> >     Fatal error 11: Segmentation fault
> >     zsh: abort      emacs --fg-daemon
> 
> Thanks.
> 
> I cannot reproduce this on GNU/Linux, I get the expected result.  So
> it might be Darwin-specific, or maybe someone will be able to
> reproduce on GNU/Linux and post a backtrace.

And one more question: does this happen if you invoke Emacs with -Q?