8219698: aarch64: SIGILL triggered when specifying unsupported hardware features
Reviewed-by: aph
--- 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);
}
}