RFR: 8358749: Fix input checks in Vector API intrinsics

Aleksey Shipilev shade at openjdk.org
Tue Jun 10 06:17:34 UTC 2025


On Fri, 6 Jun 2025 23:12:07 GMT, ExE Boss <duke at openjdk.org> wrote:

>> We have been carrying this patch in Leyden/premain for a while: https://github.com/openjdk/leyden/commit/7faed7fc5c8e1bbd9a16ab22673a77099396179c. I believe it deserves to be in mainline. I polished it a little further.
>> 
>> It is _mostly_ a cleanup, but there are also new checks, on the paths where we do take constants off the arguments. In those cases, I believe the alternative is compiler SEGV-ing.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 server fastdebug, `hotspot_vector_1 hotspot_vector_2`
>>  - [x] Linux x86_64 server fastdebug, `jdk_vector`
>
> Also note that the implementation of `Utils.isNonCapturingLambda(…)` is wrong when the `jdk.internal.lambda.disableEagerInitialization` system property is set to `"true"`, as that causes lambda classes to have one `static final` field:
> https://github.com/openjdk/jdk/blob/d7352559195b9e052c3eb24d773c0d6c10dc23ad/src/java.base/share/classes/jdk/internal/vm/vector/Utils.java#L36-L38
> https://github.com/openjdk/jdk/blob/d7352559195b9e052c3eb24d773c0d6c10dc23ad/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java#L365-L372

@ExE-Boss, I believe that comment should be in another bug.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25673#issuecomment-2957803460


More information about the hotspot-compiler-dev mailing list