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

Fix incorrect uses of G1CollectedHeap::heap_region_containing()

XMLWordPrintable

    • gc
    • b09

      G1CollectedHeap::heap_region_containing() currently returns HeapRegion* of uncommitted heap regions which it should actually error out on.
      At least some callers (marking code, verification code) explicitly check for nullptr on return which suggests that the intention has been to use G1CollectedHeap::heap_region_containing_or_null() instead.

      That G1CollectedHeap::heap_region_containing_or_null() method explicitly mentions that it would return nullptr on uncommitted regions.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: