From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs Date: Fri, 19 Mar 2021 13:55:41 +0200 Message-ID: <83sg4re4si.fsf@gnu.org> References: <87im5ofp3z.fsf@md5i.com> <87czvwfoys.fsf@md5i.com> <83tup8fo1j.fsf@gnu.org> <87wnu4qvfi.fsf@md5i.com> <83sg4sfm1w.fsf@gnu.org> <83pmzwfgng.fsf@gnu.org> <83im5off16.fsf@gnu.org> <83h7l8fdfa.fsf@gnu.org> <871rccgqyz.fsf@igel.home> <83eegcfbrh.fsf@gnu.org> <91a20795-4dc5-0007-42a0-7b9fbb011058@gmx.at> <83y2ejees4.fsf@gnu.org> <98b0c1ef-7d2e-03b2-166f-4820a9133309@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31243"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mwd@md5i.com, schwab@linux-m68k.org, 47244@debbugs.gnu.org, mwd@cert.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 19 12:57:12 2021 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 1lNDkd-0007sm-0L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 12:57:11 +0100 Original-Received: from localhost ([::1]:59256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNDkb-0004m1-8X for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 07:57:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNDkU-0004le-0S for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 07:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNDkT-0001v4-Nk for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 07:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNDkT-0005AG-Ko for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 07:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Mar 2021 11:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47244 X-GNU-PR-Package: emacs Original-Received: via spool by 47244-submit@debbugs.gnu.org id=B47244.161615497219793 (code B ref 47244); Fri, 19 Mar 2021 11:57:01 +0000 Original-Received: (at 47244) by debbugs.gnu.org; 19 Mar 2021 11:56:12 +0000 Original-Received: from localhost ([127.0.0.1]:48972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNDjd-000597-6X for submit@debbugs.gnu.org; Fri, 19 Mar 2021 07:56:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNDjX-00058W-WA for 47244@debbugs.gnu.org; Fri, 19 Mar 2021 07:56:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58432) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNDjP-0001Hc-0V; Fri, 19 Mar 2021 07:55:55 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2644 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lNDjA-00064q-6Q; Fri, 19 Mar 2021 07:55:50 -0400 In-Reply-To: <98b0c1ef-7d2e-03b2-166f-4820a9133309@gmx.at> (message from martin rudalics on Fri, 19 Mar 2021 10:18:33 +0100) 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" Xref: news.gmane.io gmane.emacs.bugs:202684 Archived-At: > Cc: schwab@linux-m68k.org, mwd@md5i.com, 47244@debbugs.gnu.org, mwd@cert.org > From: martin rudalics > Date: Fri, 19 Mar 2021 10:18:33 +0100 > > > Sorry, I don't understand: when kill-buffer kills the current buffer, > > it replaces it with another one. Are you saying we have a way of > > killing buffers that bypasses kill-buffer? if so, can you describe how > > that can be done? > > > > Or what else am I missing? > > Redisplay occasionally does things like > > saved_current_buffer = current_buffer; > current_buffer = XBUFFER (w->contents); > ... > current_buffer = saved_current_buffer; It does? where? We are talking about redisplay_internal here (because that's where the segfault happened), not about redisplay_window and its subroutines. redisplay_internal generally doesn't need to be bothered with the current buffer, it only does so once, in the optimization it implements. And in that code, I see no paradigm like what you show. Am I missing something? > What if ... killed saved_current_buffer? I don't see how that could happen in redisplay_internal. Maybe you had redisplay_window in mind. It does set_buffer_internal_1 (XBUFFER (w->contents)); If you imply that a window's buffer could be killed (which I still don't understand how can happen, given what kill-buffer does), then I think set_buffer_internal_1 would detect that. If not, we could test that explicitly, but then the question would be: what to do if we detect that the buffer is indeed killed?