[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71224: 30.0.50; SIGSEGV in start_display
From: |
Eli Zaretskii |
Subject: |
bug#71224: 30.0.50; SIGSEGV in start_display |
Date: |
Fri, 07 Jun 2024 22:46:35 +0300 |
> 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.