Subject: Re: bug#36649: 27.0.50; pure space and pdumper

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 17 May 2021 16:13:33 +0200

Paul Eggert <[email-masked]> writes:

> If unexec is used on GNU/Linux, Emacs is supposed to switch ASLR off
> by using "setfattr -n user.pax.flags -v er temacs", and if that
> doesn't work by using the personality syscall and then re-execing
> itself (see maybe_disable_address_randomization).

Ah, thanks.  My src/Makefile had

## If needed, the names of the paxctl and setfattr programs.
## On grsecurity/PaX systems, unexec will fail due to a gap between
## the bss section and the heap.  Older versions need paxctl to work
## around this, newer ones setfattr.  See Bug#11398 and Bug#16343.
PAXCTL = 
SETFATTR = 
## Commands to set PaX flags on dumped and not-dumped instances of Emacs.
PAXCTL_dumped = 
PAXCTL_notdumped = 

because the "attr" package wasn't installed, so there was no setfattr
executable. 

(So if we want to continue supporting unexec, we should probably add
that as a configure requirement, perhaps.)

With that, Emacs now fails in a different way -- instead of segfaulting,
I get to:

make[2]: Entering directory '/home/larsi/src/emacs/xo/lisp'
  ELC      international/titdic-cnv.elc
corrupted double-linked list
Fatal error 6: Aborted
Backtrace:
../src/bootstrap-emacs[0x525571]
../src/bootstrap-emacs[0x4203b6]
../src/bootstrap-emacs[0x420889]

But as you say, debugging this is pretty much a waste of time.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no