Subject: bug#76004: 31.0.50; feature/igc crashed on Linux, wayland (with full gdb debug info)

From: Pip Cet <[email-masked]>
Date: Sun, 02 Feb 2025 08:04:49 +0000

"Eval EXEC" <[email-masked]> writes:

> Hello,
>
> I'm helping to test feature/igc branch, and I got a crash, with full gdb
> debug info.
>
> I build this emacs executable with:
> ```bash
> set -ex
>
> make extraclean
>
> BRANCH_NAME=$(git branch --show-current | sed 's/\//_/g')
> COMMIT_ID=$(git rev-parse HEAD)
> BUILD_DIR=${BRANCH_NAME}-${COMMIT_ID}-gdb
> INSTALL_PREFIX=$(realpath ../emacs-build/${BUILD_DIR})
>
> ./autogen.sh
> ./configure  CFLAGS='-g -ggdb -march=native' \
>   --prefix=${INSTALL_PREFIX} \
>   --with-imagemagick  \
>   --with-mps=yes \
>   --with-xwidgets \
>   --with-modules \
>   --with-cairo --with-cairo-xcb \
>   --without-compress-install \
>   --with-mailutils\
>   --enable-link-time-optimization \
>   --with-tree-sitter --with-xinput2 \
>   --with-dbus \
>   --with-native-compilation=aot \
>   --with-file-notification=inotify\
>   && make -j20 install
> ```
>
> What should I do to help you to investigate this crash?

Please print the registers at the time of the crash, or now, whichever
you can do, by running "i reg" at the gdb prompt.

> #12 <signal handler called>
> No symbol table info available.
> #13 0x00007f6cc3cde86b in kill () from /nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6
> No symbol table info available.
> #14 0x00000000007928f9 in sigHandle ()
> No symbol table info available.
> #15 <signal handler called>
> No symbol table info available.
> #16 0x0000000000628fa0 in indirect_function (object=XIL(0)) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/data.c:2563
> No locals.

That is strange.  Please disassemble this function by running

disass indirect_function

at the GDB prompt (doesn't have to be this session, should be this Emacs
binary).

> #17 0x00000000005cfa00 in get_keymap (object=object@entry=XIL(0x7f6c2ae81440), error_if_not_keymap=error_if_not_keymap@entry=false, autoload=autoload@entry=true) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keymap.c:203
>         tem = <optimized out>
> #18 0x00000000005d22ea in access_keymap_1 (map=map@entry=XIL(0x7f6c32e27c9b), idx=idx@entry=XIL(0x7f6c59734e10), t_ok=t_ok@entry=false, noinherit=noinherit@entry=false, autoload=autoload@entry=true)
>     at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keymap.c:391
>         val = XIL(0x70)
>         binding = XIL(0x7f6c2ae81440)
>         submap = <optimized out>
>         tail = XIL(0x7f6c32e27c9b)
>         t_binding = XIL(0x70)
>         retval = XIL(0x70)
>         retval_tail = XIL(0)
> #19 0x00000000005d23cf in access_keymap (map=map@entry=XIL(0x7f6c32e27c9b), idx=idx@entry=XIL(0x7f6c59734e10), t_ok=t_ok@entry=false, noinherit=noinherit@entry=false, autoload=autoload@entry=true)
>     at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keymap.c:499
> --Type <RET> for more, q to quit, c to continue without paging--c
>         val = <optimized out>
> #20 0x00000000005d26b5 in lookup_key_1 (keymap=keymap@entry=XIL(0x7f6c32e27c9b), key=key@entry=XIL(0x7f6c34d1180d), accept_default=accept_default@entry=XIL(0)) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keymap.c:1283
>         c = XIL(0x7f6c59734e10)
>         cmd = <optimized out>
>         t_ok = false
>         length = 1
>         idx = 1
> #21 0x00000000005d2b2b in Flookup_key (keymap=XIL(0x7f6c32e27c9b), key=XIL(0x7f6c34d1180d), accept_default=XIL(0)) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keymap.c:1320
>         found = <optimized out>
>         key_len = <optimized out>
>         new_key = <optimized out>
>         tables = {XIL(0x7ffc86ba7340), make_fixnum(1601732)}
> #22 0x00007f6c956891ae in F6576696c2d6765742d617578696c696172792d6b65796d6170_evil_get_auxiliary_keymap_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #23 0x0000000000647530 in funcall_subr (subr=0x7f6c3b406d78, numargs=numargs@entry=2, args=args@entry=0x7ffc86ba7598) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3189
>         argbuf = {XIL(0x7f6c32e27c9b), XIL(0x7f6c7aed7168), XIL(0), XIL(0), XIL(0x7ffc86ba7470), XIL(0x6d30ff), XIL(0x7f6c34d11123), XIL(0x7f6c3434d0e3)}
>         a = <optimized out>
>         maxargs = 4
>         fun = <optimized out>
> #24 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffc86ba7598) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aed4570)
> #25 0x0000000000648964 in Ffuncall (nargs=3, args=0x7ffc86ba7590) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #26 0x00007f6c95688e09 in F6576696c2d73746174652d696e746572636570742d6b65796d617073_evil_state_intercept_keymaps_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #27 0x00000000006474ee in funcall_subr (subr=0x7f6c3b317210, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba7798) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3183
>         argbuf = {XIL(0x7f6c7aed7168), XIL(0x1d50), XIL(0), XIL(0x7f6cb8df2005), XIL(0x1), XIL(0x9ed967356bca1800), XIL(0x7f6c3b317728), make_fixnum(1645883)}
>         a = <optimized out>
>         maxargs = 1
>         fun = <optimized out>
> #28 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba7798) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aefcf20)
> #29 0x0000000000648964 in Ffuncall (nargs=2, args=0x7ffc86ba7790) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #30 0x00007f6c95687a35 in F6576696c2d73746174652d6b65796d617073_evil_state_keymaps_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #31 0x00000000006475d4 in funcall_subr (subr=0x7f6c3b3174b8, numargs=numargs@entry=2, args=args@entry=0x7ffc86ba7c48) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3206
>         maxargs = -2
>         fun = <optimized out>
> #32 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffc86ba7c48) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aefd038)
> #33 0x0000000000648964 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7ffc86ba7c40) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #34 0x000000000064a9a5 in Fapply (nargs=3, args=0x7ffc86ba7c40) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2744
>         i = <optimized out>
>         funcall_nargs = <optimized out>
>         funcall_args = 0x0
>         spread_arg = XIL(0x7f6c34d0f133)
>         fun = XIL(0x7f6c7aefd038)
>         sa_avail = 16384
>         sa_count = {
>           bytes = 864
>         }
>         numargs = <optimized out>
>         retval = <optimized out>
> #35 0x00007f6c95687cc8 in F6576696c2d73746174652d6b65796d617073_evil_state_keymaps_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #36 0x00000000006475d4 in funcall_subr (subr=0x7f6c3b3174b8, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba7e58) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3206
>         maxargs = -2
>         fun = <optimized out>
> #37 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba7e58) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aefd038)
> #38 0x0000000000648964 in Ffuncall (nargs=2, args=0x7ffc86ba7e50) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #39 0x00007f6c956880c8 in F6576696c2d6e6f726d616c697a652d6b65796d617073_evil_normalize_keymaps_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #40 0x00000000006474ee in funcall_subr (subr=0x7f6c3b307d98, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8078) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3183
>         argbuf = {XIL(0), make_fixnum(0), XIL(0x7ffc86ba8000), XIL(0x7ffc86ba8008), XIL(0x300), XIL(0), XIL(0x7ffc86ba7fc0), XIL(0x648964)}
>         a = <optimized out>
>         maxargs = 1
>         fun = <optimized out>
> #41 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8078) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aefd6d8)
> #42 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8070) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #43 0x00007f6c94826777 in F6576696c2d6e6f726d616c2d7374617465_evil_normal_state_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-states-9285323c-c78caef2.eln
> No symbol table info available.
> #44 0x00000000006474ee in funcall_subr (subr=0x7f6c3b23ec98, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba82a8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3183
>         argbuf = {XIL(0x10ae0), XIL(0x3598), XIL(0), XIL(0x6d30ff), XIL(0x7f6c34d0897b), XIL(0x9ed967356bca1800), XIL(0x7ffc86ba81f0), XIL(0x7f6c7aefc5d8)}
>         a = <optimized out>
>         maxargs = 1
>         fun = <optimized out>
> #45 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba82a8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7af1c518)
> #46 0x0000000000648964 in Ffuncall (nargs=2, args=0x7ffc86ba82a0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #47 0x00007f6c9568352f in F6576696c2d6368616e67652d7374617465_evil_change_state_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #48 0x0000000000647500 in funcall_subr (subr=0x7f6c3b3fcaf8, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba8418) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3185
>         argbuf = {XIL(0x10ae0), XIL(0), XIL(0x7ffc86ba83b0), XIL(0x616838), XIL(0), XIL(0), XIL(0x7f6cb90058c0), XIL(0x9ed967356bca1800)}
>         a = <optimized out>
>         maxargs = 2
>         fun = <optimized out>
> #49 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba8418) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aed6918)
> #50 0x0000000000648964 in Ffuncall (nargs=2, args=0x7ffc86ba8410) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #51 0x00007f6c95683739 in F6576696c2d696e697469616c697a652d7374617465_evil_initialize_state_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #52 0x00000000006474e3 in funcall_subr (subr=0x7f6c3b315c50, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8560) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0x7ffc86ba84b0), XIL(0x647eb5), XIL(0x7ffc86ba8490), XIL(0), XIL(0x1), XIL(0x4b6efc), XIL(0x7f6c7ba8c64d), XIL(0xc)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #53 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8560) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aefc078)
> #54 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8558) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #55 0x00007f6c9568257b in F6576696c2d6c6f63616c2d6d6f6465_evil_local_mode_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #56 0x00000000006474ee in funcall_subr (subr=0x7f6c3b342df0, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8840) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3183
>         argbuf = {XIL(0), XIL(0x38), XIL(0x7f6c7ad76580), XIL(0x7f6c7adf99a8), XIL(0x7f6c7aefbdb8), XIL(0x38), XIL(0x7f6c7ad76580), XIL(0x7f6c7adf9a18)}
>         a = <optimized out>
>         maxargs = 1
>         fun = <optimized out>
> #57 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8840) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aef2878)
> #58 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8838) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #59 0x00007f6c95682b46 in F6576696c2d696e697469616c697a65_evil_initialize_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #60 0x00000000006474e3 in funcall_subr (subr=0x7f6c3b356e38, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8970) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0x7ffc86ba8880), XIL(0xd52d80), XIL(0x7f6cad2656cb), XIL(0x82c070), make_fixnum(0), XIL(0xd3c0), XIL(0x7ffc86ba88f0), XIL(0x62eedc)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #61 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8970) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aeedfe8)
> #62 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8968) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #63 0x00007f6c95683121 in F6576696c2d6d6f64652d656e61626c652d696e2d627566666572_evil_mode_enable_in_buffer_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/evil-core-9bbe583e-7d34b371.eln
> No symbol table info available.
> #64 0x00000000006474e3 in funcall_subr (subr=0x7f6c3b316000, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8b20) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0x7ffc86ba8a10), XIL(0x648504), XIL(0x7ffc86ba8a30), XIL(0xd37bc0), XIL(0x200), XIL(0x7ffc86ba8b20), XIL(0), make_fixnum(0)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #65 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8b20) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7aefc238)
> #66 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8b18) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #67 0x0000000000648a0a in funcall_nil (nargs=<optimized out>, args=<optimized out>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2798
> No locals.
> #68 0x0000000000646a91 in run_hook_with_args (nargs=nargs@entry=1, args=args@entry=0x7ffc86ba8b18, funcall=funcall@entry=0x648a01 <funcall_nil>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2975
>         global_vals = <optimized out>
>         sym = XIL(0x7f6c7ad8b088)
>         val = XIL(0x7f6c34ce58db)
>         ret = XIL(0)
> #69 0x0000000000646b69 in Frun_hook_with_args (nargs=nargs@entry=1, args=args@entry=0x7ffc86ba8b18) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2840
> No locals.
> #70 0x0000000000646b8b in run_hook (hook=<optimized out>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2988
> No locals.
> #71 0x0000000000646bba in Frun_hooks (nargs=1, args=0x7ffc86ba8c80) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2822
>         i = 0
> #72 0x00000000006475d4 in funcall_subr (subr=0xd37bc0 <Srun_hooks>, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba8c80) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3206
>         maxargs = -2
>         fun = <optimized out>
> #73 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffc86ba8c80) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7ad4bc78)
> #74 0x0000000000648964 in Ffuncall (nargs=2, args=0x7ffc86ba8c78) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #75 0x00007f6cac0e62cf in F72756e2d6d6f64652d686f6f6b73_run_mode_hooks_0 ()
>    from /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-58d8bd04/preloaded/subr-13adf6a6-dfee035d.eln
> No symbol table info available.
> #76 0x00000000006475d4 in funcall_subr (subr=0x7f6c2a5cd058, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8dd0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3206
>         maxargs = -2
>         fun = <optimized out>
> #77 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8dd0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7ad97ea8)
> #78 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8dc8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #79 0x00007f6cabebce8a in F66756e64616d656e74616c2d6d6f6465_fundamental_mode_0 ()
>    from /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-58d8bd04/preloaded/simple-fab5b0cf-eda3ce07.eln
> No symbol table info available.
> #80 0x00000000006474e3 in funcall_subr (subr=0x7f6c7baa7ae0, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8f18) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0x7ffc86ba8e00), XIL(0x7f6c2a047120), XIL(0x7f6c2a0471b3), make_fixnum(1661559), XIL(0x7f6c7eef70c0), XIL(0x7f6c7eef75a0), XIL(0x7ffc86ba8e30), XIL(0x62e2d1)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #81 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba8f18) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0xb168)
> #82 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba8f10) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #83 0x00007f6c7eeed793 in F70657273697374656e742d736372617463682d726573746f7265_persistent_scratch_restore_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/persistent-scratch-8f3e28fb-859b86e6.eln
> No symbol table info available.
> #84 0x00000000006474ee in funcall_subr (subr=0x7f6c4be96e00, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba90c8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3183
>         argbuf = {XIL(0), XIL(0x7f6c7baa1348), XIL(0x7f6c4a6681e8), make_fixnum(3), XIL(0x7f6c34ce85c3), XIL(0x7f6c34ce8623), XIL(0x7ffc86ba9000), XIL(0x7f6c2a6dabb0)}
>         a = <optimized out>
>         maxargs = 1
>         fun = <optimized out>
> #85 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba90c8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7b16dc60)
> #86 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba90c0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #87 0x00007f6c7eeedaff in F70657273697374656e742d736372617463682d2d6175746f2d726573746f7265_persistent_scratch__auto_restore_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/persistent-scratch-8f3e28fb-859b86e6.eln
> No symbol table info available.
> #88 0x00000000006474e3 in funcall_subr (subr=0x7f6c4be61278, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba9208) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0x7f6c7fca0fb8), XIL(0xdd0320), XIL(0x7f6c7fca01c0), XIL(0x7f6c7fc5c224), XIL(0x7ffc86ba91b8), XIL(0x7f6c34ce56d4), XIL(0x7ffc86ba9140), XIL(0x7f6c7b041928)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #89 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba9208) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7b17c120)
> #90 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba9200) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #91 0x00007f6c7eeee1f0 in F70657273697374656e742d736372617463682d73657475702d64656661756c74_persistent_scratch_setup_default_0 () from /home/exec/.emacs.d/eln-cache/31.0.50-58d8bd04/persistent-scratch-8f3e28fb-859b86e6.eln
> No symbol table info available.
> #92 0x00000000006474e3 in funcall_subr (subr=0x7f6c4b9134d0, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba93b0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0), XIL(0x648504), XIL(0x400000003f000000), XIL(0x400000001a000000), XIL(0x120), XIL(0x7ffc86ba93b0), XIL(0), make_fixnum(15298386819284992)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #93 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba93b0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c49d22350)
> #94 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba93a8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #95 0x0000000000648a0a in funcall_nil (nargs=<optimized out>, args=<optimized out>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2798
> No locals.
> #96 0x0000000000646a91 in run_hook_with_args (nargs=nargs@entry=1, args=args@entry=0x7ffc86ba93a8, funcall=funcall@entry=0x648a01 <funcall_nil>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2975
>         global_vals = <optimized out>
>         sym = XIL(0x7f6c7ae0da80)
>         val = XIL(0x7f6c335573e3)
>         ret = XIL(0)
> #97 0x0000000000646b69 in Frun_hook_with_args (nargs=nargs@entry=1, args=args@entry=0x7ffc86ba93a8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2840
> No locals.
> #98 0x0000000000646b8b in run_hook (hook=<optimized out>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2988
> No locals.
> #99 0x0000000000646bba in Frun_hooks (nargs=2, args=0x7ffc86ba9518) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2822
>         i = 0
> #100 0x00000000006475d4 in funcall_subr (subr=0xd37bc0 <Srun_hooks>, numargs=numargs@entry=2, args=args@entry=0x7ffc86ba9518) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3206
>         maxargs = -2
>         fun = <optimized out>
> #101 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffc86ba9518) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6c7ad4bc78)
> #102 0x0000000000648964 in Ffuncall (nargs=3, args=0x7ffc86ba9510) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #103 0x00007f6caba83334 in F636f6d6d616e642d6c696e65_command_line_0 ()
>    from /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-58d8bd04/preloaded/startup-bbc6ea72-6643f97a.eln
> No symbol table info available.
> #104 0x00000000006474e3 in funcall_subr (subr=0x7f6cacb3f0c0, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba96c0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3181
>         argbuf = {XIL(0x7f6cadefd3f4), XIL(0), XIL(0x7f6cacce9fd0), XIL(0x9ed967356bca1800), XIL(0x7ffc86ba95f0), XIL(0x7f6cadefd2d0), XIL(0x7f6cadefd588), XIL(0x3)}
>         a = <optimized out>
>         maxargs = 0
>         fun = <optimized out>
> #105 0x0000000000648750 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffc86ba96c0) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/lisp.h:2334
>         original_fun = XIL(0x7f6cabdf96c8)
> #106 0x0000000000648964 in Ffuncall (nargs=1, args=0x7ffc86ba96b8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:3115
>         count = <optimized out>
>         val = <optimized out>
> #107 0x00007f6caba7f3d2 in F6e6f726d616c2d746f702d6c6576656c_normal_top_level_0 ()
>    from /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/../lib/emacs/31.0.50/native-lisp/31.0.50-58d8bd04/preloaded/startup-bbc6ea72-6643f97a.eln
> No symbol table info available.
> #108 0x000000000064266b in eval_sub (form=form@entry=XIL(0x7f6cacb32cc3)) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2617
>         i = <optimized out>
>         maxargs = <optimized out>
>         args_left = XIL(0)
>         numargs = 0
>         original_fun = <optimized out>
>         original_args = XIL(0)
>         count = <optimized out>
>         fun = XIL(0x7f6cacb32d15)
>         val = <optimized out>
>         funcar = <optimized out>
>         argvals = {XIL(0x7ffc86ba9790), XIL(0x7f6cacce9fd0), XIL(0xdd0320), XIL(0xd52d80), XIL(0xd3c0), XIL(0x7f6cad2656cb), XIL(0x831020), XIL(0x236d5e80)}
>         retry = <optimized out>
> #109 0x0000000000643b3a in Feval (form=XIL(0x7f6cacb32cc3), lexical=<optimized out>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:2479
>         count = <optimized out>
> #110 0x00000000005b57a2 in top_level_2 () at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keyboard.c:1190
>         setup_handler = <optimized out>
>         res = <optimized out>
> #111 0x000000000063ba47 in internal_condition_case (bfun=0x5b5775 <top_level_2>, handlers=<optimized out>, hfun=0x5b54b0 <cmd_error>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:1627
>         val = <optimized out>
>         c = 0x7f6cadee7c20
> #112 0x00000000005b573b in top_level_1 (ignore=ignore@entry=XIL(0)) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keyboard.c:1202
> No locals.
> #113 0x000000000063b96d in internal_catch (tag=<optimized out>, func=0x5b570e <top_level_1>, arg=XIL(0)) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:1306
>         val = <optimized out>
>         c = 0x7f6cadee7ae8
> #114 0x00000000005b626e in command_loop () at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keyboard.c:1151
> No locals.
> #115 0x00000000005b631f in recursive_edit_1 () at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keyboard.c:760
>         count = <optimized out>
>         val = <optimized out>
> #116 0x00000000005b6515 in Frecursive_edit () at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/keyboard.c:843
>         count = <optimized out>
>         buffer = <optimized out>
> #117 0x00000000005b8741 in main (argc=1, argv=0x7ffc86ba9b88) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/emacs.c:2650
>         stack_bottom_variable = 0x0

This is also weird.  stack_bottom_variable should be a stack
address, not NULL.

>         old_argc = <optimized out>
>         dump_file = 0x0
>         no_loadup = false
>         junk = 0x0
>         dname_arg = 0x0
>         ch_to_dir = 0x0
>         original_pwd = <optimized out>
>         dump_mode = <optimized out>
>         skip_args = 0
>         temacs = 0x0
>         attempt_load_pdump = <optimized out>
>         only_version = false
>         rlim = {
>           rlim_cur = 10022912,
>           rlim_max = 18446744073709551615
>         }

Are you running with an unusually small stack limit?

> In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
>  3.24.43, cairo version 1.18.2) of 2025-02-01 built on Mufasa
> Repository revision: 6f7e916a6c80df11bf169587913fb0443f6b5490
> Repository branch: feature/igc
> Windowing system distributor 'The X.Org Foundation', version 11.0.12401004
> System Description: NixOS 24.11 (Vicuna)
>
> Configured using:
>  'configure 'CFLAGS=-g -ggdb -march=native'

I need to work out what the effective CFLAGS are in this case.
Specifying an explicit -O option is always better than letting Emacs
guess one (-O0 -O1 -O2 -O3 (with caution) -Os -Og).  Lots of stuff is
marked as optimized out, so maybe the frame pointer is omitted in this
strange combination?

>  --prefix=/home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb
>  --with-imagemagick --with-mps=yes --with-xwidgets --with-modules
>  --with-cairo --with-cairo-xcb --without-compress-install
>  --with-mailutils --enable-link-time-optimization --with-tree-sitter
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

No idea what that does in the absence of a debugging option.

Thanks!

Pip