RFR: 8345296: AArch64: VM crashes with SIGILL when prctl is disallowed [v2]
Evgeny Astigeevich
eastigeevich at openjdk.org
Mon Dec 2 15:33:41 UTC 2024
On Mon, 2 Dec 2024 15:11:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/vm_version_aarch64.cpp line 447:
>>
>>> 445:
>>> 446: if (UseSVE > 0) {
>>> 447: _initial_sve_vector_length = get_current_sve_vector_length();
>>
>> We need an assert checking `_initial_sve_vector_length > 0`
>
> Speaking of the valid ranges for SVE vector length, I don't think we want to blindly accept any `>0` value either. There is a block downwards that tries to check that vector length is not smaller than a `FloatRegister::sve_vl_min`, and that it is a power of two. But that block only works for manual overrides of `MaxVectorSize`. I say we co-opt that block for checking the `prctl` result on a common path. See new commit?
I don't like `get_current_sve_vector_length` returning `-1`. IMO if you cannot use SVE calling it makes no sense.
I see its doc mentions a negative result: https://github.com/openjdk/jdk/blob/b8233989e7605268dda908e6b639ca373789792b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp#L58-L62
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22479#discussion_r1866062683
More information about the hotspot-dev
mailing list