RFR: 8300227: [macos_aarch64] assert(cpu_has("hw.optional.arm.FEAT_AES")) failed after JDK-8297092

Hao Sun haosun at openjdk.org
Tue Jan 17 06:34:46 UTC 2023


This failure occurs on macOS before xnu-8019 version, mainly because the sysctlbyname string names were not introduced before xnu-8019. Take the source code of xnu-7195 [1] as an example.

In this patch, we remove the assertions for the sake of backward compatibility.

Test:
In my local test environment, one Macmini with xnu-8020.140.41 and another Macmini with xnu-7195.141.6, fastdebug build can pass now and the CPU features can be detected as expected.


$ ./jdk/bin/java -XX:+PrintFlagsFinal --version | grep SHA
     bool UseSHA                = true       {product} {default}
     bool UseSHA1Intrinsics     = true    {diagnostic} {default}
     bool UseSHA256Intrinsics   = true    {diagnostic} {default}
     bool UseSHA3Intrinsics     = true    {diagnostic} {default}
     bool UseSHA512Intrinsics   = true    {diagnostic} {default}


[1] https://github.com/apple-oss-distributions/xnu/blob/rel/xnu-7195/bsd/kern/kern_mib.c#L855

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

Commit messages:
 - 8300227: [macos_aarch64] assert(cpu_has("hw.optional.arm.FEAT_AES")) failed after JDK-8297092

Changes: https://git.openjdk.org/jdk/pull/12022/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12022&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8300227
  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/12022.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12022/head:pull/12022

PR: https://git.openjdk.org/jdk/pull/12022


More information about the hotspot-runtime-dev mailing list