On Tue, 3 Feb 2026 07:04:28 GMT, Shawn M Emery <[email protected]> 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
>
> test/hotspot/jtreg/compiler/cpuflags/TestUseAESCTRIntrinsicsWithUseAESDisabled.java
>  line 28:
> 
>> 26:  * @bug 8374516
>> 27:  * @summary Regression test for -XX:+UseAESCTRIntrinsics -XX:-UseAES 
>> crash
>> 28:  * @requires os.arch=="amd64" | os.arch=="x86_64"
> 
> These are the only two architectures that exhibit this bug?
> I was able to reproduce the problem with this test case on my x86_64 desktop 
> and confirmed that the fix did indeed resolve the problem.
> All AES Java and hotspot regression tests have also passed.

Hi @smemery , thanks for the review.
Before making this change, I did a quick check across other architectures and 
found that some architectures don’t support this flag, and some already handle 
it correctly. Only the x86 architecture wasn’t handling it correctly.
So I only tested on those two architectures.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29338#discussion_r2758718178

Reply via email to