Skip to content

Commit

Permalink
8306428: RunThese30M.java crashed with assert(early->flag() == curren…
Browse files Browse the repository at this point in the history
…t->flag() || early->flag() == mtNone)

Reviewed-by: jsjolen, stuefe
  • Loading branch information
Gerard Ziemski committed May 27, 2023
1 parent 5fdb22f commit ca54f4e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/hotspot/share/services/memReporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,13 @@ void MemDetailDiffReporter::diff_virtual_memory_sites() const {
} else if (compVal > 0) {
old_virtual_memory_site(early_site);
early_site = early_itr.next();
} else if (early_site->flag() != current_site->flag()) {
// This site was originally allocated with one flag, then released,
// then re-allocated at the same site (as far as we can tell) with a different flag.
old_virtual_memory_site(early_site);
early_site = early_itr.next();
new_virtual_memory_site(current_site);
current_site = current_itr.next();
} else {
diff_virtual_memory_site(early_site, current_site);
early_site = early_itr.next();
Expand Down Expand Up @@ -842,8 +849,6 @@ void MemDetailDiffReporter::old_virtual_memory_site(const VirtualMemoryAllocatio

void MemDetailDiffReporter::diff_virtual_memory_site(const VirtualMemoryAllocationSite* early,
const VirtualMemoryAllocationSite* current) const {
assert(early->flag() == current->flag() || early->flag() == mtNone,
"Expect the same flag, but %s != %s", NMTUtil::flag_to_name(early->flag()),NMTUtil::flag_to_name(current->flag()));
diff_virtual_memory_site(current->call_stack(), current->reserved(), current->committed(),
early->reserved(), early->committed(), current->flag());
}
Expand Down

1 comment on commit ca54f4e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.