-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: repo-valhalla
-
Component/s: tools
Classes in ${JAVA_HOME}/lib/valueclasses/java.base-valueclasses.jar jave a LoadableDescriptors attribute
https://cr.openjdk.org/~dlsmith/jep401/jep401-20251210/specs/value-objects-jvms.html#jvms-4.7.32
The contents of this attribute is not deterministic. If you build from the same JDK source code twice, you get classfiles that are different. This does not meet the requirement that JDK builds must be reproducible
$ make jdk
$ jdk/bin/javap -v ./support/valueclasses/java.base/java/time/LocalTime.class | tee /tmp/old.txt | tail -5
LoadableDescriptors:
Ljava/time/LocalDateTime;
Ljava/time/OffsetTime;
Ljava/time/Instant;
Ljava/time/LocalDate;
$ rm -rf jdk
$ make jdk
$ jdk/bin/javap -v ./support/valueclasses/java.base/java/time/LocalTime.class | tee /tmp/new.txt | tail -5
LoadableDescriptors:
Ljava/time/OffsetTime;
Ljava/time/LocalDate;
Ljava/time/Instant;
Ljava/time/LocalDateTime;
$ diff /tmp/old.txt /tmp/new.txt
3c3
< SHA-256 checksum d10a9f93ff079ae0edb7a65cd0f845d6e765c2f51c836391007b6db44c13b7b8
---
> SHA-256 checksum a9afb55f79b30126918b6b498610665a9964f10d2063bb87ac3a27fdaf41228f
689,690c689,690
< #696 = Utf8 Ljava/time/LocalDateTime;
< #697 = Utf8 Ljava/time/OffsetTime;
---
> #696 = Utf8 Ljava/time/OffsetTime;
> #697 = Utf8 Ljava/time/LocalDateTime;
3473d3472
< Ljava/time/LocalDateTime;
3475d3473
< Ljava/time/Instant;
3476a3475,3476
> Ljava/time/Instant;
> Ljava/time/LocalDateTime;
https://cr.openjdk.org/~dlsmith/jep401/jep401-20251210/specs/value-objects-jvms.html#jvms-4.7.32
The contents of this attribute is not deterministic. If you build from the same JDK source code twice, you get classfiles that are different. This does not meet the requirement that JDK builds must be reproducible
$ make jdk
$ jdk/bin/javap -v ./support/valueclasses/java.base/java/time/LocalTime.class | tee /tmp/old.txt | tail -5
LoadableDescriptors:
Ljava/time/LocalDateTime;
Ljava/time/OffsetTime;
Ljava/time/Instant;
Ljava/time/LocalDate;
$ rm -rf jdk
$ make jdk
$ jdk/bin/javap -v ./support/valueclasses/java.base/java/time/LocalTime.class | tee /tmp/new.txt | tail -5
LoadableDescriptors:
Ljava/time/OffsetTime;
Ljava/time/LocalDate;
Ljava/time/Instant;
Ljava/time/LocalDateTime;
$ diff /tmp/old.txt /tmp/new.txt
3c3
< SHA-256 checksum d10a9f93ff079ae0edb7a65cd0f845d6e765c2f51c836391007b6db44c13b7b8
---
> SHA-256 checksum a9afb55f79b30126918b6b498610665a9964f10d2063bb87ac3a27fdaf41228f
689,690c689,690
< #696 = Utf8 Ljava/time/LocalDateTime;
< #697 = Utf8 Ljava/time/OffsetTime;
---
> #696 = Utf8 Ljava/time/OffsetTime;
> #697 = Utf8 Ljava/time/LocalDateTime;
3473d3472
< Ljava/time/LocalDateTime;
3475d3473
< Ljava/time/Instant;
3476a3475,3476
> Ljava/time/Instant;
> Ljava/time/LocalDateTime;
- links to
-
Commit(lworld)
openjdk/valhalla/e98a1493
-
Review(lworld)
openjdk/valhalla/1833