JDK-8233655 : NPE at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 14
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-06
  • Updated: 2020-11-13
  • Resolved: 2020-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14 JDK 15
14 b32Fixed 15Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
compilation of compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotJVMCIRuntime.java jtreg test (w/ the patch from http://cr.openjdk.java.net/~iignatyev//8230364/webrev.00/index.html ) leads to the next crash in javac:

An exception has occurred in the compiler (14-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java.lang.NullPointerException
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1334)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1736)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:218)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1522)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:1083)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1029)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitTry(Flow.java:1205)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1384)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:1083)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1029)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitMethodDef(Flow.java:1049)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:875)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitClassDef(Flow.java:1012)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:783)
	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1427)
	at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1417)
	at jdk.compiler/com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:217)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1406)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1380)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:972)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:318)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:75)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.RegressionCompileCommand.run(RegressionCompileCommand.java:190)
	at com.sun.javatest.regtest.agent.CompileActionHelper.runCompile(CompileActionHelper.java:92)
	at com.sun.javatest.regtest.agent.AgentServer.doCompile(AgentServer.java:220)
	at com.sun.javatest.regtest.agent.AgentServer.run(AgentServer.java:190)
	at com.sun.javatest.regtest.agent.AgentServer.main(AgentServer.java:65)
Comments
URL: https://hg.openjdk.java.net/jdk/jdk14/rev/a8680d72a2bf User: jlahoda Date: 2020-01-15 10:31:49 +0000
15-01-2020

adding exports of jdk.internal.vm.ci/jdk.vm.ci.code and jdk.internal.vm.ci/jdk.vm.ci.common and adding /compiler/jvmci/jdk.vm.ci.code.test/src to test sourcepath[1] made the problem go away. [1] /* * @test * @requires vm.jvmci * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.code * jdk.internal.vm.ci/jdk.vm.ci.common * @library /compiler/jvmci/jdk.vm.ci.hotspot.test/src * /compiler/jvmci/jdk.vm.ci.code.test/src * @run testng/othervm * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler * jdk.vm.ci.hotspot.test.TestHotSpotJVMCIRuntime */
06-11-2019

javac.*.args file content: --add-modules jdk.internal.vm.ci --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED -d /Users/iignatye/ws/jdk/jdk/build/macosx-x64/test-support/jtreg_open_test_hotspot_jtreg_compiler_jvmci_jdk_vm_ci_hotspot_test/classes/0/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotJVMCIRuntime.d -sourcepath /Users/iignatye/ws/jdk/jdk/open/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test:/Users/iignatye/ws/jdk/jdk/open/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src:/Users/iignatye/ws/jdk/jdk/open/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src -classpath /Users/iignatye/ws/jdk/jdk/open/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test:/Users/iignatye/ws/jdk/jdk/build/macosx-x64/test-support/jtreg_open_test_hotspot_jtreg_compiler_jvmci_jdk_vm_ci_hotspot_test/classes/0/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotJVMCIRuntime.d:/Users/iignatye/ws/jdk/jdk/build/macosx-x64/test-support/jtreg_open_test_hotspot_jtreg_compiler_jvmci_jdk_vm_ci_hotspot_test/classes/0/compiler/jvmci/jdk.vm.ci.hotspot.test/src:/Users/iignatye/ws/jdk/jdk/build/macosx-x64/test-support/jtreg_open_test_hotspot_jtreg_compiler_jvmci_jdk_vm_ci_hotspot_test/classes/0/compiler/jvmci/jdk.vm.ci.code.test/src:/private/var/tmp/jib-iignatye/install/java/re/jtreg/4.2/promoted/all/b14/bundles/jtreg_bin-4.2.zip/jtreg/lib/testng.jar /Users/iignatye/ws/jdk/jdk/open/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotJVMCIRuntime.java
06-11-2019

might be due to the same root-cause as JDK-8206917
06-11-2019