since emacs uses pdumper per default, this
# Disable sandbox when dumping. For the unbelievers, see bug #131505
emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
isnt needed anymore and could be:
There is no support for the portable dumper in the emacs-26 branch, i.e. emacs-26.3 is still using unexec.
Reopening for app-editors/emacs-vcs-27.0.9999 which uses the portable dumper by default.
However, I am getting different emacs.pdmp files with and without the sandbox (even different length, so it's not a simple matter of timestamps):
# ls -l /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp # sandbox off
-rw-r--r-- 1 root root 10563352 Nov 18 10:34 /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp
# ls -l /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp # sandbox on
-rw-r--r-- 1 root root 10563704 Nov 18 10:41 /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp
At first glance, I'm not noticing any problems at runtime. Still, I'm going to investigate the cause of this difference.
Looks like the size of emacs.pdmp slightly varies between different builds, even if nothing is changed. So I'm going to give it a try and remove the sandbox hack in the live ebuild.
Thanks for reporting!
The bug has been closed via the following commit(s):
Author: Ulrich Müller <email@example.com>
AuthorDate: 2019-11-18 15:36:59 +0000
Commit: Ulrich Müller <firstname.lastname@example.org>
CommitDate: 2019-11-18 15:37:43 +0000
app-editors/emacs-vcs: Remove sandbox hack in src_compile.
Configure with explicit option --with-dumping=pdumper to make sure
that the portable dumper is used, even for the (unlikely) case that
the upstream default would change.
Note that (as of today) --with-dumping=unexec breaks the build
process, therefore controlling this option with a USE flag wouldn't
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Ulrich Müller <email@example.com>
app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
I've reported the changing size of emacs.pdmp upstream. After the following commit:
Author: Paul Eggert <firstname.lastname@example.org>
Date: Tue Nov 19 18:23:01 2019 -0800
Make .pdmp file more reproducible
Problem reported by Ulrich Müller
and diagnosed by Andreas Schwab
* src/sysdep.c (maybe_disable_address_randomization):
Disable ASLR if any kind of dumping, instead of merely if
unexec dumping. Omit first arg for simplicity; all uses changed.
... I get a reproducible size between builds.
However, with sandbox disabled and enabled, emacs.pdmp still has slightly different size (10563576 and 10563568 bytes, respectively).