8219698: aarch64: SIGILL triggered when specifying unsupported hardware features
authorfyang
Tue, 26 Feb 2019 10:52:31 +0800
changeset 53943 72ce7dd54939
parent 53942 d6cb11fa3773
child 53944 2c50e900e8af
child 53945 1f0b00fe27ed
8219698: aarch64: SIGILL triggered when specifying unsupported hardware features Reviewed-by: aph
src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Wed Feb 27 18:58:29 2019 +0800
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Tue Feb 26 10:52:31 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);
     }
   }