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

Fix potential truncation error in Arguments::set_heap_size()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • 17
    • hotspot
    • None
    • gc
    • b19

      There are several integer types used when setting the heap size ergonomically in Arguments::set_heap_size(), such as julong, uint64_t and size_t. It's not clear if this code works as intended on a 32-bit VM with more than 4GB physical memory. There might be issues when converting to/from size_t and uint64_t for example that we don't consider. We should be more robust and have more control when transitions happen to potentially smaller types.

      Apart from MaxRAM and XXXRAMPercentage(s), all flags in relation to the heap size are typed as size_t.

            jsikstro Joel Sikström
            jsikstro Joel Sikström
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: