8219698: aarch64: SIGILL triggered when specifying unsupported hardware features

Reviewed-by: aph
This commit is contained in:
Fei Yang 2019-02-26 10:52:31 +08:00
parent e568d2abd0
commit 847ba6becb

View File

@ -258,8 +258,10 @@ void VM_Version::get_processor_features() {
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 @@ void VM_Version::get_processor_features() {
} else {
if (UseLSE) {
warning("UseLSE specified, but not supported on this CPU");
FLAG_SET_DEFAULT(UseLSE, false);
}
}
@ -291,9 +294,11 @@ void VM_Version::get_processor_features() {
} 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);
}
}