https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117047

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
I'm seeing this too.

```
Reading symbols from ../src/bootstrap-emacs...
(gdb) r
Starting program:
/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/src/bootstrap-emacs
-batch --no-site-file --no-site-lisp --eval \(setq\ load-prefer-newer\ t\
byte-compile-warnings\ \'all\) --eval \(setq\ org--inhibit-version-check\ t\)
-l comp -f batch-byte+native-compile emacs-lisp/loaddefs-gen.el
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when
stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when
stepping.
Function(s)
^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty)
will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will
be skipped when stepping.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff25f8007 in gcc::jit::wrapper_finalizer (ptr=0x7fffdc491e70) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/jit-playback.cc:2094
2094      wrapper->finalizer ();
(gdb) bt
#0  0x00007ffff25f8007 in gcc::jit::wrapper_finalizer (ptr=0x7fffdc491e70) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/jit-playback.cc:2094
#1  0x00007ffff2634402 in finalizer::call (this=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/ggc-page.cc:333
#2  ggc_handle_finalizers () at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/ggc-page.cc:1932
#3  ggc_collect (mode=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/ggc-page.cc:2232
#4  0x00007ffff2707737 in cgraph_node::finalize_function (decl=0x7fffdc9b7d00,
no_collect=no_collect@entry=false)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:508
#5  0x00007ffff25fed2f in gcc::jit::playback::function::postprocess
(this=0x7fffdc675a00) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/jit-playback.cc:2315
#6  0x00007ffff2606350 in gcc::jit::playback::context::replay
(this=0x7fffffffa2e0) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/jit-playback.cc:3659
#7  0x00007ffff2e35968 in compile_file () at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:453
#8  0x00007ffff25aa2e5 in do_compile () at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:2213
#9  toplev::main (this=this@entry=0x7fffffffa24e, argc=<optimized out>,
argv=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:2373
#10 0x00007ffff26051c5 in gcc::jit::playback::context::compile
(this=this@entry=0x7fffffffa2e0) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/jit-playback.cc:2778
#11 0x00007ffff25e588d in gcc::jit::recording::context::compile_to_file
    (this=0x55555659be20, output_kind=GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
output_path=0x555556ebb040
"/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/native-lisp/31.0.50-f88d6d87/loaddefs-gen-e8a3ad9c-3bac3121bsYYK0.eln.tmp")
at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/jit-recording.cc:1671
#12 0x00007ffff25c74ff in gcc_jit_context_compile_to_file
    (ctxt=0x55555659be20, output_kind=GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
output_path=0x555556ebb040
"/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/native-lisp/31.0.50-f88d6d87/loaddefs-gen-e8a3ad9c-3bac3121bsYYK0.eln.tmp")
at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/jit/libgccjit.cc:3883
#13 0x00005555557c3c8a in Fcomp__compile_ctxt_to_file0
(filename=0x5555560e8f24) at
/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/src/lisp.h:1631
#14 0x00005555557643d7 in eval_sub (form=<optimized out>) at
/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/src/eval.c:2587
#15 0x0000555555765590 in Fprogn (body=<optimized out>) at
/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/src/eval.c:439
#16 Flet (args=<optimized out>) at
/var/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/src/eval.c:1109
[...]
```

Frustratingly, I can't reproduce it on a more powerful machine to first bisect
before poking more. So I'll do it slowly first.

Reply via email to