Subject: bug#54183: 28.0.91; Emacs crashes on bookmark-jump

From: Gustavo Barros <[email-masked]>
Date: Thu, 03 Mar 2022 10:13:47 -0300

On Thu, 03 Mar 2022 at 11:41, Eli Zaretskii <[email-masked]> wrote:

> The patch is attached below (I used an attachment, to make sure
> whitespace isn't mangled in email transfer).  To apply it from Emacs,
> set the region to include the entire patch, and then type this:
>
>   M-| patch -d /path/to/emacs -p1
>
> where /path/to/emacs is the absolute file name of the top-level
> directory of the Emacs source tree, the one which has the src, lisp,
> etc. as its immediate subdirectories.

Done, no errors occurred.  Thank you for the instructions.

> Please just say "make" in the top-level directory after patching the
> sources, and then use the resulting src/emacs binary instead of your
> installed Emacs, to verify that the problem is solved.  Let's see what
> the patch does for the build you have with the configure options you
> used.  If needed, we will reconfigure later.

I did just that, except I ran lib-src/emacsclient, exactly as I was 
doing to generate the reported crash. Unfortunately, a crash still 
happens.  Below is the output from `thread apply all bt', just in case, 
since that was the first thing you had asked me initially. But whatever 
else you need, just let me know.

(gdb) continue
Continuing.
[Switching to thread 4 (Thread 0x7ff3d887b700 (LWP 115234))](running)
[Detaching after vfork from child process 115647]
[Detaching after vfork from child process 115648]
[Detaching after vfork from child process 115649]
[Detaching after vfork from child process 115650]
[Detaching after vfork from child process 115651]

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00007ff3e8a3d104 in cairo_pattern_get_surface () from 
/lib/x86_64-linux-gnu/libcairo.so.2
(gdb) thread apply all bt

Thread 4 (Thread 0x7ff3d887b700 (LWP 115234)):
#0  0x00007ff3e001e9cf in __GI___poll (fds=0x55e0bf387200, nfds=1, 
 timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ff3e86a336e in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff3e86a34a3 in g_main_context_iteration () at 
 /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff3d88cb99d in  () at 
 /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007ff3e86ccad1 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff3e1d7f609 in start_thread (arg=<optimized out>) at 
 pthread_create.c:477
#6  0x00007ff3e002b163 in clone () at 
 ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7ff3d912c700 (LWP 115233)):
#0  0x00007ff3e001e9cf in __GI___poll (fds=0x55e0bf2a45e0, nfds=2, 
 timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ff3e86a336e in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff3e86a36f3 in g_main_loop_run () at 
 /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff3e88faf8a in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ff3e86ccad1 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff3e1d7f609 in start_thread (arg=<optimized out>) at 
 pthread_create.c:477
#6  0x00007ff3e002b163 in clone () at 
 ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7ff3d9f9f700 (LWP 115232)):
#0  0x00007ff3e001e9cf in __GI___poll (fds=0x55e0be9c0680, nfds=1, 
 timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ff3e86a336e in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff3e86a34a3 in g_main_context_iteration () at 
 /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff3e86a34f1 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff3e86ccad1 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff3e1d7f609 in start_thread (arg=<optimized out>) at 
 pthread_create.c:477
#6  0x00007ff3e002b163 in clone () at 
 ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ff3dbf19400 (LWP 115231)):
#0  0x00007ff3e8a3d104 in cairo_pattern_get_surface () at 
 /lib/x86_64-linux-gnu/libcairo.so.2
#1  0x000055e0bdc9aa9b in x_cr_draw_image (f=f@entry=0x55e0c05e7d58, 
 gc=gc@entry=0x55e0bf7fae00, image=0x0, src_x=src_x@entry=0, src_y=0, 
 width=8, height=8, dest_x=0, dest_y=5, overlay_p=false) at xterm.c:624
#2  0x000055e0bdc9ad3d in x_draw_fringe_bitmap (w=<optimized out>, 
 row=<optimized out>, p=0x7ffd12be1a50) at xterm.c:1439
#3  0x000055e0bddce906 in draw_fringe_bitmap_1 
 (w=w@entry=0x55e0c073ba20, row=row@entry=0x55e0c0c92e90, 
 left_p=left_p@entry=1, overlay=<optimized out>, which=<optimized out>, 
 which@entry=0) at fringe.c:692
#4  0x000055e0bddcf5c7 in draw_fringe_bitmap (w=w@entry=0x55e0c073ba20, 
 row=row@entry=0x55e0c0c92e90, left_p=left_p@entry=1) at fringe.c:861
#5  0x000055e0bddcf7a3 in draw_row_fringe_bitmaps 
 (w=w@entry=0x55e0c073ba20, row=row@entry=0x55e0c0c92e90) at 
 fringe.c:882
#6  0x000055e0bddcf8c1 in draw_window_fringes (w=w@entry=0x55e0c073ba20, 
 no_fringe_p=no_fringe_p@entry=true) at fringe.c:930
#7  0x000055e0bdbe62f8 in gui_update_window_end (w=0x55e0c073ba20, 
 cursor_on_p=<optimized out>, mouse_face_overwritten_p=<optimized out>) 
 at dispnew.c:3853
#8  0x000055e0bdbe6a4c in update_window (w=w@entry=0x55e0c073ba20, 
 force_p=<optimized out>, force_p@entry=true) at dispnew.c:3777
#9  0x000055e0bdbe73e1 in update_window_tree (w=w@entry=0x55e0c073ba20, 
 force_p=force_p@entry=true) at dispnew.c:3407
#10 0x000055e0bdbe760b in update_frame (f=f@entry=0x55e0c05e7d58, 
 force_p=true, force_p@entry=false, 
 inhibit_hairy_id_p=inhibit_hairy_id_p@entry=false) at dispnew.c:3242
#11 0x000055e0bdc21895 in redisplay_internal () at xdisp.c:16189
#12 0x000055e0bdcd1e37 in read_char (commandflag=1, map=0x55e0c0c71953, 
 prev_event=0x0, used_mouse_menu=0x7ffd12be36ab, end_time=0x0) at 
 keyboard.c:2555
#13 0x000055e0bdcd4883 in read_key_sequence (keybuf=<optimized out>, 
 prompt=0x0, dont_downcase_last=<optimized out>, 
 can_return_switch_frame=true, fix_current_buffer=true, 
 prevent_redisplay=<optimized out>) at keyboard.c:9635
#14 0x000055e0bdcd619c in command_loop_1 () at lisp.h:1008
#15 0x000055e0bdd452a7 in internal_condition_case 
 (bfun=bfun@entry=0x55e0bdcd5fa0 <command_loop_1>, 
 handlers=handlers@entry=0x90, hfun=hfun@entry=0x55e0bdccca60 
 <cmd_error>) at eval.c:1450
#16 0x000055e0bdcc6d0a in command_loop_2 (handlers=handlers@entry=0x90) 
 at keyboard.c:1133
#17 0x000055e0bdd451e9 in internal_catch (tag=tag@entry=0xe880, 
 func=func@entry=0x55e0bdcc6ce0 <command_loop_2>, arg=arg@entry=0x90) at 
 eval.c:1181
#18 0x000055e0bdcc6ca6 in command_loop () at lisp.h:1008
#19 0x000055e0bdccc650 in recursive_edit_1 () at keyboard.c:720
#20 0x000055e0bdccc9a6 in Frecursive_edit () at keyboard.c:803
#21 0x000055e0bdbded65 in main (argc=2, argv=<optimized out>) at 
 emacs.c:2354
(gdb)