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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 27 Dec 2019 12:29:24 +0200

> From: "Paul W. Rankin" <[email-masked]>
> Date: Fri, 27 Dec 2019 18:04:11 +1000
> 
> Emacs will segfault if first launched as a daemon, then accessed with
> emacsclient -nw and setting margins cause a string to visually wrap in a
> window.
> 
> Revised steps to reproduce:
> 
> 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.