Fix potential truncation error in Arguments::set_heap_size()

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 17
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: