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

Shenandoah: overflows in calculations involving heap capacity

XMLWordPrintable

    • gc
    • b21

        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.

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

                Created:
                Updated:
                Resolved: