changeset 55153:72ce7dd54939

8219698: aarch64: SIGILL triggered when specifying unsupported hardware features Reviewed-by: aph
author fyang
date Tue, 26 Feb 2019 10:52:31 +0800
parents d6cb11fa3773
children 2c50e900e8af 1f0b00fe27ed
files src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }
   }