Subject: Segmentation fault building with native-comp
From: john muhl <[email-masked]>
To: [email-masked]
Date: Wed, 24 Jan 2024 08:36:15 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Bisect says 3018c6e7ba5 is the first bad commit. A build using
‘--without-native-compilation’ works fine. The segfault can be
reproduced on Fedora 39 and Debian testing.

make bootstrap
…
make -C ../lisp compile-first EMACS="../src/bootstrap-emacs"
make[3]: Entering directory '/home/jm/src/emacs-0/lisp'
  ELC+ELN  emacs-lisp/macroexp.elc
  ELC+ELN  emacs-lisp/cconv.elc
  ELC+ELN  emacs-lisp/byte-opt.elc
  ELC+ELN  emacs-lisp/bytecomp.elc
  ELC+ELN  emacs-lisp/comp.elc
  ELC+ELN  emacs-lisp/comp-cstr.elc
  ELC+ELN  emacs-lisp/comp-common.elc
  ELC+ELN  emacs-lisp/comp-run.elc
  ELC+ELN  emacs-lisp/loaddefs-gen.elc
  ELC+ELN  emacs-lisp/radix-tree.elc

Backtrace:
../src/bootstrap-emacs[0x57863b]
../src/bootstrap-emacs[0x42651e]
../src/bootstrap-emacs[0x426a10]
../src/bootstrap-emacs[0x576cf8]
../src/bootstrap-emacs[0x576d69]
/lib64/libc.so.6(+0x3e9a0)[0x7fce2b5089a0]
../src/bootstrap-emacs[0x60bb50]
../src/bootstrap-emacs[0x60df74]
../src/bootstrap-emacs[0x5e8910]
../src/bootstrap-emacs[0x5e9891]
../src/bootstrap-emacs[0x5e9d8c]
../src/bootstrap-emacs[0x5e8111]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e9891]
../src/bootstrap-emacs[0x5e4fe6]
../src/bootstrap-emacs[0x5e5d3a]
../src/bootstrap-emacs[0x428f09]
../src/bootstrap-emacs[0x5e4fe6]
/home/jm/src/emacs-0/native-lisp/30.0.50-ed70e66e/comp-7672a6ed-93f96353.eln(F636f6d702d2d6e61746976652d636f6d70696c65_comp__native_compile_0+0xaeb)[0x7fce281a030b]
../src/bootstrap-emacs[0x5e4fe6]
/home/jm/src/emacs-0/native-lisp/30.0.50-ed70e66e/comp-7672a6ed-93f96353.eln(F62617463682d6e61746976652d636f6d70696c65_batch_native_compile_0+0x186)[0x7fce281a0c26]
../src/bootstrap-emacs[0x5e4fe6]
/home/jm/src/emacs-0/native-lisp/30.0.50-ed70e66e/comp-7672a6ed-93f96353.eln(F62617463682d627974652b6e61746976652d636f6d70696c65_batch_bytenative_compile_0+0x144)[0x7fce281a0f84]
../src/bootstrap-emacs[0x5e4fe6]
../src/bootstrap-emacs[0x5e860d]
../src/bootstrap-emacs[0x5e9251]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e92d9]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea5d1]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e9101]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea5d1]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e8ab1]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea1b9]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea1b9]
...
make[3]: *** [Makefile:330: emacs-lisp/byte-opt.elc] Segmentation fault (core dumped)
make[3]: *** Waiting for unfinished jobs....

Backtrace:
../src/bootstrap-emacs[0x57863b]
../src/bootstrap-emacs[0x42651e]
../src/bootstrap-emacs[0x426a10]
../src/bootstrap-emacs[0x576cf8]
../src/bootstrap-emacs[0x576d69]
/lib64/libc.so.6(+0x3e9a0)[0x7f8c2be5c9a0]
../src/bootstrap-emacs[0x60b9e0]
../src/bootstrap-emacs[0x60df74]
../src/bootstrap-emacs[0x5e8910]
../src/bootstrap-emacs[0x5e9891]
../src/bootstrap-emacs[0x5e9d8c]
../src/bootstrap-emacs[0x5e8111]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e9891]
../src/bootstrap-emacs[0x5e4fe6]
../src/bootstrap-emacs[0x5e5d3a]
../src/bootstrap-emacs[0x428f09]
../src/bootstrap-emacs[0x5e4fe6]
/home/jm/src/emacs-0/native-lisp/30.0.50-ed70e66e/comp-7672a6ed-93f96353.eln(F636f6d702d2d6e61746976652d636f6d70696c65_comp__native_compile_0+0xaeb)[0x7f8c28abf30b]
../src/bootstrap-emacs[0x5e4fe6]
/home/jm/src/emacs-0/native-lisp/30.0.50-ed70e66e/comp-7672a6ed-93f96353.eln(F62617463682d6e61746976652d636f6d70696c65_batch_native_compile_0+0x186)[0x7f8c28abfc26]
../src/bootstrap-emacs[0x5e4fe6]
/home/jm/src/emacs-0/native-lisp/30.0.50-ed70e66e/comp-7672a6ed-93f96353.eln(F62617463682d627974652b6e61746976652d636f6d70696c65_batch_bytenative_compile_0+0x144)[0x7f8c28abff84]
../src/bootstrap-emacs[0x5e4fe6]
../src/bootstrap-emacs[0x5e860d]
../src/bootstrap-emacs[0x5e9251]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e92d9]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea5d1]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e9101]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea5d1]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e8ab1]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea1b9]
../src/bootstrap-emacs[0x5e87f7]
../src/bootstrap-emacs[0x5ea1b9]
...
make[3]: *** [Makefile:330: emacs-lisp/bytecomp.elc] Segmentation fault (core dumped)
make[3]: Leaving directory '/home/jm/src/emacs-0/lisp'
make[2]: *** [Makefile:1019: bootstrap-emacs.pdmp] Error 2
make[2]: Leaving directory '/home/jm/src/emacs-0/src'
make[1]: *** [Makefile:554: src] Error 2
make[1]: Leaving directory '/home/jm/src/emacs-0'
make[1]: Entering directory '/home/jm/src/emacs-0'
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
***   to further investigate the problem
***
make[1]: *** [Makefile:418: advice-on-failure] Error 2
make[1]: Leaving directory '/home/jm/src/emacs-0'
make: *** [Makefile:374: all] Error 2