File tree 1 file changed +10
-1
lines changed
visualvm/libs.profiler/lib.profiler.heap/src/org/graalvm/visualvm/lib/jfluid/heap
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1312,7 +1312,16 @@ private void heapDumpSegIterator(SegmentConsumer sc) throws IOException {
1312
1312
TagBounds heapDumpSegmentBounds = tagBounds [HEAP_DUMP_SEGMENT ];
1313
1313
1314
1314
if (heapDumpSegmentBounds != null ) {
1315
- heapDumpSegmentBounds = heapDumpSegmentBounds .union (tagBounds [HEAP_DUMP_END ]);
1315
+ TagBounds heapDumpEndBounds = tagBounds [HEAP_DUMP_END ];
1316
+ if (heapDumpEndBounds == null ) {
1317
+ throw new IOException ("Heap dump is broken.\n Tag 0x" +Integer .toHexString (HEAP_DUMP_END )+" is missing." ); // NOI18N
1318
+ }
1319
+ if (heapDumpSegmentBounds .endOffset == heapDumpEndBounds .startOffset ) {
1320
+ // shortcut - just one segment
1321
+ sc .accept (heapDumpSegmentBounds .startOffset ,heapDumpSegmentBounds .endOffset );
1322
+ return ;
1323
+ }
1324
+ heapDumpSegmentBounds = heapDumpSegmentBounds .union (heapDumpEndBounds );
1316
1325
long start = heapDumpSegmentBounds .startOffset ;
1317
1326
long [] offset = new long [] { start };
1318
1327
long segmentStart = 0 ;
You can’t perform that action at this time.
0 commit comments