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#70124: 29.3.50; Crash via indirect buffers Date: Mon, 01 Apr 2024 15:03:59 +0300 Message-ID: <86v8519tn4.fsf@gnu.org> References: <12427969.O9o76ZdvQC@gabor> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25923"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70124-done@debbugs.gnu.org To: Braun =?UTF-8?Q?G=C3=A1bor?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 14:05:36 2024 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 1rrGPw-0006YG-Fd for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 14:05:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrGPP-000135-LK; Mon, 01 Apr 2024 08:05:03 -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 1rrGPN-00012N-Jn for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 08:05:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrGPL-0002qa-5Y for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 08:04:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrGPO-0002r7-7Z for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 08:05:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 12:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 70124 X-GNU-PR-Package: emacs Mail-Followup-To: 70124@debbugs.gnu.org, eliz@gnu.org, braungb88@gmail.com Original-Received: via spool by 70124-done@debbugs.gnu.org id=D70124.171197305510905 (code D ref 70124); Mon, 01 Apr 2024 12:05:01 +0000 Original-Received: (at 70124-done) by debbugs.gnu.org; 1 Apr 2024 12:04:15 +0000 Original-Received: from localhost ([127.0.0.1]:49776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrGOd-0002po-BC for submit@debbugs.gnu.org; Mon, 01 Apr 2024 08:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrGOb-0002pZ-IY for 70124-done@debbugs.gnu.org; Mon, 01 Apr 2024 08:04:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrGOT-0002j8-4X; Mon, 01 Apr 2024 08:04:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=S72KtOYFQ8XBvbu0rWmR4+hSEGH8rO3TlMkfoCyAfjQ=; b=PYpWA/Kg4R5QxMrTgSwb lmHL9fAlnZw6SOZmMgqi+gvBadzedZ/zq4w5tmhHBt3PSfbsYB7es04YCR6DGrC3htm80n6/jb2np qTd4/iDqxS7b7GN8gDE90kdhjxt9P2PxlVWf4o5lLtZv802znNyu/9DqXkcPCtO7tvm1uqMBLUCAI uhCE7ZzIanrtkJCNwVJrHb+4/Z1cJiNh/rKfBTaF6tBrQG7ldEiseS6KJjPTwBhmDGE/r+0gvsmjk XCGBoCQ6cP3JX/HAXyPx+Hm0UerZiSzHmda5/z+NO3J2gO/+IA1elzV83LSlGmbAu13SLsUd55zKO z/i4Ez+VaLyOEg==; In-Reply-To: <12427969.O9o76ZdvQC@gabor> (message from Braun =?UTF-8?Q?G=C3=A1bor?= on Mon, 01 Apr 2024 12:54:20 +0200) 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:282471 Archived-At: > From: Braun Gábor > Date: Mon, 01 Apr 2024 12:54:20 +0200 > > After building Emacs from source, I have added the following file > to the build directory: > > File ./bug-indirect-crash.el > > ;;; bug-indirect-crash.el --- Crash via indirect buffer -*- > lexical-binding: t; coding: utf-8; -*- > > ;;; Commentary: > ;; Crash Emacs by stupid use of indirect buffers. > > ;;; Code: > (let (buffer) > (with-temp-buffer > (with-current-buffer > (setq buffer > (make-indirect-buffer > (current-buffer) > (generate-new-buffer-name "indirect"))) > (setq-local kill-buffer-query-functions (list #'ignore)))) > (with-demoted-errors "Error: %S" (set-buffer buffer)) > (message "Current buffer: %s" (current-buffer)) > (insert ?A)) > ;;; bug-indirect-crash.el ends here. > > End of file./bug-indirect-crash.el > > Below is the command I have run Emacs and the output of the > command: > > $ src/emacs -Q --batch -l ./bug-indirect-crash.el > Error: (error "Marker does not point anywhere") > Current buffer: indirect > Fatal error 11: Segmentation fault > > > I find the error about the marker weird, have no idea which marker > it > is. > I expect an error like "Selecting deleted buffer" instead. > I also find the second line strange: > (seemingly an indirect buffer is current whose base buffer is > killed). Thanks. This is already fixed on the master branch (which will eventually become Emacs 30), where I get: emacs -Q --batch -l d:/usr/eli/data/bug-indirect-crash.el Unable to kill buffer whose indirect buffer `indirect' cannot be killed (Btw, even on the emacs-29 branch I don't see a crash, I see an error: emacs -Q --batch -l d:/usr/eli/data /bug-indirect-crash.el Error: (error "Marker does not point anywhere") Current buffer: indirect But that could be system-dependent.) So I'm closing this bug as already solved.