[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs reproducible builds part1 of 2 : eln
From: |
Bernhard M. Wiedemann |
Subject: |
emacs reproducible builds part1 of 2 : eln |
Date: |
Thu, 11 Jan 2024 22:17:24 +0100 |
User-agent: |
Mozilla Thunderbird |
Dear emacs devs,
I'm working on reproducible builds for openSUSE
and in that process found that our emacs-29.1
package varies across builds from 2 different issues
The diff is visible at
https://rb.zq1.de/compare.factory-20231231/diffs/emacs-compare.out
Here is a simple reproducer that works in our build env:
cd ~/rpmbuild/BUILD/emacs-29.1/native-lisp &&
for i in $(seq 10) ; do
../src/emacs -batch \
--eval "(batch-native-compile t)" ../lisp/term/x-win.el &&
md5sum 29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln
done | sort | uniq -c
That prints variations of
6 0c749bdbef8d9fa7b1afc2f042caf45b
29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln
2 3022ea8c675b69ac79005281fd824179
29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln
2 57bc581456c38395e9ac6409bbcb0d6e
29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln
while the same with setarch -R ../src/emacs
produces deterministic
10 0c749bdbef8d9fa7b1afc2f042caf45b
29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln
So somewhere in the batch-native-compile code is a place that adds
ASLR-related non-determinism into the .eln file. From the diff, it
probably is some ordering issue.
I'd appreciate pointers to where that non-determinism gets added and how
to patch it out.
And once that is solved, there is still part2: pdmp
Ciao
Bernhard M.
OpenPGP_signature.asc
Description: OpenPGP digital signature