JDK-8209350 : [AOT] InstantiationError is not thrown during resolution when error occurred
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10,11,12
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-08-10
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
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 12
12Resolved
Related Reports
Duplicate :  
Description
Test Suite : JCK
Test Case: lang/EXEC/exec005/exec00503/exec00503_rt
(Standalone test in the comment)

AOT run expectation :

Expected : Test should throw java.lang.InstantiationError
Actual : Test Failed (means not throw the java.lang.InstantiationError)


Comments
In that case, it could be related to my changes to not run static intializers during AOT compiles, or maybe JDK-8209606, where we fail to detect a swapped class.
07-09-2018

No, it's different. It feels like Graal doesn't check if a class that needs to be instantiated is concrete. It's typically disallowed by javac, but in this case they hack it and swap classes. I'll take a look.
07-09-2018

[~iveresov] Sounds similar to JDK-8208673
07-09-2018

ILW = Incorrect execution of compiled code (no error thrown), single test with AOT'ed code, don't use AOT = HLM = P3
10-08-2018

Thanks for the clarification. I'll update the ILW.
10-08-2018

Tobias, I have not create so from java.base. It is only create so file of the test itself. cat run_init_aot.sh ./javac exec00503.java ./javac exec00503a.java ./jaotc --output init.so exec00503a.class exec00503c.class exec00503.class ./java -XX:AOTLibrary=./init.so exec00503 rm -rf *.class rm -rf *.so
10-08-2018

RULE "lang/EXEC/exec005/exec00503/exec00503_rt" any any
10-08-2018