One example: On AArch64 LSE instructions is not supported on ARMv8 platform. SIGILL is triggered on ARMv8 platform by the following command: $ java -XX:+UseLSE -version OpenJDK 64-Bit Server VM warning: UseLSE specified, but not supported on this CPU # # A fatal error has been detected by the Java Runtime Environment: # # SIGILL (0x4) at pc=0x0000ffff76b76088, pid=6950, tid=6951 # # JRE version: (13.0) (build ) # Java VM: OpenJDK 64-Bit Server VM (13-internal+0-adhoc.yangfei.jdk-jdk, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-aarch64) # Problematic frame: # j java.lang.ThreadGroup.add(Ljava/lang/ThreadGroup;)V+0 java.base # # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/yangfei/hs_err_pid6950.log Could not load hsdis-aarch64.so; library not loadable; PrintAssembly is disabled # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # Aborted Simple fix: diff -r 1ee9149df76f src/hotspot/cpu/aarch64/vm_version_aarch64.cpp --- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Mon Feb 25 16:05:06 2019 -0800 +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Wed Feb 27 10:44:59 2019 +0800 @@ -258,8 +258,10 @@ if (FLAG_IS_DEFAULT(UseCRC32)) { UseCRC32 = (auxv & HWCAP_CRC32) != 0; } + if (UseCRC32 && (auxv & HWCAP_CRC32) == 0) { warning("UseCRC32 specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseCRC32, false); } if (FLAG_IS_DEFAULT(UseAdler32Intrinsics)) { @@ -277,6 +279,7 @@ } else { if (UseLSE) { warning("UseLSE specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseLSE, false); } } @@ -291,9 +294,11 @@ } else { if (UseAES) { warning("UseAES specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseAES, false); } if (UseAESIntrinsics) { warning("UseAESIntrinsics specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseAESIntrinsics, false); } }
|