emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland


From: Gerd Möllmann
Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland
Date: Thu, 05 Sep 2024 15:37:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> Cc: Eval EXEC <execvy@gmail.com>,  pipcet@protonmail.com,  
>> emacs-devel@gnu.org
>> Date: Thu, 05 Sep 2024 15:20:40 +0200
>> 
>> >> #23 <signal handler called>
>> >> No symbol table info available.
>> >> #24 0x0000000000692cd8 in fix_frame (f=0x7f5f87885498,
>> >> ss=0x7ffe0290f6a8) at
>> >> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/igc.c:2068
>> >
>> > This segfault is here:
>> >
>> >     if (!FRAME_INITIAL_P (f))
>> >       {
>> >    /* This is typically stored in the display_info, e.g.
>> >       ns_display_info.  Check for being NULL anyway.  */
>> >    Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);  <<<<<<<<<<<<<<<<<<<<<<<
>> >    if (hlinfo)
>> >      {
>> >        IGC_FIX12_OBJ (ss, &hlinfo->mouse_face_window);
>> >        IGC_FIX12_OBJ (ss, &hlinfo->mouse_face_overlay);
>> >        IGC_FIX12_RAW (ss, &hlinfo->mouse_face_mouse_frame);
>> >      }
>> >       }
>> >
>> > This code was added just a few days ago.  MOUSE_HL_INFO expands to:
>> >
>> >   # define MOUSE_HL_INFO(F)                                        \
>> >     (FRAME_WINDOW_P (F)                                            \
>> >      ? &FRAME_DISPLAY_INFO(F)->mouse_highlight                     \
>> >      : &(F)->output_data.tty->display_info->mouse_highlight)
>> >
>> > So this looks like FRAME_DISPLAY_INFO(F) is not traced or something?
>> 
>> Hm, sesms we have to check for FRAME_OUTPUT_DATA being null for window
>> frames.
>
> Why do you think so?  Are we sure FRAME_OUTPUT_DATA is NULL in this
> case (as opposed to a pointer that cannot be dereferenced because it
> was moved)?

I would be 100% sure only if I had it in the debugger :-).
But if you look a bit further down in fix_frame:

    if (FRAME_WINDOW_P (f) && FRAME_OUTPUT_DATA (f))
      {
        struct font **font_ptr = &FRAME_FONT (f);
        if (*font_ptr)
          IGC_FIX12_PVEC (ss, font_ptr);
        Lisp_Object *nle = &FRAME_DISPLAY_INFO (f)->name_list_element;

That means FRAME_OUTPUT_DATA can be null during the lifetime of a
frame. If that happens, we'll crash exactly in that way in the new code
for window frames.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]