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

From: Konstantin Kharlamov <[email-masked]>
Date: Sun, 05 Mar 2023 01:00:42 +0300

On Sun, 2023-03-05 at 00:56 +0300, Konstantin Kharlamov wrote:
> On Sat, 2023-03-04 at 21:45 +0000, Andrea Corallo wrote:
> > Konstantin Kharlamov <[email-masked]> writes:
> > 
> > > Oh, I am sorry, I posted the configuration line from the wrong emacs
> > > build.
> > > It's
> > > supposed to be:
> > > 
> > > --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 --with-native-compilation=yes --with-
> > > xinput2 --
> > > with-x-toolkit=gtk3 --without-xaw3d --with-sound=no --with-tree-sitter --
> > > with-
> > > unexec --without-gpm --without-compress-install 'CFLAGS=-O0 -g3'
> > 
> > Hi Konstantin,
> > 
> > maybe the crash you see is not related but native-compilation is not
> > supposed to work with unexec builds.
> > 
> > I think we should really add a configure time error for this.  Eli could
> > this change go to emacs-29?
> 
> emacs-29 haven't got the BLOCK_ALIGN change, so is unaffected.

Ah, sorry, I failed to parse your text correctly, because I'm in context of the
debugging session :) Yeah, if native compilation isn't supposed to work with
unexec(), it might be a good idea to disable that, sure.

> I should note though that I'm not the reporter :)
> 
> ---------------
> 
> Regarding my current findings: apparently the `unexec` has always been broken.
> I built it with sanitizer and found out that the variable `bss_size_growth`
> when doing the dump has too big size. The only difference between "before" and
> "after" the BLOCK_ALIGN change is that the difference "after" became quite
> large. It was just 440 bytes before, and became 31494584 bytes after.
> 
> However, when built with sanitizer, sanitizer catches the problem in both
> cases, so there's that.