Skip to content

Commit 52fb263

Browse files
committed
8306428: RunThese30M.java crashed with assert(early->flag() == current->flag() || early->flag() == mtNone)
Reviewed-by: mbaesken Backport-of: ca54f4e007ab0f13bec9aaf995d34c0ab3ba6452
1 parent 00b8f5d commit 52fb263

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/hotspot/share/services/memReporter.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,13 @@ void MemDetailDiffReporter::diff_virtual_memory_sites() const {
731731
} else if (compVal > 0) {
732732
old_virtual_memory_site(early_site);
733733
early_site = early_itr.next();
734+
} else if (early_site->flag() != current_site->flag()) {
735+
// This site was originally allocated with one flag, then released,
736+
// then re-allocated at the same site (as far as we can tell) with a different flag.
737+
old_virtual_memory_site(early_site);
738+
early_site = early_itr.next();
739+
new_virtual_memory_site(current_site);
740+
current_site = current_itr.next();
734741
} else {
735742
diff_virtual_memory_site(early_site, current_site);
736743
early_site = early_itr.next();
@@ -793,7 +800,6 @@ void MemDetailDiffReporter::old_virtual_memory_site(const VirtualMemoryAllocatio
793800

794801
void MemDetailDiffReporter::diff_virtual_memory_site(const VirtualMemoryAllocationSite* early,
795802
const VirtualMemoryAllocationSite* current) const {
796-
assert(early->flag() == current->flag(), "Should be the same");
797803
diff_virtual_memory_site(current->call_stack(), current->reserved(), current->committed(),
798804
early->reserved(), early->committed(), current->flag());
799805
}

0 commit comments

Comments
 (0)