[jdk17u-dev] RFR: 8336942: Improve test coverage for class loading elements with annotations of different retentions [v2]
Liam Miller-Cushon
cushon at openjdk.org
Mon Nov 11 18:52:11 UTC 2024
On Mon, 11 Nov 2024 18:26:02 GMT, Thomas Fitzsimmons <duke at openjdk.org> wrote:
> Independent of the harness fix, I would ideally like to be able replicate the crash you mention. I have not yet found a way to make the `f10` lines you added produce a failure. Can you advise how I would do that?
>
> So far, I tried the new test on, and it succeeded on, `959665633eae0923d8acce533834940d1797bffd`, the commit before your backport of the fix for JDK-8225377, `3a2bf8e570d5e329f22b4eaf5e90fef8cd14f8b2`. The `f10` lines also passed on `3a2bf8e570d5e329f22b4eaf5e90fef8cd14f8b2`. Maybe there is some other fix I need to revert?
Sorry for not providing more of this context up front. The crash was an interaction with the backport for JDK-8225377, which was previously backported to JDK 17 and backed out. The motivation for backporting this test change was to have coverage in-place if the backport ends up getting re-done (https://bugs.openjdk.org/browse/JDK-8341779). (It isn't certain if that backport will be re-done, if it is there will be additional discussion and a CSR first.)
I created a draft PR with the changes to reproduce the crash here: https://github.com/openjdk/jdk17u-dev/pull/3038
make test TEST="jtreg:test/langtools/tools/javac/processing/model/type/BasicAnnoTests.java"
...
java.lang.AssertionError
at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46)
at jdk.compiler/com.sun.tools.javac.code.TypeMetadata$Annotations.combine(TypeMetadata.java:194)
at jdk.compiler/com.sun.tools.javac.code.TypeMetadata$Annotations.combine(TypeMetadata.java:174)
at jdk.compiler/com.sun.tools.javac.code.TypeMetadata.combine(TypeMetadata.java:90)
at jdk.compiler/com.sun.tools.javac.code.Type.annotatedType(Type.java:403)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$TypeAnnotationTypeMapping.reannotate(ClassReader.java:2476)
The changes in the draft PR are
* Re-do the backport of JDK-8225377 (https://bugs.openjdk.org/browse/JDK-8341779)
* Update the backport for some changes in javac's `TypeMetadata` API
* This PR
* Removing the logic that was updated for the `TypeMetadata`, which reproduces the crash
-------------
PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2955#issuecomment-2468826252
More information about the jdk-updates-dev
mailing list