Skip to content

Commit 3c60f0b

Browse files
committedDec 3, 2024
8345296: AArch64: VM crashes with SIGILL when prctl is disallowed
Reviewed-by: eastigeevich, phh, aph
1 parent 3eaa761 commit 3c60f0b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed
 

‎src/hotspot/cpu/aarch64/vm_version_aarch64.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,19 @@ void VM_Version::initialize() {
444444
}
445445

446446
if (UseSVE > 0) {
447-
_initial_sve_vector_length = get_current_sve_vector_length();
447+
int vl = get_current_sve_vector_length();
448+
if (vl < 0) {
449+
warning("Unable to get SVE vector length on this system. "
450+
"Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.");
451+
FLAG_SET_DEFAULT(UseSVE, 0);
452+
} else if ((vl == 0) || ((vl % FloatRegister::sve_vl_min) != 0) || !is_power_of_2(vl)) {
453+
warning("Detected SVE vector length (%d) should be a power of two and a multiple of %d. "
454+
"Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.",
455+
vl, FloatRegister::sve_vl_min);
456+
FLAG_SET_DEFAULT(UseSVE, 0);
457+
} else {
458+
_initial_sve_vector_length = vl;
459+
}
448460
}
449461

450462
// This machine allows unaligned memory accesses

0 commit comments

Comments
 (0)
Please sign in to comment.