unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Clemente <n142857@gmail.com>
Cc: 71224@debbugs.gnu.org
Subject: bug#71224: 30.0.50; SIGSEGV in start_display
Date: Fri, 07 Jun 2024 22:46:35 +0300	[thread overview]
Message-ID: <86wmn0edt0.fsf@gnu.org> (raw)
In-Reply-To: <CAJKAhPDw16RQjnXqp3NvaiCqZELqZJ1cVoEGJLrPWHF=Fprw_w@mail.gmail.com> (message from Daniel Clemente on Fri, 7 Jun 2024 16:08:11 +0000)

> From: Daniel Clemente <n142857@gmail.com>
> Date: Fri, 7 Jun 2024 16:08:11 +0000
> Cc: 71224@debbugs.gnu.org
> 
> Sorry for the long wait, I was focused on other bugs.
> This one is about the null glyph matrices.
> It still happens after the fixes in 71223 that improve fast
> opening+closing. I'm using 7d36bb0547f, fairly recent.
> 
> After a few hours of debugging and learning. I found a very simple
> formula to produce the SIGSEGV. No GC involved, and no automated
> window opening/resizing.
> To reproduce it:
> 
> emacs --fg-daemon -Q
> emacsclient -c
> 
> Open a buffer with this code in it:
> (defun recurse () (recurse))
> (recurse)
> 
> And eval the defun. Don't call (recurse) yet.
> 
> Do: M-x debug
> This opens the backtrace window.
> Use C-x o  to go away from the backtrace window and back to that
> buffer with the Lisp code.
> Now eval (with C-x C-e) the call to (recurse)
> You get a message in the minibuffer: cl-prin1, excessive-lisp-nesting,
> and the backtrace window is updated.
> Don't close that backtrace window.
> 
> Open a new frame, as before: emacsclient -c
> The daemon crashes with SIGSEGV.
> 
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00005555555d7833 in redisplay_window (window=XIL(0x55555631d5e5),
> just_this_one_p=false) at xdisp.c:19961
> 19961      *w->desired_matrix->method = 0;
> (gdb) bt
> #0  0x00005555555d7833 in redisplay_window
> (window=XIL(0x55555631d5e5), just_this_one_p=false)
>     at xdisp.c:19961
> #1  0x00005555555d0a95 in redisplay_window_0
> (window=XIL(0x55555631d5e5)) at xdisp.c:18016
> #2  0x000055555576c9e2 in internal_condition_case_1
> (bfun=0x5555555d0a53 <redisplay_window_0>,
>     arg=XIL(0x55555631d5e5), handlers=XIL(0x7ffff1e5506b),
> hfun=0x5555555d0931 <redisplay_window_error>)
>     at eval.c:1637
> #3  0x00005555555d0907 in redisplay_windows
> (window=XIL(0x55555631d5e5)) at xdisp.c:17985
> #4  0x00005555555cf486 in redisplay_internal () at xdisp.c:17384
> #5  0x00005555555cffcc in redisplay_preserve_echo_area (from_where=2)
> at xdisp.c:17743
> #6  0x00005555555950e6 in Fredisplay (force=XIL(0)) at dispnew.c:6368

Thanks, I could reproduce this and installed a fix.

The result of the fix is that the daemon doesn't crash; the last
client gets an error message and exits, but the terminal from which
the last client connection was attempted is left in messed up state.
The user will then need to reset the terminal somehow, e.g. with "tput
reset" or somesuch.





  reply	other threads:[~2024-06-07 19:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 11:03 bug#71224: 30.0.50; SIGSEGV in start_display Daniel Clemente
2024-05-27 12:16 ` Eli Zaretskii
2024-05-28 15:36   ` Daniel Clemente
2024-05-28 15:55     ` Eli Zaretskii
2024-05-28 16:49       ` Daniel Clemente
2024-05-28 18:16         ` Eli Zaretskii
2024-05-28 18:45           ` Daniel Clemente
2024-05-28 19:17             ` Eli Zaretskii
2024-05-29  5:56               ` Daniel Clemente
2024-05-29 16:35                 ` Eli Zaretskii
2024-05-30  9:55                   ` Daniel Clemente
2024-05-30 12:05                     ` Eli Zaretskii
2024-06-07 16:08                       ` Daniel Clemente
2024-06-07 19:46                         ` Eli Zaretskii [this message]
     [not found]                           ` <CAJKAhPBdc2Og+UsgoCVwK_AOKnewdF5P3aV86Mr-FJOz4zNVvg@mail.gmail.com>
2024-06-10 16:30                             ` Eli Zaretskii
2024-06-12 13:47                               ` Daniel Clemente

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wmn0edt0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71224@debbugs.gnu.org \
    --cc=n142857@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).