Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8333242 | na | Jan Lahoda | P4 | Closed | Not an Issue |
Analyzing certain source code constructs trigger an AssertionError in JavacTaskImpl.analyze
To reproduce (here on 22.0.1, but also with 23-ea+22)
echo "00000000: 6b3d 6161 3a61 2e40 610a" | xxd -r | jshell -J--show-version
java 22.0.1 2024-04-16
Java(TM) SE Runtime Environment (build 22.0.1+8-16)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
| Welcome to JShell -- Version 22.0.1
| For an introduction type: /help intro
jshell> Exception in thread "main" java.lang.InternalError: Exception during analyze - java.lang.AssertionError
at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.analyze(TaskFactory.java:420)
at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.<init>(TaskFactory.java:411)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$analyze$1(TaskFactory.java:183)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$runTask$4(TaskFactory.java:218)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskPool.getTask(JavacTaskPool.java:193)
at jdk.jshell/jdk.jshell.TaskFactory.runTask(TaskFactory.java:211)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:180)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:166)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:155)
at jdk.jshell/jdk.jshell.Eval.trialCompile(Eval.java:746)
at jdk.jshell/jdk.jshell.Eval.processExpression(Eval.java:679)
at jdk.jshell/jdk.jshell.Eval.lambda$sourceToSnippets$1(Eval.java:223)
at
...
... 27 more
Caused by: 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.checkNonNull(Assert.java:62)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.fromAnnotations(Annotate.java:167)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateTypeSecondStage$5(Annotate.java:1059)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:194)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1827)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1081)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:345)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:399)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$analyze$1(JavacTaskImpl.java:379)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:379)
... 28 more
To reproduce (here on 22.0.1, but also with 23-ea+22)
echo "00000000: 6b3d 6161 3a61 2e40 610a" | xxd -r | jshell -J--show-version
java 22.0.1 2024-04-16
Java(TM) SE Runtime Environment (build 22.0.1+8-16)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
| Welcome to JShell -- Version 22.0.1
| For an introduction type: /help intro
jshell> Exception in thread "main" java.lang.InternalError: Exception during analyze - java.lang.AssertionError
at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.analyze(TaskFactory.java:420)
at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.<init>(TaskFactory.java:411)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$analyze$1(TaskFactory.java:183)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$runTask$4(TaskFactory.java:218)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskPool.getTask(JavacTaskPool.java:193)
at jdk.jshell/jdk.jshell.TaskFactory.runTask(TaskFactory.java:211)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:180)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:166)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:155)
at jdk.jshell/jdk.jshell.Eval.trialCompile(Eval.java:746)
at jdk.jshell/jdk.jshell.Eval.processExpression(Eval.java:679)
at jdk.jshell/jdk.jshell.Eval.lambda$sourceToSnippets$1(Eval.java:223)
at
...
... 27 more
Caused by: 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.checkNonNull(Assert.java:62)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.fromAnnotations(Annotate.java:167)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateTypeSecondStage$5(Annotate.java:1059)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:194)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1827)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1081)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:345)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:399)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$analyze$1(JavacTaskImpl.java:379)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:379)
... 28 more
- backported by
-
JDK-8333242 jshell throws AssertionError when processing annotations
- Closed