Debian Bug report logs -
#795784
ocamlopt startup file randomness ends up in final executable
Reported by: Stéphane Glondu <glondu@debian.org>
Date: Sun, 16 Aug 2015 19:42:02 UTC
Severity: normal
Found in version ocaml/4.01.0-5
Fixed in version ocaml/4.02.3-2
Done: Stéphane Glondu <glondu@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>:
Bug#795784; Package ocaml.
(Sun, 16 Aug 2015 19:42:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Stéphane Glondu <glondu@debian.org>:
New Bug report received and forwarded. Copy sent to Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>.
(Sun, 16 Aug 2015 19:42:06 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: ocaml
Version: 4.01.0-5
User: reproducible-builds@lists.alioth.debian.org
Usertags: toolchain randomness
Files generated by ocamlopt are not reproducible:
> $ touch toto.ml
> $ ocamlopt -o a toto.ml
> $ ocamlopt -o b toto.ml
> $ diff -u <(readelf -a a) <(readelf -a b)
> --- /proc/self/fd/11 2015-08-16 21:34:48.321396736 +0200
> +++ /proc/self/fd/12 2015-08-16 21:34:48.321396736 +0200
> @@ -388,7 +388,7 @@
> 37: 000000000061c008 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fin
> 38: 0000000000401e80 0 FUNC LOCAL DEFAULT 13 frame_dummy
> 39: 000000000061c000 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_
> - 40: 0000000000000000 0 FILE LOCAL DEFAULT ABS /tmp/camlstartup0c4347.o
> + 40: 0000000000000000 0 FILE LOCAL DEFAULT ABS /tmp/camlstartupaea514.o
> 41: 0000000000414190 0 NOTYPE LOCAL DEFAULT 15 caml_negf_mask
> 42: 00000000004141a0 0 NOTYPE LOCAL DEFAULT 15 caml_absf_mask
> 43: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/lib/ocaml/std_exit.o
Cheers,
--
Stéphane
Added tag(s) pending.
Request was from Stéphane Glondu <glondu@debian.org>
to control@bugs.debian.org.
(Sun, 16 Aug 2015 20:12:03 GMT) (full text, mbox, link).
Reply sent
to Stéphane Glondu <glondu@debian.org>:
You have taken responsibility.
(Sat, 22 Aug 2015 09:45:52 GMT) (full text, mbox, link).
Notification sent
to Stéphane Glondu <glondu@debian.org>:
Bug acknowledged by developer.
(Sat, 22 Aug 2015 09:45:52 GMT) (full text, mbox, link).
Message #12 received at 795784-close@bugs.debian.org (full text, mbox, reply):
Source: ocaml
Source-Version: 4.02.3-2
We believe that the bug you reported is fixed in the latest version of
ocaml, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 795784@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Stéphane Glondu <glondu@debian.org> (supplier of updated ocaml package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 22 Aug 2015 09:46:49 +0200
Source: ocaml
Binary: ocaml-nox ocaml ocaml-base-nox ocaml-base ocaml-native-compilers ocaml-source ocaml-interp ocaml-compiler-libs ocaml-mode
Architecture: source amd64 all
Version: 4.02.3-2
Distribution: experimental
Urgency: medium
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Changed-By: Stéphane Glondu <glondu@debian.org>
Description:
ocaml - ML language implementation with a class-based object system
ocaml-base - Runtime system for OCaml bytecode executables
ocaml-base-nox - Runtime system for OCaml bytecode executables (no X)
ocaml-compiler-libs - OCaml interpreter and standard libraries
ocaml-interp - OCaml interactive interpreter and standard libraries
ocaml-mode - major mode for editing Objective Caml in Emacs
ocaml-native-compilers - Native code compilers of the OCaml suite (the .opt ones)
ocaml-nox - ML implementation with a class-based object system (no X)
ocaml-source - Sources for Objective Caml
Closes: 795784 796336
Changes:
ocaml (4.02.3-2) experimental; urgency=medium
.
* Reproducibility changes:
- ocamlopt: add a .file directive to generated .s files
+ startup files are now deterministic (Closes: #795784)
+ native packed libraries are now deterministic (Closes: #796336)
- set permissions of patches in ocaml-source
Checksums-Sha1:
6dc6a26ae51d46f8eb4e6bea57c4024f9b15734e 2686 ocaml_4.02.3-2.dsc
89e382cf40f76ad9b88affb1513377a1286c52c1 45308 ocaml_4.02.3-2.debian.tar.xz
f54828d91b53e293d016f04513809b6207eebe93 538828 ocaml-base-nox_4.02.3-2_amd64.deb
5bc32deaec0a658c90856bde18c8d1470767bf84 132614 ocaml-base_4.02.3-2_amd64.deb
dbdc29049c6de16f866ca725d4ed2ba3a8d2c030 9608478 ocaml-compiler-libs_4.02.3-2_amd64.deb
c5fab09b689678c493fb4baf2f270f2eda203d1c 360270 ocaml-interp_4.02.3-2_amd64.deb
f9a667bba07c1c3a5fc45a3e28bb0ec0ace02070 136398 ocaml-mode_4.02.3-2_all.deb
0069eec52031cd6f568c1b2b8e8a6d8e6f944c8c 2547388 ocaml-native-compilers_4.02.3-2_amd64.deb
9c72f05eda20f765d3ae573e33c02340613a3ab0 6696752 ocaml-nox_4.02.3-2_amd64.deb
fa090063922cc36cbb6179eb8c808a26101ef088 2160054 ocaml-source_4.02.3-2_all.deb
25281613381ea6d691f1d75f2568d8742f284c9f 120450 ocaml_4.02.3-2_amd64.deb
Checksums-Sha256:
63110403669eed75d383c96bcec3b9e852bdfc6c9fe846972b127d85ac744e62 2686 ocaml_4.02.3-2.dsc
f994d14af7149eea03e912ee38d4e8b4f2ce53280975a299180a9575ab9bcb3a 45308 ocaml_4.02.3-2.debian.tar.xz
b195032f8675f38ab54ac183d4ca714c5caba65c0641513d4ebb613fa36e68ac 538828 ocaml-base-nox_4.02.3-2_amd64.deb
a0da357642ca412e58a5b1242449f5c3230d2d67ec1fef4ea29b96eacfd91694 132614 ocaml-base_4.02.3-2_amd64.deb
02986ddeb8fdcc86fa22eb4f83d8e0514b05cd556120f431bf74d8b2e1ff24be 9608478 ocaml-compiler-libs_4.02.3-2_amd64.deb
a1ad8adc4447ff74fcd89a2a589d37bf4bc5e8053a6f7562c43324810c73f8f9 360270 ocaml-interp_4.02.3-2_amd64.deb
65d76baff0c2fcb469aaa32f67dee41288c70e9eeaa9bb36f593edf6a3529c44 136398 ocaml-mode_4.02.3-2_all.deb
06823a2fdf4ff57ef3928a2a57ca1da434d29611b90aea9ad74398a61e575b7d 2547388 ocaml-native-compilers_4.02.3-2_amd64.deb
0440ed5e93f4805c2d9c4bf6ef81e590afdbbff9edd9f69242fcaa7dad09cd7d 6696752 ocaml-nox_4.02.3-2_amd64.deb
b7e883e995d669f95c592a48b85faae89cef1815b38c9b63d0698b18c5722428 2160054 ocaml-source_4.02.3-2_all.deb
6493cb60e4e5229e1e14ec04af8fe532e786e5ba7413ebff22f22253ea243148 120450 ocaml_4.02.3-2_amd64.deb
Files:
b4c75f95f494f4b4b550cdc7e1b57cc0 2686 ocaml optional ocaml_4.02.3-2.dsc
6dfea5d037967a8a070ae502c8cabb4a 45308 ocaml optional ocaml_4.02.3-2.debian.tar.xz
feab0c0a3184bc4eb6dc378be3c67848 538828 ocaml optional ocaml-base-nox_4.02.3-2_amd64.deb
625b26139a8f9539f1db37620dc57e6e 132614 ocaml optional ocaml-base_4.02.3-2_amd64.deb
efa093d4ef6052dea5069e1d397d9f91 9608478 ocaml optional ocaml-compiler-libs_4.02.3-2_amd64.deb
c2c034ee2738dc8edbaed57b29439b3f 360270 ocaml optional ocaml-interp_4.02.3-2_amd64.deb
fa3c7e8f42072295eff1c891d17a1475 136398 ocaml optional ocaml-mode_4.02.3-2_all.deb
b1c6b3261f3867b926be16733b89b8ce 2547388 ocaml optional ocaml-native-compilers_4.02.3-2_amd64.deb
5e6aee04d0798e2b54ddae6f0dc6568b 6696752 ocaml optional ocaml-nox_4.02.3-2_amd64.deb
a79d990d452e8b4f1d2cb5337d726552 2160054 ocaml optional ocaml-source_4.02.3-2_all.deb
20a0a56a9dc8efe64c12eba8ec500111 120450 ocaml optional ocaml_4.02.3-2_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCgAGBQJV2DAKAAoJEHhT2k1JiBrT1jcQAJgNRbPMfLR3M0WWLxEcehKg
F0+4QC0IordHb4LT3fLHC/UfI/dzE0OJ0RDidhXCxcHKb6P/1Q0/wOyknHw3MW2g
W1VyiyiUxiYz4kD07dE0zlzkLSIGsOlI8MLPBpas4bHLimgGeixYe/it4KhkvlxM
U0sulM+aR2Wpu6yr4JoT8Ea1puKhggkPHrcp4E3JDC0+NDYU67cTurUeFRukxIJQ
63sxTbszgKii9WMmLf7xwIWAVXC/9htBjyn+zKHrUa1AKMytD9QBEX2AbOnTvlSs
/MsEcGmlUHYSpY2wdteO+b2QvsBx9Vn7EzGRgaBpODm298GicfEg5tCTg3UO8liW
aStIpbzJK/voPliRBGasW/DI73jJ/BNMdun2i2w6DciWL8yrv4X6twFlseWCbwfZ
mN2y/4+ksXZOq6GRKVQEycf02eINtiUqURuJj1Eou3a4k42q7oUK0Z5EPunXqT72
Wu1kmSl7GMeIJKZQ0j50Pw20LEj2phytx0ZaXwUJcFPtfssbrbwFcvZVXeoaSg9V
0sT1EvZeK3kAV9VnWHVuexH4FFiiw9wSkA2RVGxjV8Z8uPHitV9UrUfTBRT2Ygsh
IZGQJafluaWpKdAry+dLzQezQ/rHzMAMfC3BCFtNsljgUBgvux5wRfVcK/TLE6zG
4hUaqs20X5jsyZhyQzLo
=3PCN
-----END PGP SIGNATURE-----
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>:
Bug#795784; Package ocaml.
(Tue, 25 Aug 2015 14:03:13 GMT) (full text, mbox, link).
Acknowledgement sent
to Stéphane Glondu <glondu@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>.
(Tue, 25 Aug 2015 14:03:13 GMT) (full text, mbox, link).
Message #17 received at 795784@bugs.debian.org (full text, mbox, reply):
Le 04/08/2015 18:41, Valentin Lorentz a écrit :
> While working on the “reproducible builds” effort [1], we have noticed
> that ocamlopt relies on temporary files whose names are generated
> randomly and are part of the output files' symbols.
See #795784, #796336 and #786913.
> Therefore, we need a way to make these names determinist. [...]
I don't agree with this conclusion; I'd rather use a way to not record
those random names in the first place, or set them to some sane value
without messing with file names.
GCC also uses temporary files whose names are generated randomly (this
can be seen with the -v option). But it arranges for these random names
to not appear in compiled objects.
For example, with assembly files, the name of the "source" file (which
is then recorded in compiled objects) can be given with a ".file"
directive. gcc adds them to its assembly files. And adding such
directives to assembly files generated by ocamlopt solves #795784 and
#796336.
For #786913, temporary files are C files. Ideally, a ".file" counterpart
should exist for C files (I thought of "#line" cpp directives, but they
don't work... maybe we should make them work?). However, I've found a
way to tell gcc to not record the file name, using stdin: gcc -x c -c -o
foo.o < foo.c. I would very much prefer a ".file"-like directive, though.
> [...] For instance,
> reading an environment variable in the main function of ocamlopt
> (driver/optmain.ml) and calling “Random.seed 0” if it is set would be
> perfect.
> Using OCAMLPARAM (driver/compenv.ml) would work as well.
I am not thrilled by this proposition. Filename.temp_file is the
equivalent of mkstemp, and mkstemp doesn't have this "feature".
Cheers,
--
Stéphane
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>:
Bug#795784; Package ocaml.
(Wed, 28 Oct 2015 22:03:04 GMT) (full text, mbox, link).
Acknowledgement sent
to "Interfax Online" <incoming@interfax.net>:
Extra info received and forwarded to list. Copy sent to Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>.
(Wed, 28 Oct 2015 22:03:04 GMT) (full text, mbox, link).
Message #22 received at 795784@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
You have a new fax!
Scanned fax document is attached to this email.
Scan time: 33 seconds
File size: 107 Kb
Pages scanned: 4
File name: scanned00000668380.doc
From: Troy Burns
Date of scan: Wed, 28 Oct 2015 18:28:53 +0300
Quality: 400 DPI
Thanks for using Interfax service!
[scanned00000668380.zip (application/zip, attachment)]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 30 Nov 2015 07:37:20 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 09:30:52 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.