GNU bug report logs - #70124
29.3.50; Crash via indirect buffers

Previous Next

Package: emacs;

Reported by: Braun Gábor <braungb88 <at> gmail.com>

Date: Mon, 1 Apr 2024 10:55:02 UTC

Severity: normal

Found in version 29.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 70124-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Braun Gábor <braungb88 <at> gmail.com>
Cc: 70124-done <at> debbugs.gnu.org
Subject: Re: bug#70124: 29.3.50; Crash via indirect buffers
Date: Mon, 01 Apr 2024 15:03:59 +0300
> From: Braun Gábor <braungb88 <at> gmail.com>
> 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.




This bug report was last modified 1 year and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.