-
Bug
-
Resolution: Fixed
-
P4
-
9, 10, 11
-
b23
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8259588 | 11.0.13-oracle | Sundararajan Athijegannathan | P4 | Closed | Won't Fix | |
JDK-8258685 | 11.0.11 | Erik Helin | P4 | Resolved | Fixed | b01 |
The classes generated by src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java (jdk.internal.module.SystemModules$default.class and jdk.internal.module.SystemModules$all.class) are not reproducable between builds. This is because SystemModulesPlugin iterates over various sets (exports, requires, providers, opens, etc.) and the iteration over Set is unspecified. The iteration order do differ between builds (most likely because some of the Sets are HashSets), so the generated classes differ between builds.
I have attached a reproducer, reproducer.zip, that can be used to show the issue. Just unzip the file and run "sh reproduce.sh" (use --verbose if you want a diff).
I have also attached a patch that fixes this issue by sorting the collections prior to iterating over them.
I have attached a reproducer, reproducer.zip, that can be used to show the issue. Just unzip the file and run "sh reproduce.sh" (use --verbose if you want a diff).
I have also attached a patch that fixes this issue by sorting the collections prior to iterating over them.
- backported by
-
JDK-8258685 Classes generated by SystemModulesPlugin.java are not reproducable
- Resolved
-
JDK-8259588 Classes generated by SystemModulesPlugin.java are not reproducable
- Closed
- duplicates
-
JDK-8172167 Consider making jlink module iteration order stable
- Closed
- relates to
-
JDK-8232864 Classes generated at link time by GenerateJLIClassesPlugin are not reproducible
- Resolved
-
JDK-8258945 test/jdk/tools/jlink/JLinkReproducibleTest.java fails randomly when cds is disabled
- Closed