Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8360708

Incorrect OS version reported by -XX:+PrintVMInfoAtExit and in VM error reports on macOS Tahoe 26 (Beta)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 25
    • hotspot
    • None

      After macOS 15.x, the next newer version of macOS is now 26 (currently in beta https://developer.apple.com/documentation/macos-release-notes/macos-26-release-notes ). JDK, when building on macOS, recommends the use of XCode 15.4 https://github.com/openjdk/jdk/blob/master/doc/building.md :

      > It is recommended that you use at least macOS 14 and Xcode 15.4, but earlier versions may also work.

      When using this version of XCode to build the JDK on macOS 26 (Beta), the "kern.osproductversion" sysctl configuration reports the macOS version as 16.0. Other parts of macOS ecosystem report a different and more correct version. For example, the "sw_vers" returns this on macOS 26 Beta:

      sw_vers
      ProductName: macOS
      ProductVersion: 26.0
      BuildVersion: 25A5295e

      The JDK code in os_bsd.cpp uses sysctlbyname("kern.osproductversion"...) to obtain the macOS version. This is then printed out in the VM error reports and the output of the newly introduced -XX:+PrintVMInfoAtExit java option. When the JDK is built using XCode 15.4 and VM report is then generated at runtime, then the "Host" line in that output looks as follows for macOS 26:

      Host: "foobar" arm64, N cores, ... Darwin 25.0.0, macOS 16.0 (25A5295e)

      Notice the incorrect 16.0 in the output.

      The void os::get_summary_os_info(char* buf, size_t buflen) function in os_bsd.cpp needs to be updated to take into account this version mismatch. A similar fix was recently done in the JDK mainline in a different part of the JDK through JDK-8359830.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: