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

Incorrect PrintFlags formatting on Windows

XMLWordPrintable

    • master
    • generic
    • windows

        Consider the following command in 8u:

        java -Xmx4g -XX:+PrintFlagsFinal -version

        Its output on Windows will contain invalid zero values for 64-bit flags which actual values are exact multiple of 4 GiB:

        ...
        uintx MaxHeapSize := 0
        ...

        This happens because value is stored in uintx (uintptr_t) that is 64-bit, but "%-16lu" formatting string is used that is intended for unsigned long (32-bit on Windows).

        Actual flag value is correct, the problem happens when this value is being formatted for the output.

        This problem was fixed in 9 as part of JDK-8042893 .

              akasko Alex Kasko
              akasko Alex Kasko
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: