RFR(S): 8240734: ModuleHashes attribute not reproducible between builds
felix.yang at huawei.com
Wed Mar 11 01:11:33 UTC 2020
> -----Original Message-----
> From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
> Sent: Tuesday, March 10, 2020 3:53 PM
> To: Yangfei (Felix) <felix.yang at huawei.com>; core-libs-dev at openjdk.java.net
> Subject: Re: RFR(S): 8240734: ModuleHashes attribute not reproducible
> between builds
> On 10/03/2020 02:54, Yangfei (Felix) wrote:
> > Hi,
> > We found module-info.class in java.base.jmod is not always consistent
> across different builds.
> > The ModuleHashes attribute in this module-info.class is not reproducible
> between builds.
> > Patch fixes the issue by using TreeMap instead of HashMap when
> computing ModuleHashes.
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8240734
> > Webrev: http://cr.openjdk.java.net/~fyang/8240734/webrev.00/
> This looks okay (and to Bernd question, this is used at link time). I think we need
> to extend the test coverage for reproducible builds, the existing
> JLinkReproducibleTest.java would ideally have caught the difference due to the
> random ordering of hashes.
Thanks for reviewing this. Pushed.
We see two other issues which affect building reproducible jdk are resolved in 12:
1. 8214230: Classes generated by SystemModulesPlugin.java are not reproducible.
2. 8211057: Gensrc step CompileProperties generates unstable CompilerProperties output.
I am inclined to backport these three to 11u so that we can get consistent 11u builds for verification.
What do you think?
More information about the core-libs-dev