unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70124: 29.3.50; Crash via indirect buffers
@ 2024-04-01 10:54 Braun Gábor
  2024-04-01 12:03 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Braun Gábor @ 2024-04-01 10:54 UTC (permalink / raw)
  To: 70124

Hi,

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).


gdb session:

Current directory is /home/gabor/src/build/emacs-29.3/src/
GNU gdb (Debian 13.1-3) 13.1
Reading symbols from /home/gabor/src/build/emacs-29.3/src/emacs...
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input 
not from terminal]
DISPLAY = :0
TERM = dumb
Breakpoint 2 at 0x13a480: file ../../../emacs/src/xterm.c, line 
26136.
.gdbinit:1: Error in sourced command file:
/home/gabor/src/build/emacs-29.3/../../emacs/src/.gdbinit:1375: 
Error in sourced command file:
Scripting in the "Python" language is not supported in this copy 
of GDB.
Downloading source file /home/gabor/src/build/emacs-29.3/src/
<built-in>...
(gdb) run
Starting program: /home/gabor/src/build/emacs-29.3/src/emacs -Q --
batch -l ../bug-indirect-crash.el
Downloading separate debug info for system-supplied DSO at 
0x7ffff7fc9000...
Downloading separate debug info for /lib/x86_64-linux-gnu/
libdbus-1.so.3...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/
libthread_db.so.1".
Downloading separate debug info for /usr/lib/x86_64-linux-gnu/
libfribidi.so.0...

Program received signal SIGSEGV, Segmentation fault.
Download failed: Invalid argument.  Continuing without source file 
./string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S.
__memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/
memmove-vec-unaligned-erms.S:331
Download failed: Invalid argument.  Continuing without source file 
./string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S.
331	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-
erms.S: No such file or directory.
(gdb) Download failed: Invalid argument.  Continuing without 
source file ./string/../sysdeps/x86_64/multiarch/memmove-vec-
unaligned-erms.S.
bt full
#0  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/
memmove-vec-unaligned-erms.S:331
No locals.
#1  0x00005555556ffc43 in insert_1_both 
(string=string@entry=0x7fffffffdb6b "AUU", nchars=nchars@entry=1, 
nbytes=nbytes@entry=1, inherit=inherit@entry=false, 
prepare=prepare@entry=true, 
before_markers=before_markers@entry=false) at ../../../emacs/src/
insdel.c:918
No locals.
#2  0x0000555555700260 in insert_1_both (before_markers=false, 
prepare=true, inherit=false, nbytes=1, nchars=1, 
string=0x7fffffffdb6b "AUU") at ../../../emacs/src/insdel.c:888
No locals.
#3  insert (string=0x7fffffffdb6b "AUU", nbytes=1) at ../../../
emacs/src/insdel.c:679
        len = 1
        opoint = <optimized out>
#4  0x000055555574dc18 in general_insert_function 
(insert_func=0x5555557002b0 <insert>, 
insert_from_string_func=0x555555700580 <insert_from_string>, 
inherit=inherit@entry=false, nargs=1, args=0x7fffffffdbc0) at 
../../../emacs/src/editfns.c:1353
        c = <optimized out>
        str = "AUU\000"
        len = <optimized out>
        argnum = 0
        val = <optimized out>
#5  0x000055555574dcaf in Finsert (nargs=<optimized out>, 
args=<optimized out>) at ../../../emacs/src/editfns.c:1393
No locals.
#6  0x000055555575fdb7 in eval_sub (form=<optimized out>) at 
../../../emacs/src/eval.c:2474
        vals = 0x7fffffffdbc0
        argnum = <optimized out>
        sa_avail = <optimized out>
        sa_count = {
          bytes = 1184
        }
        args_left = <optimized out>
        numargs = 1
        original_fun = <optimized out>
        original_args = 0x555555eb48c3
        count = <optimized out>
        fun = <optimized out>
        val = <optimized out>
        funcar = <optimized out>
        argvals = {0x7ffff1a7e70d, 0x55555575c1f2 <unbind_to+594>, 
0x555555eb4000, 0x55555576a3a4 <Fnconc+244>, 0xb, 0xd500, 0x0, 
0x555555eb4e33}
        retry = <optimized out>
#7  0x0000555555761be5 in Fprogn (body=0x0) at ../../../emacs/src/
eval.c:436
        form = <optimized out>
        val = 0x555555ed1d94
        val = <optimized out>
        form = <optimized out>
#8  Flet (args=0x555555eb42b3) at ../../../emacs/src/eval.c:1026
        temps = 0x7fffffffdc80
        tem = <optimized out>
        lexenv = 0x555555eb42e3
        elt = <optimized out>
        count = {
          bytes = 1120
        }
        argnum = <optimized out>
        sa_avail = <optimized out>
        sa_count = {
          bytes = 1120
        }
        varlist = <optimized out>
        varlist_len = <optimized out>
        nvars = <optimized out>
#9  0x000055555575fef7 in eval_sub (form=<optimized out>) at 
../../../emacs/src/eval.c:2453
        args_left = 0x555555eb42b3
        numargs = 5
        original_fun = 0xa560
        original_args = 0x555555eb42b3
        count = <optimized out>
        fun = <optimized out>
        val = <optimized out>
        funcar = <optimized out>
        argvals = {0x0, 0x555555786954 
<readevalloop_eager_expand_eval+340>, 0x36, 0x1, 0x2aaa9c0d7690, 
0x555555eb4e53, 0x30, 0x7fffffffde00}
        retry = <optimized out>
#10 0x000055555578e869 in readevalloop 
(readcharfun=readcharfun@entry=0x555555ec6f8d, 
infile0=infile0@entry=0x0, 
sourcename=sourcename@entry=0x555555ed0144, 
printflag=printflag@entry=false, unibyte=unibyte@entry=0x0, 
readfun=readfun@entry=0x0, start=0x0, end=<optimized out>) at 
../../../emacs/src/lread.c:2348
        count1 = <optimized out>
        c = <optimized out>
        val = 0x555555eb4e53
        count = <optimized out>
        b = <optimized out>
        continue_reading_p = true
        lex_bound = <optimized out>
        whole_buffer = true
        first_sexp = <optimized out>
        macroexpand = 0x2aaa9c0d7690
#11 0x000055555578f967 in Feval_buffer (buffer=<optimized out>, 
printflag=0x0, filename=0x555555ed0144, unibyte=0x0, 
do_allow_print=<optimized out>) at ../../../emacs/src/lread.c:2421
        count = <optimized out>
        tem = <optimized out>
        buf = 0x555555ec6f8d
#12 0x00005555557a4e92 in exec_byte_code (fun=<optimized out>, 
args_template=<optimized out>, nargs=<optimized out>, 
args=<optimized out>) at ../../../emacs/src/bytecode.c:809
        call_nargs = 5
        call_fun = <optimized out>
        count1 = <optimized out>
        template = <optimized out>
        val = <optimized out>
        call_args = 0x7ffff11ff290
        original_fun = 0x2aaa9bfe9d40
        bytecode = <optimized out>
        op = 5
        type = <optimized out>
        targets = {0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555557a527d <exec_byte_code+1981>, 0x5555557a5278 
<exec_byte_code+1976>, 0x5555557a5273 <exec_byte_code+1971>, 
0x5555557a4c8e <exec_byte_code+462>, 0x5555557a4c8e 
<exec_byte_code+462>, 0x5555557a523f <exec_byte_code+1919>, 
0x5555557a520b <exec_byte_code+1867>, 0x5555557a59e1 
<exec_byte_code+3873>, 0x5555557a59dc <exec_byte_code+3868>, 
0x5555557a59d7 <exec_byte_code+3863>, 0x5555557a59d2 
<exec_byte_code+3858>, 0x5555557a4cbd <exec_byte_code+509>, 
0x5555557a4cc0 <exec_byte_code+512>, 0x5555557a59c4 
<exec_byte_code+3844>, 0x5555557a59e6 <exec_byte_code+3878>, 
0x5555557a5a71 <exec_byte_code+4017>, 0x5555557a5a6c 
<exec_byte_code+4012>, 0x5555557a5a67 <exec_byte_code+4007>, 
0x5555557a5a62 <exec_byte_code+4002>, 0x5555557a4c1a 
<exec_byte_code+346>, 0x5555557a4c20 <exec_byte_code+352>, 
0x5555557a5a46 <exec_byte_code+3974>, 0x5555557a5a54 
<exec_byte_code+3988>, 0x5555557a59f9 <exec_byte_code+3897>, 
0x5555557a59f4 <exec_byte_code+3892>, 0x5555557a5fb5 
<exec_byte_code+5365>, 0x5555557a5fb0 <exec_byte_code+5360>, 
0x5555557a4f1a <exec_byte_code+1114>, 0x5555557a4f20 
<exec_byte_code+1120>, 0x5555557a5a0c <exec_byte_code+3916>, 
0x5555557a59fe <exec_byte_code+3902>, 0x5555557a5f8f 
<exec_byte_code+5327>, 0x5555557a5f8a <exec_byte_code+5322>, 
0x5555557a5f85 <exec_byte_code+5317>, 0x5555557a5f80 
<exec_byte_code+5312>, 0x5555557a4d2b <exec_byte_code+619>, 
0x5555557a4d30 <exec_byte_code+624>, 0x5555557a5fa2 
<exec_byte_code+5346>, 0x5555557a5f94 <exec_byte_code+5332>, 
0x5555557a5f5f <exec_byte_code+5279>, 0x5555557a5f5a 
<exec_byte_code+5274>, 0x5555557a5f55 <exec_byte_code+5269>, 
0x5555557a5f50 <exec_byte_code+5264>, 0x5555557a4f63 
<exec_byte_code+1187>, 0x5555557a4f68 <exec_byte_code+1192>, 
0x5555557a5f72 <exec_byte_code+5298>, 0x5555557a5f64 
<exec_byte_code+5284>, 0x5555557a5bc9 <exec_byte_code+4361>, 
0x5555557a5bf6 <exec_byte_code+4406>, 0x5555557a5c60 
<exec_byte_code+4512>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555557a6ddf 
<exec_byte_code+8991>, 0x5555557a6d73 <exec_byte_code+8883>, 
0x5555557a6d37 <exec_byte_code+8823>, 0x5555557a6cfb 
<exec_byte_code+8763>, 0x5555557a6cbd <exec_byte_code+8701>, 
0x5555557a5ae3 <exec_byte_code+4131>, 0x5555557a5aaa 
<exec_byte_code+4074>, 0x5555557a6c92 <exec_byte_code+8658>, 
0x5555557a5b95 <exec_byte_code+4309>, 0x5555557a5a76 
<exec_byte_code+4022>, 0x5555557a6c59 <exec_byte_code+8601>, 
0x5555557a6c30 <exec_byte_code+8560>, 0x5555557a6bf7 
<exec_byte_code+8503>, 0x5555557a6bc1 <exec_byte_code+8449>, 
0x5555557a6b87 <exec_byte_code+8391>, 0x5555557a6b22 
<exec_byte_code+8290>, 0x5555557a6ab4 <exec_byte_code+8180>, 
0x5555557a6a3f <exec_byte_code+8063>, 0x5555557a6a16 
<exec_byte_code+8022>, 0x5555557a69ed <exec_byte_code+7981>, 
0x5555557a69b4 <exec_byte_code+7924>, 0x5555557a697b 
<exec_byte_code+7867>, 0x5555557a6942 <exec_byte_code+7810>, 
0x5555557a6905 <exec_byte_code+7749>, 0x5555557a68d2 
<exec_byte_code+7698>, 0x5555557a689f <exec_byte_code+7647>, 
0x5555557a686c <exec_byte_code+7596>, 0x5555557a67db 
<exec_byte_code+7451>, 0x5555557a6786 <exec_byte_code+7366>, 
0x5555557a673c <exec_byte_code+7292>, 0x5555557a66ef 
<exec_byte_code+7215>, 0x5555557a66a2 <exec_byte_code+7138>, 
0x5555557a6655 <exec_byte_code+7061>, 0x5555557a6608 
<exec_byte_code+6984>, 0x5555557a65b7 <exec_byte_code+6903>, 
0x5555557a6561 <exec_byte_code+6817>, 0x5555557a6510 
<exec_byte_code+6736>, 0x5555557a64bf <exec_byte_code+6655>, 
0x5555557a646e <exec_byte_code+6574>, 0x5555557a641c 
<exec_byte_code+6492>, 0x5555557a6340 <exec_byte_code+6272>, 
0x5555557a4fa9 <exec_byte_code+1257>, 0x5555557a6317 
<exec_byte_code+6231>, 0x5555557a62e9 <exec_byte_code+6185>, 
0x5555557a626a <exec_byte_code+6058>, 0x5555557a6227 
<exec_byte_code+5991>, 0x5555557a61fe <exec_byte_code+5950>, 
0x5555557a61d3 <exec_byte_code+5907>, 0x5555557a61a8 
<exec_byte_code+5864>, 0x5555557a6175 <exec_byte_code+5813>, 
0x5555557a614a <exec_byte_code+5770>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a611f <exec_byte_code+5727>, 
0x5555557a60f4 <exec_byte_code+5684>, 0x5555557a60c9 
<exec_byte_code+5641>, 0x5555557a609e <exec_byte_code+5598>, 
0x5555557a6073 <exec_byte_code+5555>, 0x5555557a604a 
<exec_byte_code+5514>, 0x5555557a4fa9 <exec_byte_code+1257>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555557a600c 
<exec_byte_code+5452>, 0x5555557a5fe3 <exec_byte_code+5411>, 
0x5555557a5fba <exec_byte_code+5370>, 0x5555557a58cb 
<exec_byte_code+3595>, 0x5555557a5892 <exec_byte_code+3538>, 
0x5555557a5869 <exec_byte_code+3497>, 0x5555557a5840 
<exec_byte_code+3456>, 0x5555557a5807 <exec_byte_code+3399>, 
0x5555557a57ce <exec_byte_code+3342>, 0x5555557a5795 
<exec_byte_code+3285>, 0x5555557a576a <exec_byte_code+3242>, 
0x5555557a5741 <exec_byte_code+3201>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a5d50 <exec_byte_code+4752>, 
0x5555557a5ee1 <exec_byte_code+5153>, 0x5555557a598a 
<exec_byte_code+3786>, 0x5555557a5ea7 <exec_byte_code+5095>, 
0x5555557a5e70 <exec_byte_code+5040>, 0x5555557a5e39 
<exec_byte_code+4985>, 0x5555557a5da2 <exec_byte_code+4834>, 
0x5555557a5d84 <exec_byte_code+4804>, 0x5555557a5a1a 
<exec_byte_code+3930>, 0x5555557a5d32 <exec_byte_code+4722>, 
0x5555557a5cd6 <exec_byte_code+4630>, 0x5555557a5ca8 
<exec_byte_code+4584>, 0x5555557a5c68 <exec_byte_code+4520>, 
0x5555557a6efb <exec_byte_code+9275>, 0x5555557a6ebe 
<exec_byte_code+9214>, 0x5555557a6e7b <exec_byte_code+9147>, 
0x5555557a6e25 <exec_byte_code+9061>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a5704 <exec_byte_code+3140>, 
0x5555557a56db <exec_byte_code+3099>, 0x5555557a56b2 
<exec_byte_code+3058>, 0x5555557a5689 <exec_byte_code+3017>, 
0x5555557a5660 <exec_byte_code+2976>, 0x5555557a5627 
<exec_byte_code+2919>, 0x5555557a55ee <exec_byte_code+2862>, 
0x5555557a55b5 <exec_byte_code+2805>, 0x5555557a557c 
<exec_byte_code+2748>, 0x5555557a552f <exec_byte_code+2671>, 
0x5555557a54f6 <exec_byte_code+2614>, 0x5555557a54bd 
<exec_byte_code+2557>, 0x5555557a5497 <exec_byte_code+2519>, 
0x5555557a543c <exec_byte_code+2428>, 0x5555557a53e1 
<exec_byte_code+2337>, 0x5555557a53ae <exec_byte_code+2286>, 
0x5555557a537b <exec_byte_code+2235>, 0x5555557a534b 
<exec_byte_code+2187>, 0x5555557a63cb <exec_byte_code+6411>, 
0x5555557a6383 <exec_byte_code+6339>, 0x5555557a52e5 
<exec_byte_code+2085>, 0x5555557a5282 <exec_byte_code+1986>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555557a6b4b <exec_byte_code+8331>, 0x5555557a6830 
<exec_byte_code+7536>, 0x5555557a62ad <exec_byte_code+6125>, 
0x5555557a51cf <exec_byte_code+1807>, 0x5555557a5193 
<exec_byte_code+1747>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555557a5164 
<exec_byte_code+1700>, 0x5555557a5934 <exec_byte_code+3700>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a5904 <exec_byte_code+3652> 
<repeats 64 times>}
        quitcounter = 1 '\001'
        bc = 0x555555cf3e70 <main_thread+496>
        top = <optimized out>
        pc = <optimized out>
        bytestr = <optimized out>
        vector = <optimized out>
        maxdepth = <optimized out>
        const_length = <optimized out>
        bytestr_length = <optimized out>
        vectorp = 0x7ffff1d685c8
        max_stack = <optimized out>
        frame_base = <optimized out>
        fp = <optimized out>
        bytestr_data = <optimized out>
        rest = <optimized out>
        mandatory = <optimized out>
        nonrest = <optimized out>
        pushedargs = <optimized out>
        result = <optimized out>
#13 0x000055555575c626 in Ffuncall (nargs=nargs@entry=5, 
args=args@entry=0x7fffffffe040) at ../../../emacs/src/eval.c:2999
        count = <optimized out>
        val = <optimized out>
#14 0x000055555578f5ed in call4 (arg4=0x30, arg3=<optimized out>, 
arg2=0x555555ed0144, arg1=<optimized out>, fn=<optimized out>) at 
../../../emacs/src/lisp.h:3270
No locals.
#15 Fload (file=0x555555ecfe64, noerror=<optimized out>, 
nomessage=<optimized out>, nosuffix=<optimized out>, 
must_suffix=<optimized out>) at ../../../emacs/src/lread.c:1484
        val = <optimized out>
        stream = 0x0
        fd = 4
        fd_index = <optimized out>
        count = <optimized out>
        found = 0x555555ed0144
        efound = <optimized out>
        hist_file_name = 0x555555ed0144
        newer = false
        compiled = false
        handler = <optimized out>
        fmode = 0x555555834a9b "r"
        version = <optimized out>
        no_native = <optimized out>
        is_module = false
        is_native_elisp = false
        found_eff = <optimized out>
        is_elc = false
        input = {
          stream = 0x555555ecfe64,
          lookahead = 96 '`',
          buf = "\001\000\000"
        }
#16 0x00005555557a4e92 in exec_byte_code (fun=<optimized out>, 
args_template=<optimized out>, nargs=<optimized out>, 
args=<optimized out>) at ../../../emacs/src/bytecode.c:809
        call_nargs = 3
        call_fun = <optimized out>
        count1 = <optimized out>
        template = <optimized out>
        val = <optimized out>
        call_args = 0x7ffff11ff1b0
        original_fun = 0xa9b0
        bytecode = <optimized out>
        op = 3
        type = <optimized out>
        targets = {0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555557a527d <exec_byte_code+1981>, 0x5555557a5278 
<exec_byte_code+1976>, 0x5555557a5273 <exec_byte_code+1971>, 
0x5555557a4c8e <exec_byte_code+462>, 0x5555557a4c8e 
<exec_byte_code+462>, 0x5555557a523f <exec_byte_code+1919>, 
0x5555557a520b <exec_byte_code+1867>, 0x5555557a59e1 
<exec_byte_code+3873>, 0x5555557a59dc <exec_byte_code+3868>, 
0x5555557a59d7 <exec_byte_code+3863>, 0x5555557a59d2 
<exec_byte_code+3858>, 0x5555557a4cbd <exec_byte_code+509>, 
0x5555557a4cc0 <exec_byte_code+512>, 0x5555557a59c4 
<exec_byte_code+3844>, 0x5555557a59e6 <exec_byte_code+3878>, 
0x5555557a5a71 <exec_byte_code+4017>, 0x5555557a5a6c 
<exec_byte_code+4012>, 0x5555557a5a67 <exec_byte_code+4007>, 
0x5555557a5a62 <exec_byte_code+4002>, 0x5555557a4c1a 
<exec_byte_code+346>, 0x5555557a4c20 <exec_byte_code+352>, 
0x5555557a5a46 <exec_byte_code+3974>, 0x5555557a5a54 
<exec_byte_code+3988>, 0x5555557a59f9 <exec_byte_code+3897>, 
0x5555557a59f4 <exec_byte_code+3892>, 0x5555557a5fb5 
<exec_byte_code+5365>, 0x5555557a5fb0 <exec_byte_code+5360>, 
0x5555557a4f1a <exec_byte_code+1114>, 0x5555557a4f20 
<exec_byte_code+1120>, 0x5555557a5a0c <exec_byte_code+3916>, 
0x5555557a59fe <exec_byte_code+3902>, 0x5555557a5f8f 
<exec_byte_code+5327>, 0x5555557a5f8a <exec_byte_code+5322>, 
0x5555557a5f85 <exec_byte_code+5317>, 0x5555557a5f80 
<exec_byte_code+5312>, 0x5555557a4d2b <exec_byte_code+619>, 
0x5555557a4d30 <exec_byte_code+624>, 0x5555557a5fa2 
<exec_byte_code+5346>, 0x5555557a5f94 <exec_byte_code+5332>, 
0x5555557a5f5f <exec_byte_code+5279>, 0x5555557a5f5a 
<exec_byte_code+5274>, 0x5555557a5f55 <exec_byte_code+5269>, 
0x5555557a5f50 <exec_byte_code+5264>, 0x5555557a4f63 
<exec_byte_code+1187>, 0x5555557a4f68 <exec_byte_code+1192>, 
0x5555557a5f72 <exec_byte_code+5298>, 0x5555557a5f64 
<exec_byte_code+5284>, 0x5555557a5bc9 <exec_byte_code+4361>, 
0x5555557a5bf6 <exec_byte_code+4406>, 0x5555557a5c60 
<exec_byte_code+4512>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555557a6ddf 
<exec_byte_code+8991>, 0x5555557a6d73 <exec_byte_code+8883>, 
0x5555557a6d37 <exec_byte_code+8823>, 0x5555557a6cfb 
<exec_byte_code+8763>, 0x5555557a6cbd <exec_byte_code+8701>, 
0x5555557a5ae3 <exec_byte_code+4131>, 0x5555557a5aaa 
<exec_byte_code+4074>, 0x5555557a6c92 <exec_byte_code+8658>, 
0x5555557a5b95 <exec_byte_code+4309>, 0x5555557a5a76 
<exec_byte_code+4022>, 0x5555557a6c59 <exec_byte_code+8601>, 
0x5555557a6c30 <exec_byte_code+8560>, 0x5555557a6bf7 
<exec_byte_code+8503>, 0x5555557a6bc1 <exec_byte_code+8449>, 
0x5555557a6b87 <exec_byte_code+8391>, 0x5555557a6b22 
<exec_byte_code+8290>, 0x5555557a6ab4 <exec_byte_code+8180>, 
0x5555557a6a3f <exec_byte_code+8063>, 0x5555557a6a16 
<exec_byte_code+8022>, 0x5555557a69ed <exec_byte_code+7981>, 
0x5555557a69b4 <exec_byte_code+7924>, 0x5555557a697b 
<exec_byte_code+7867>, 0x5555557a6942 <exec_byte_code+7810>, 
0x5555557a6905 <exec_byte_code+7749>, 0x5555557a68d2 
<exec_byte_code+7698>, 0x5555557a689f <exec_byte_code+7647>, 
0x5555557a686c <exec_byte_code+7596>, 0x5555557a67db 
<exec_byte_code+7451>, 0x5555557a6786 <exec_byte_code+7366>, 
0x5555557a673c <exec_byte_code+7292>, 0x5555557a66ef 
<exec_byte_code+7215>, 0x5555557a66a2 <exec_byte_code+7138>, 
0x5555557a6655 <exec_byte_code+7061>, 0x5555557a6608 
<exec_byte_code+6984>, 0x5555557a65b7 <exec_byte_code+6903>, 
0x5555557a6561 <exec_byte_code+6817>, 0x5555557a6510 
<exec_byte_code+6736>, 0x5555557a64bf <exec_byte_code+6655>, 
0x5555557a646e <exec_byte_code+6574>, 0x5555557a641c 
<exec_byte_code+6492>, 0x5555557a6340 <exec_byte_code+6272>, 
0x5555557a4fa9 <exec_byte_code+1257>, 0x5555557a6317 
<exec_byte_code+6231>, 0x5555557a62e9 <exec_byte_code+6185>, 
0x5555557a626a <exec_byte_code+6058>, 0x5555557a6227 
<exec_byte_code+5991>, 0x5555557a61fe <exec_byte_code+5950>, 
0x5555557a61d3 <exec_byte_code+5907>, 0x5555557a61a8 
<exec_byte_code+5864>, 0x5555557a6175 <exec_byte_code+5813>, 
0x5555557a614a <exec_byte_code+5770>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a611f <exec_byte_code+5727>, 
0x5555557a60f4 <exec_byte_code+5684>, 0x5555557a60c9 
<exec_byte_code+5641>, 0x5555557a609e <exec_byte_code+5598>, 
0x5555557a6073 <exec_byte_code+5555>, 0x5555557a604a 
<exec_byte_code+5514>, 0x5555557a4fa9 <exec_byte_code+1257>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555557a600c 
<exec_byte_code+5452>, 0x5555557a5fe3 <exec_byte_code+5411>, 
0x5555557a5fba <exec_byte_code+5370>, 0x5555557a58cb 
<exec_byte_code+3595>, 0x5555557a5892 <exec_byte_code+3538>, 
0x5555557a5869 <exec_byte_code+3497>, 0x5555557a5840 
<exec_byte_code+3456>, 0x5555557a5807 <exec_byte_code+3399>, 
0x5555557a57ce <exec_byte_code+3342>, 0x5555557a5795 
<exec_byte_code+3285>, 0x5555557a576a <exec_byte_code+3242>, 
0x5555557a5741 <exec_byte_code+3201>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a5d50 <exec_byte_code+4752>, 
0x5555557a5ee1 <exec_byte_code+5153>, 0x5555557a598a 
<exec_byte_code+3786>, 0x5555557a5ea7 <exec_byte_code+5095>, 
0x5555557a5e70 <exec_byte_code+5040>, 0x5555557a5e39 
<exec_byte_code+4985>, 0x5555557a5da2 <exec_byte_code+4834>, 
0x5555557a5d84 <exec_byte_code+4804>, 0x5555557a5a1a 
<exec_byte_code+3930>, 0x5555557a5d32 <exec_byte_code+4722>, 
0x5555557a5cd6 <exec_byte_code+4630>, 0x5555557a5ca8 
<exec_byte_code+4584>, 0x5555557a5c68 <exec_byte_code+4520>, 
0x5555557a6efb <exec_byte_code+9275>, 0x5555557a6ebe 
<exec_byte_code+9214>, 0x5555557a6e7b <exec_byte_code+9147>, 
0x5555557a6e25 <exec_byte_code+9061>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a5704 <exec_byte_code+3140>, 
0x5555557a56db <exec_byte_code+3099>, 0x5555557a56b2 
<exec_byte_code+3058>, 0x5555557a5689 <exec_byte_code+3017>, 
0x5555557a5660 <exec_byte_code+2976>, 0x5555557a5627 
<exec_byte_code+2919>, 0x5555557a55ee <exec_byte_code+2862>, 
0x5555557a55b5 <exec_byte_code+2805>, 0x5555557a557c 
<exec_byte_code+2748>, 0x5555557a552f <exec_byte_code+2671>, 
0x5555557a54f6 <exec_byte_code+2614>, 0x5555557a54bd 
<exec_byte_code+2557>, 0x5555557a5497 <exec_byte_code+2519>, 
0x5555557a543c <exec_byte_code+2428>, 0x5555557a53e1 
<exec_byte_code+2337>, 0x5555557a53ae <exec_byte_code+2286>, 
0x5555557a537b <exec_byte_code+2235>, 0x5555557a534b 
<exec_byte_code+2187>, 0x5555557a63cb <exec_byte_code+6411>, 
0x5555557a6383 <exec_byte_code+6339>, 0x5555557a52e5 
<exec_byte_code+2085>, 0x5555557a5282 <exec_byte_code+1986>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555557a6b4b <exec_byte_code+8331>, 0x5555557a6830 
<exec_byte_code+7536>, 0x5555557a62ad <exec_byte_code+6125>, 
0x5555557a51cf <exec_byte_code+1807>, 0x5555557a5193 
<exec_byte_code+1747>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555557a5164 
<exec_byte_code+1700>, 0x5555557a5934 <exec_byte_code+3700>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555555a4e6a <exec_byte_code-2096214>, 
0x5555555a4e6a <exec_byte_code-2096214>, 0x5555555a4e6a 
<exec_byte_code-2096214>, 0x5555557a5904 <exec_byte_code+3652> 
<repeats 64 times>}
        quitcounter = 40 '('
        bc = 0x555555cf3e70 <main_thread+496>
        top = <optimized out>
        pc = <optimized out>
        bytestr = <optimized out>
        vector = <optimized out>
        maxdepth = <optimized out>
        const_length = <optimized out>
        bytestr_length = <optimized out>
        vectorp = 0x7ffff1d5bac0
        max_stack = <optimized out>
        frame_base = <optimized out>
        fp = <optimized out>
        bytestr_data = <optimized out>
        rest = <optimized out>
        mandatory = <optimized out>
        nonrest = <optimized out>
        pushedargs = <optimized out>
        result = <optimized out>
#17 0x000055555576164c in apply_lambda 
(fun=fun@entry=0x7ffff1d4384d, args=<optimized out>, 
count=count@entry=...) at ../../../emacs/src/eval.c:3107
        arg_vector = 0x7fffffffe1a0
        tem = <optimized out>
        sa_avail = <optimized out>
        sa_count = {
          bytes = 160
        }
        numargs = 0
        args_left = 0x0
#18 0x000055555575fc03 in eval_sub 
(form=form@entry=0x7ffff2206efb) at ../../../emacs/src/eval.c:2592
        original_fun = 0x2aaa9bfc5098
        original_args = 0x0
        count = <optimized out>
        fun = <optimized out>
        val = <optimized out>
        funcar = <optimized out>
        argvals = {0x12, 0xfffffffffffffb90, 0x90, 0x5, 
0x7fffffffe967, 0x7ffff57589fa <__GI___libc_malloc+410>, 0x60, 
0x555555e8e623}
        retry = <optimized out>
#19 0x0000555555762706 in Feval (form=0x7ffff2206efb, 
lexical=<optimized out>) at ../../../emacs/src/eval.c:2365
        count = <optimized out>
#20 0x000055555575ad37 in internal_condition_case 
(bfun=bfun@entry=0x5555556ced40 <top_level_2>, 
handlers=handlers@entry=0x90, hfun=hfun@entry=0x5555556d5f90 
<cmd_error>) at ../../../emacs/src/eval.c:1474
        val = <optimized out>
        c = 0x555555e931d0
#21 0x00005555556cf686 in top_level_1 (ignore=ignore@entry=0x0) at 
../../../emacs/src/keyboard.c:1150
No locals.
#22 0x000055555575ac91 in internal_catch (tag=tag@entry=0x10080, 
func=func@entry=0x5555556cf660 <top_level_1>, arg=arg@entry=0x0) 
at ../../../emacs/src/eval.c:1197
        val = <optimized out>
        c = 0x555555e74440
#23 0x00005555556cecbf in command_loop () at ../../../emacs/src/
keyboard.c:1110
No locals.
#24 0x00005555556d5b41 in recursive_edit_1 () at ../../../emacs/
src/keyboard.c:720
        count = <optimized out>
        val = <optimized out>
#25 0x00005555556d5ec0 in Frecursive_edit () at ../../../emacs/
src/keyboard.c:803
        count = <optimized out>
        buffer = <optimized out>
#26 0x00005555555a8977 in main (argc=5, argv=0x7fffffffe628) at 
../../../emacs/src/emacs.c:2521
        stack_bottom_variable = 0x0
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = <optimized out>
        dump_mode = <optimized out>
        skip_args = 1
        temacs = 0x0
        attempt_load_pdump = <optimized out>
        only_version = false
        rlim = {
          rlim_cur = 10022912,
          rlim_max = 18446744073709551615
        }
        lc_all = <optimized out>
        sockfd = -1
        module_assertions = <optimized out>

Lisp Backtrace:
"insert" (0xffffdbc0)
"let" (0xffffdd20)
"eval-buffer" (0xf11ff290)
"load-with-code-conversion" (0xffffe048)
"load" (0xf11ff1b0)
"command-line-1" (0xf11ff0b8)
"command-line" (0xf11ff040)
"normal-top-level" (0xffffe1a0)
(gdb) quit

Debugger finished

end of gdb session

In GNU Emacs 29.3.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2024-04-01 built on gabor
Repository revision: 946d4aad1dfb244352dfd0845a8bc3078fe9bca4
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101007
System Description: Devuan GNU/Linux 5 (daedalus)

Configured using:
 'configure --without-libsystemd --without-pop --without-sound
 --without-gconf --without-mailutils --without-native-compilation
 --with-cairo --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG 
JSON
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE 
XIM
XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: hu_HU.UTF-8
  locale-coding-system: utf-8-unix


Best wishes,

     Gábor








^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#70124: 29.3.50; Crash via indirect buffers
  2024-04-01 10:54 bug#70124: 29.3.50; Crash via indirect buffers Braun Gábor
@ 2024-04-01 12:03 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-04-01 12:03 UTC (permalink / raw)
  To: Braun Gábor; +Cc: 70124-done

> From: Braun Gábor <braungb88@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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-01 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-01 10:54 bug#70124: 29.3.50; Crash via indirect buffers Braun Gábor
2024-04-01 12:03 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).