From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: leohdz172--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63614: 29.0.91; PGTK Emacs crashes after clearing the clipboard Date: Thu, 25 May 2023 06:48:17 +0000 Message-ID: References: <253496c1-088b-b54f-3c64-1cc563e70f24@proton.me> Reply-To: Leonardo =?UTF-8?Q?Hern=C3=A1ndez_?= =?UTF-8?Q?Hern=C3=A1ndez?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25318"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63614@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 25 09:31:57 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q25S0-0006OZ-Hv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 May 2023 09:31:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q25RC-0002He-WF; Thu, 25 May 2023 03:31:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q25R8-0002G7-US for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 03:31:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q25R8-00012v-Ch for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 03:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q25R8-0007mx-7i for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 03:31:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <253496c1-088b-b54f-3c64-1cc563e70f24@proton.me> Resent-From: Leonardo =?UTF-8?Q?Hern=C3=A1ndez_?= =?UTF-8?Q?Hern=C3=A1ndez?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 May 2023 07:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63614 X-GNU-PR-Package: emacs Original-Received: via spool by 63614-submit@debbugs.gnu.org id=B63614.168499981629864 (code B ref 63614); Thu, 25 May 2023 07:31:02 +0000 Original-Received: (at 63614) by debbugs.gnu.org; 25 May 2023 07:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:45834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q25QN-0007lW-Od for submit@debbugs.gnu.org; Thu, 25 May 2023 03:30:16 -0400 Original-Received: from mail-40135.protonmail.ch ([185.70.40.135]:59359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q24ly-0006XQ-4C for 63614@debbugs.gnu.org; Thu, 25 May 2023 02:48:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1684997303; x=1685256503; bh=5HSq3w48kK4yW1Tk4zLnb5rofLqokbNpQqZeNw28su8=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=X7XI9qBRnkLaCCRtBPJV1qXJmPMEOtsAclv9h68RhmfStizxHNo5bhcqcJaWdLRau 35fLAfSBBnwgbRd63O2ZSYL3IXq/3ZIrhKhrMbiyhX2cMNxu42hy6MePPJhxpRTIiN 5iSSsQvWoVCHR4/oxrVBdj2w0ooJ4On2olzEg2gcrM+PW2kcH9FFpVZYZnC+437OFI S03UN9avpTXItjK+qOh1BldFe/gI5rSX2pO9TLcgOMI5Qts1+SS802sIeIZbwz94ya IpCmhswO0zTlAydLcUzPtmO+2v/1wBeWQ4gphnrwpBGe5U1qrQpDiP+RzbO5puiRdV dGVH4WcHZ+qrg== Feedback-ID: 45473059:user:proton X-Mailman-Approved-At: Thu, 25 May 2023 03:30:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262347 Archived-At: On Thu, May 25, 2023 at 12:13:38AM -0600, Po Lu wrote: > I suppose what this shows is that an invalid SELECTION_CLEAR_EVENT has > somehow found its way in to the keyboard buffer. >=20 > We need to narrow down the scope of the problem. If you comment out the > entirety of `process_special_events', does the crash still occur? Yes, I am using this diff: diff --git a/src/keyboard.c b/src/keyboard.c index b1ccf4acde4..2c9515194f7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4401,6 +4401,7 @@ kbd_buffer_get_event (KBOARD **kbp, static void process_special_events (void) { + #if 0 union buffered_input_event *event; #if defined HAVE_X11 || defined HAVE_PGTK || defined HAVE_HAIKU #ifndef HAVE_HAIKU @@ -4476,6 +4477,7 @@ process_special_events (void) #endif =09} } + #endif } /* Process any events that are not user-visible, run timer events that and the backtrace: (gdb) bt full #0 0x00007fe5d8b238ec in () at /usr/lib64/libc.so.6 #1 0x00007fe5d8ad43e2 in raise () at /usr/lib64/libc.so.6 #2 0x0000558b3fc04c6a in terminate_due_to_signal (sig=3D11, backtrace_limi= t=3D) at emacs.c:464 #3 0x0000558b3fc05ae5 in handle_fatal_signal (sig=3D11) at sysdep.c:1783 fatal =3D #4 deliver_thread_signal (handler=3D, sig=3D11) at sysdep.c= :1775 fatal =3D #5 deliver_fatal_thread_signal (sig=3D11) at sysdep.c:1795 fatal =3D #6 handle_sigsegv (sig=3D11, siginfo=3D0x558b4048ccb0 , arg=3D) at sysdep.c:1888 fatal =3D #7 0x00007fe5d8ad4490 in () at /usr/lib64/libc.so.= 6 #8 0x0000558b3fd2795f in pgtk_handle_selection_clear (event=3D0x7ffe61851e= 40) at pgtkselect.c:742 changed_owner_time =3D 0 local_selection_time =3D dpyinfo =3D 0x40da71d0 Vselection_alist =3D selection =3D selection_symbol =3D local_selection_data =3D copy =3D {kind =3D SELECTION_CLEAR_EVENT, dpyinfo =3D 0x40da71d0, r= equestor =3D 0x0, selection =3D 0x45, target =3D 0x0, property =3D 0x0, tim= e =3D 0} event =3D obj =3D 0x0 str =3D #9 pgtk_handle_selection_event (event=3D0x7ffe61851e40) at pgtkselect.c:78= 2 copy =3D {kind =3D SELECTION_CLEAR_EVENT, dpyinfo =3D 0x40da71d0, r= equestor =3D 0x0, selection =3D 0x45, target =3D 0x0, property =3D 0x0, tim= e =3D 0} event =3D obj =3D 0x0 str =3D #10 kbd_buffer_get_event (kbp=3Dkbp@entry=3D0x7ffe618520c8, used_mouse_menu= =3Dused_mouse_menu@entry=3D0x7ffe6185263b, end_time=3Dend_time@entry=3D0x0)= at keyboard.c:4071 copy =3D {kind =3D SELECTION_CLEAR_EVENT, dpyinfo =3D 0x40da71d0, r= equestor =3D 0x0, selection =3D 0x45, target =3D 0x0, property =3D 0x0, tim= e =3D 0} event =3D obj =3D 0x0 str =3D #11 0x0000558b3fd29bc4 in read_event_from_main_queue (used_mouse_menu=3D, local_getcjmp=3D0x7ffe61852340, end_time=3D) a= t keyboard.c:2279 c =3D 0x0 save_jump =3D {{__jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_s= aved =3D 0, __saved_mask =3D {__val =3D {0 }}}} kb =3D 0x558b40d2dbd0 nextevt =3D frame =3D terminal =3D events =3D {0x7fe5d489770d, 0x13f000000, 0x558b41335113, 0x9c90d489= 770d, 0x24a, 0x558b40c05963, 0x9c90, 0x9c90, 0x4000000006000000, 0x40000000= 3f000000, 0x0, 0x558b3fe54381 , 0x9c90, 0x1618524= b0, 0xffffffffffffffff, 0x93} n =3D 0 c =3D local_getcjmp =3D {{__jmpbuf =3D {94056566772352, -1901120014703127= 217, 1, 140625090017032, 0, 94056582669987, -1901120015443421873, -56589469= 11598406321}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {94056560= 832960, 94056575718051, 586, 2, 94056560847727, 140730534536336, 40080, 140= 730534536224, 0, 0, 140625090017037, 0, 94056575718051, 0, 146, 147}}}} save_jump =3D {{__jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_s= aved =3D 0, __saved_mask =3D {__val =3D {0 }}}} tem =3D save =3D previous_echo_area_message =3D 0x0 also_record =3D 0x0 reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0x558b40d2dbd0 #12 read_decoded_event_from_main_queue (used_mouse_menu=3D, = prev_event=3D, local_getcjmp=3D, end_time=3D<= optimized out>) at keyboard.c:2343 nextevt =3D frame =3D terminal =3D events =3D {0x7fe5d489770d, 0x13f000000, 0x558b41335113, 0x9c90d489= 770d, 0x24a, 0x558b40c05963, 0x9c90, 0x9c90, 0x4000000006000000, 0x40000000= 3f000000, 0x0, 0x558b3fe54381 , 0x9c90, 0x1618524= b0, 0xffffffffffffffff, 0x93} n =3D 0 c =3D local_getcjmp =3D {{__jmpbuf =3D {94056566772352, -1901120014703127= 217, 1, 140625090017032, 0, 94056582669987, -1901120015443421873, -56589469= 11598406321}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {94056560= 832960, 94056575718051, 586, 2, 94056560847727, 140730534536336, 40080, 140= 730534536224, 0, 0, 140625090017037, 0, 94056575718051, 0, 146, 147}}}} save_jump =3D {{__jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_s= aved =3D 0, __saved_mask =3D {__val =3D {0 }}}} tem =3D save =3D previous_echo_area_message =3D 0x0 also_record =3D 0x0 reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0x558b40d2dbd0 #13 read_char (commandflag=3D1, map=3D0x558b40c8c593, prev_event=3D0x0, use= d_mouse_menu=3D0x7ffe6185263b, end_time=3D0x0) at keyboard.c:2973 c =3D local_getcjmp =3D {{__jmpbuf =3D {94056566772352, -1901120014703127= 217, 1, 140625090017032, 0, 94056582669987, -1901120015443421873, -56589469= 11598406321}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {94056560= 832960, 94056575718051, 586, 2, 94056560847727, 140730534536336, 40080, 140= 730534536224, 0, 0, 140625090017037, 0, 94056575718051, 0, 146, 147}}}} save_jump =3D {{__jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_s= aved =3D 0, __saved_mask =3D {__val =3D {0 }}}} tem =3D save =3D previous_echo_area_message =3D 0x0 also_record =3D 0x0 reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0x558b40d2dbd0 #14 0x0000558b3feda8b7 in read_key_sequence.constprop.0 (keybuf=3D, prevent_redisplay=3Dfalse, fix_current_buffe= r=3D, can_return_switch_frame=3D, dont_downca= se_last=3D, prompt=3D) at keyboard.c:10085 interrupted_kboard =3D 0x558b40d2dbd0 key =3D used_mouse_menu =3D false echo_local_start =3D 0 last_real_key_start =3D 0 keys_local_start =3D 0 new_binding =3D t =3D 0 echo_start =3D 0 keys_start =3D 0 current_binding =3D 0x558b40c8c593 first_unbound =3D 31 mock_input =3D 0 used_mouse_menu_history =3D {false } fkey =3D {parent =3D 0x558b40bb6393, map =3D 0x558b40bb6393, start = =3D 0, end =3D 0} keytran =3D {parent =3D 0x7fe5d500897b, map =3D 0x7fe5d500897b, sta= rt =3D 0, end =3D 0} indec =3D {parent =3D 0x558b40bb63a3, map =3D 0x558b40bb63a3, start= =3D 0, end =3D 0} shift_translated =3D delayed_switch_frame =3D original_uppercase =3D original_uppercase_position =3D dummyflag =3D false fake_prefixed_keys =3D 0x0 first_event =3D 0x0 second_event =3D #15 0x0000558b3fd1ebea in command_loop_1 () at keyboard.c:1384 cmd =3D keybuf =3D {0x5e, 0x558b3fddddd6 , 0x558b40b63510, 0= x558b3fe368dc , 0x0, 0x80, 0x0, 0x7fe5d4d0e738, 0x558b3= ff8d020 , 0x7fe5d50e62b5, 0x558b40ba93c4, 0x0, 0x558b= 3ff17314, 0x7fe5da405705, 0x53474e, 0x7fe5d8b31400, 0x7ffe61852c30, 0xc8655= 754adb42900, 0x9510, 0x558b3ff1dd60, 0x7ffe61852900, 0x60, 0x558b40ba93c4, = 0x0, 0x558b3ff8d020 , 0x558b3fd1c925 , 0x558b3ff17314, 0x7fe5d8b31f12 , 0x15, 0x30} i =3D prev_modiff =3D 37 prev_buffer =3D 0x7fe5d4897708 #16 0x0000558b3fdd81b7 in internal_condition_case (bfun=3D0x558b3fd1e920 , handlers=3D, hfun=3D0x558b3fd1c380 ) at eval.c:1474 val =3D c =3D 0x558b40bad350 #17 0x0000558b3fd1c63e in command_loop_2 (handlers=3Dhandlers@entry=3D0x90)= at keyboard.c:1133 val =3D #18 0x0000558b3fdd810c in internal_catch (tag=3D, func=3D0x5= 58b3fd1c610 , arg=3D0x90) at eval.c:1197 val =3D c =3D 0x558b40bacde0 #19 0x0000558b3fd1e409 in command_loop () at keyboard.c:1111 #20 0x0000558b3ff0d720 in recursive_edit_1.isra.0 () at keyboard.c:720 val =3D #21 0x0000558b3fd1e8ec in Frecursive_edit () at keyboard.c:803 buffer =3D #22 0x0000558b3fc12bad in main (argc=3D, argv=3D0x7ffe61852d= 48) at emacs.c:2529 stack_bottom_variable =3D 0x0 no_loadup =3D false junk =3D 0x0 dname_arg =3D 0x0 ch_to_dir =3D 0x0 original_pwd =3D 0x0 dump_mode =3D skip_args =3D 0 temacs =3D 0x0 attempt_load_pdump =3D only_version =3D false rlim =3D {rlim_cur =3D 10022912, rlim_max =3D 18446744073709551615} lc_all =3D sockfd =3D -1 module_assertions =3D (gdb)