[aarch64-port-dev ] RFR: [backport] overflow integer during size calculation
Roman Kennke
rkennke at redhat.com
Thu Jun 21 09:22:31 UTC 2018
This fixes an important regression found by QA when running with Shenandoah.
# HG changeset patch
# User zgu
# Date 1529419060 14400
# Tue Jun 19 10:37:40 2018 -0400
# Node ID 923b7475c897b75d9d3ad5350bb3f3edcb32a413
# Parent 67e063d99bbd5ce67f4197f4e15561e9a634e7e2
[backport] overflow integer during size calculation
diff --git
a/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.inline.hpp
b/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.inline.hpp
---
a/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.inline.hpp
+++
b/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.inline.hpp
@@ -94,10 +94,12 @@
inline void ShenandoahConcurrentMark::count_liveness_humongous(oop obj) {
shenandoah_assert_in_correct_region(NULL, obj);
size_t region_idx = _heap->heap_region_index_containing(obj);
- int size = obj->size() + BrooksPointer::word_size();
+ size_t size = obj->size() + BrooksPointer::word_size();
size_t num_regions = ShenandoahHeapRegion::required_regions(size *
HeapWordSize);
+
for (size_t i = region_idx; i < region_idx + num_regions; i++) {
ShenandoahHeapRegion* chain_reg = _heap->get_region(i);
+ assert(chain_reg->is_humongous(), "Expecting a humongous region");
chain_reg->increase_live_data_gc_words(chain_reg->used() >>
LogHeapWordSize);
}
}
More information about the aarch64-port-dev
mailing list