RFR: 8374516: -version asserts with "-XX:+UseAESCTRIntrinsics -XX:-UseAES": "need AES instructions and misaligned SSE support" in generate_counterMode_AESCrypt_Parallel()

Guanqiang Han ghan at openjdk.org
Wed Feb 4 01:17:32 UTC 2026


On Wed, 28 Jan 2026 11:06:09 GMT, Guanqiang Han <ghan at openjdk.org> wrote:

>> Please review this change. Thanks!
>> 
>> **Description:**
>> 
>> VM crashes during startup on x86 when running with -XX:+UseAESCTRIntrinsics -XX:-UseAES. In this configuration, UseAESCTRIntrinsics may remain enabled while UseAES is explicitly disabled, and the VM generates AES-CTR stubs, hitting an assert(UseAES) in generate_counterMode_AESCrypt_Parallel().
>> 
>> **Fix:**
>> 
>> Update x86 flag initialization to enforce the dependency between UseAESCTRIntrinsics and UseAES. When UseAES is disabled, explicitly disable UseAESCTRIntrinsics (with a warning when it was set on the command line), aligning behavior with the existing UseAES/UseAESIntrinsics gating and avoiding stub generation with inconsistent flag states.
>> 
>> **Test:**
>> 
>> GHA
>
> Hi @vnkozlov and @ascarpino , Sorry for the ping — could you please take a look at this PR when you have a moment?

> Hi @hgqxjj
> 
> The fix is fine but not complete. There are more issues down in code. The main is that `FLAG_SET_DEFAULT()` is called under `!FLAG_IS_DEFAULT(UseAESCTRIntrinsics)) ` check which should be used only for `warning()` message.
> 
> See lines 1162 and 1180-1192.

Hi @vnkozlov, thank you for pointing this out. I've updated the PR, please take another look. Thanks!

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

PR Comment: https://git.openjdk.org/jdk/pull/29338#issuecomment-3844683167


More information about the hotspot-dev mailing list