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

Resource allocated BitMaps are often cleared twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b126

      The following pattern can be seen throughout the JVM, but mostly the compiler code:

      BitMap map(size); // The bitmap is cleared here
      map.clear(); // Then here again

      The reason for this is that resource allocated bitmaps used to not be cleared in the constructor.

      When G1 was introduced, the code was changed to clear all bitmaps when the backing storage was created, but the compiler code wasn't updated accordingly.

      See:
      http://hg.openjdk.java.net/jdk9/hs/hotspot/diff/37f87013dfd8/src/share/vm/utilities/bitMap.cpp

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: