RFR: [backport] overflow integer during size calculation
Aleksey Shipilev
shade at redhat.com
Thu Jun 21 09:43:13 UTC 2018
OK
-Aleksey
On 06/21/2018 11:17 AM, Roman Kennke wrote:
> Applied cleanly, except for usual source path changes.
>
> Ok?
>
> # HG changeset patch
> # User zgu
> # Date 1529419060 14400
> # Tue Jun 19 10:37:40 2018 -0400
> # Node ID eef4ccd8af8b7062c40f0d5415a60d4256dbb68e
> # Parent 5945161251d848a91a3cba7241600e959f92cd77
> [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
> @@ -95,10 +95,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 shenandoah-dev
mailing list