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#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related) Date: Tue, 11 May 2021 22:55:55 +0300 Message-ID: <83cztx3v04.fsf@gnu.org> References: <87tunasd2u.fsf@linaro.org> <83fsyu57oj.fsf@gnu.org> <838s4l5uld.fsf@gnu.org> <83zgx14cal.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2185"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48337@debbugs.gnu.org, alex.bennee@linaro.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 11 21:56:34 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 1lgYUc-0000SH-4H for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 21:56:34 +0200 Original-Received: from localhost ([::1]:55876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgYUb-0006Th-23 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 15:56:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgYU6-0006Su-AW for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 15:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgYU6-0001NO-34 for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 15:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgYU6-0002Id-2u for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 15:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 May 2021 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48337 X-GNU-PR-Package: emacs Original-Received: via spool by 48337-submit@debbugs.gnu.org id=B48337.16207629568828 (code B ref 48337); Tue, 11 May 2021 19:56:02 +0000 Original-Received: (at 48337) by debbugs.gnu.org; 11 May 2021 19:55:56 +0000 Original-Received: from localhost ([127.0.0.1]:37520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgYU0-0002IK-DC for submit@debbugs.gnu.org; Tue, 11 May 2021 15:55:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgYTz-0002I6-80 for 48337@debbugs.gnu.org; Tue, 11 May 2021 15:55:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35296) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgYTt-0001Ex-B5; Tue, 11 May 2021 15:55:49 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3836 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgYTr-0000lA-EF; Tue, 11 May 2021 15:55:48 -0400 In-Reply-To: (message from Alan Mackenzie on Tue, 11 May 2021 19:45:23 +0000) 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:206286 Archived-At: > Date: Tue, 11 May 2021 19:45:23 +0000 > Cc: Alex Bennée , > 48337@debbugs.gnu.org > From: Alan Mackenzie > > > Alan, the code in nth_minibuffer and its callers is unsafe. First, > > Fnthcdr can return nil, and then XCAR of that in nth_minibuffer > > crashes. I fixed that now on the master branch, .... > > That Fnthcdr call "can't possibly" return nil, unless there's a bug > somewhere. Then the commentary of nth_minibuffer is outdated and should be updated: it claims that returning nil is part of the contract. > > Fset_buffer (nth_minibuffer (minibuf_level)); > > This, I think, can be justified - if read_minibuf_unwind can't find the > minibuffer it's unwinding, we've got a serious problem and ought to > abort Emacs ASAP. Should that, perhaps, be an explicit assert? If you want to abort, assertions is not TRT, as it will not be compiled in an optimized build. Call emacs_abort instead.