Subject: Re: bug#61960: 30.0.50; Unexec build reliably crashes during loadup

From: Eli Zaretskii <[email-masked]>
Date: Sun, 05 Mar 2023 07:46:40 +0200

> From: Konstantin Kharlamov <[email-masked]>
> Date: Sat, 04 Mar 2023 22:50:12 +0300
> 
> So, just to add some points: apparently it isn't so easy to reproduce. I built Emacs with unexec without first looking at the `./configure` line in the report (looking at the report I apparently lack the `with-dumping=unexec`), and removed the workaround to not have BLOCK_SIZE=2¹⁵ if HAVE_UNEXEC. (worth noting probably that I first did the build, then remembered I had to remove the work around installed on master branch, then re-built emacs without the workaround).
> 
> Running `emacs` as well as running the `temacs` command ain't shows no crashes.
> 
> My configuration was: --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --enable-link-time-optimization --with-native-compilation=yes --with-xinput2 --with-x-toolkit=gtk3 --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\\([ec]tags\\)/\\1.emacs/' 'CFLAGS=-flto=2 -march=native -O3 -pipe -fno-stack-protector -fweb -fmerge-all-constants -fno-plt -fcommon' 'LDFLAGS=-flto=2 -O3 -march=native -fweb -fmerge-all-constants -floop-nest-optimize -Wl,--sort-common,-z,relro -fno-plt -fcommon'
> 
> I will try to reconfigure build with the flags Eli reports. I seems to have lacked `with-dumping=unexec` option, but I'll try running `configure` only with the flags mentioned, just for the safe case.

My reproduction is with all the *.elc files removed:

  $ find ./lisp -name '*.elc' -delete
  $ make -j4

The specific versions of the compiler, glibc, and the Linux kernel I
have there could also be relevant, although I'm not sure.