Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 12, 13
-
b09
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8220750 | 12.0.2 | Stefan Karlsson | P4 | Resolved | Fixed | b01 |
JDK-8254180 | 11.0.10-oracle | Daniil Titov | P4 | Resolved | Fixed | b01 |
JDK-8220571 | 11.0.4 | Stefan Karlsson | P4 | Resolved | Fixed | b01 |
Description
The CollectedHeap class provides concrete (broken) implementations for used() and capacity(). I propose that we make these functions abstract to force the sub classes to provide a correct implementation.
This was found while running serviceability/sa/TestHeapDumpForLargeArray.java on an experimental implementation of heap dumping in ZGC.
ZGC didn't provide a ZCollectedHeap.used() function and CollectedHeap.used() was used instead at:
// Check weather we should dump the heap as segments
useSegmentedHeapDump = vm.getUniverse().heap().used() > HPROF_SEGMENTED_HEAP_DUMP_THRESHOLD;
Because of this we incorrectly did not use segmented heap dumps, and therefore overflowed later in the code.
This was found while running serviceability/sa/TestHeapDumpForLargeArray.java on an experimental implementation of heap dumping in ZGC.
ZGC didn't provide a ZCollectedHeap.used() function and CollectedHeap.used() was used instead at:
// Check weather we should dump the heap as segments
useSegmentedHeapDump = vm.getUniverse().heap().used() > HPROF_SEGMENTED_HEAP_DUMP_THRESHOLD;
Because of this we incorrectly did not use segmented heap dumps, and therefore overflowed later in the code.
Attachments
Issue Links
- backported by
-
JDK-8220571 SA: CollectedHeap provides broken implementation for used() and capacity()
- Resolved
-
JDK-8220750 SA: CollectedHeap provides broken implementation for used() and capacity()
- Resolved
-
JDK-8254180 SA: CollectedHeap provides broken implementation for used() and capacity()
- Resolved