JDK-8209188 : [AOT] Exceptions are suppressed when testcases are executed through aot
Type:Bug
Component:hotspot
Sub-Component:compiler
Affected Version:10,11,12
Priority:P3
Status:Closed
Resolution:Duplicate
Submitted:2018-08-09
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.
please check comments section for steps to reproduce
Comments
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m005/Initialization00901m005_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m014/Initialization00901m014_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m001/Initialization00901m001_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m002/Initialization00901m002_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m003/Initialization00901m003_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m004/Initialization00901m004_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m006/Initialization00901m006_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m007/Initialization00901m007_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m008/Initialization00901m008_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m009/Initialization00901m009_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m010/Initialization00901m010_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m011/Initialization00901m011_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m012/Initialization00901m012_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m013/Initialization00901m013_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m015/Initialization00901m015_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m016/Initialization00901m016_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m017/Initialization00901m017_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m018/Initialization00901m018_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m019/Initialization00901m019_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m020/Initialization00901m020_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m046/Initialization00901m046_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m047/Initialization00901m047_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m048/Initialization00901m048_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m049/Initialization00901m049_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m001/Initialization01101m001_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m002/Initialization01101m002_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m003/Initialization01101m003_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m004/Initialization01101m004_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m006/Initialization01101m006_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m007/Initialization01101m007_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m009/Initialization01101m009_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m010/Initialization01101m010_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m011/Initialization01101m011_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m012/Initialization01101m012_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m013/Initialization01101m013_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m014/Initialization01101m014_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m015/Initialization01101m015_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m016/Initialization01101m016_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m038/Initialization01101m038_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m039/Initialization01101m039_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m040/Initialization01101m040_rt" any any
RULE "vm/constantpool/Initialization/Initialization009/Initialization00901m050/Initialization00901m050_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m005/Initialization01101m005_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m008/Initialization01101m008_rt" any any
RULE "vm/constantpool/Initialization/Initialization011/Initialization01101m037/Initialization01101m037_rt" any any
10-08-2018
Steps to reproduce
====================
1. download JDK11 Igor internal build
2. set JAVA_HOME and PATH to point to JDK11 build accordingling
3. create java.base aot library using the following command
jaotc -J-Xmx7g --compile-for-tiered --info --compile-commands base.txt --output solibs/rameshbase.so --module java.base
4. download and extract the attachment vm_init.zip into the current folder.
5. create AOT Library for testcases using the following command
contents of "compilecommands/init.txt"
======================================
compileOnly a.*
TERMINAL> jaotc -J-Xmx4g --info -J-cp -Jvm_init --compile-commands compilecommands/init.txt --output solibs/vminit.so --directory vm_init
6. execute the following commands at the command line.
SCENARIO 1 (WITHOUT AOT Library, Normal Run)
========================================
java -cp vm_init a.Initialization00901m001_wrapper
java.lang.reflect.InvocationTargetException
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:566)
at a.Initialization00901m001_wrapper.run(Initialization00901m001_wrapper.java:9)
at a.Initialization00901m001_wrapper.main(Initialization00901m001_wrapper.java:24)
Caused by: java.lang.ExceptionInInitializerError
at a.Initializer.exec(Initializer.jasm)
... 6 more
Caused by: java.lang.RuntimeException
at a.Initialization00901m001.<clinit>(Initialization00901m001.java:10)
... 7 more
ACTUAL OUTPUT: Exception thrown.
SCENARIO 2 (WITH AOT Library for testclasses)
==============================================
java -XX:+UnlockDiagnosticVMOptions -XX:+UseAOTStrictLoading -XX:AOTLibrary="solibs/vminit.so,solibs/rameshbase.so" -XX:+PrintAOT -cp vm_init a.Initialization00901m001_wrapper > vm_init.log
SCENARIO 3 (WITH AOTLibrary for testclasses + PrintAOT is turned off)
========================================================================
[root@llg00fyn ramesh]# java -XX:+UnlockDiagnosticVMOptions -XX:+UseAOTStrictLoading -XX:AOTLibrary="solibs/vminit.so,solibs/rameshbase.so" -XX:-PrintAOT -cp vm_init a.Initialization00901m001_wrapper
[root@llg00fyn ramesh]#
ACTUAL OUTPUT: No Exception thrown