Skip to content

Commit a875733

Browse files
committed
8352486: [ubsan] compilationMemoryStatistic.cpp:659:21: runtime error: index 64 out of bounds for type const struct unnamed struct
Reviewed-by: kvn, mdoerr, stuefe
1 parent 5591f8a commit a875733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/compiler/compilationMemoryStatistic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ class MemStatStore : public CHeapObj<mtCompiler> {
656656
assert_lock_strong(NMTCompilationCostHistory_lock);
657657
const unsigned stop_after = max_num_printed == -1 ? UINT_MAX : (unsigned)max_num_printed;
658658
result.num = result.num_c1 = result.num_c2 = result.num_filtered_out = 0;
659-
for (int i = 0; _entries[i].e != nullptr && i < max_entries && result.num < stop_after; i++) {
659+
for (int i = 0; i < max_entries && _entries[i].e != nullptr && result.num < stop_after; i++) {
660660
if (_entries[i].s >= minsize) {
661661
f(_entries[i].e);
662662
result.num++;

0 commit comments

Comments
 (0)