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

Shenandoah: overflows in calculations involving heap capacity

    XMLWordPrintable

Details

    • gc
    • b21

    Backports

      Description

        Heap capacity is in size_t. Which means expressions like this are subject to overflow:

          size_t min_threshold = ShenandoahMinFreeThreshold * heap->max_capacity() / 100;

        Consider the x86_32 case with max_capacity = 1G. ShenandoahMinFreeThreshold >= 5 overflows it.

        Attachments

          Issue Links

            Activity

              People

                shade Aleksey Shipilev
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: