changeset 10708:ab681d5299dc

8152160: SIGFPE in CompactibleFreeListSpaceLAB::compute_desired_plab_size Summary: Rephrase the calculation with CMSOldPLABNumRefills to avoid an overflow Reviewed-by: pliden, jmasa
author sangheki
date Thu, 24 Mar 2016 23:07:06 -0700
parents 0942199cdbd8
children b85ea7097b6e
files src/share/vm/gc/cms/compactibleFreeListSpace.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Fri Mar 25 03:53:18 2016 +0000
+++ b/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Thu Mar 24 23:07:06 2016 -0700
@@ -2536,7 +2536,7 @@
         _blocks_to_claim[i].sample(
           MAX2(CMSOldPLABMin,
           MIN2(CMSOldPLABMax,
-               _global_num_blocks[i]/(_global_num_workers[i]*CMSOldPLABNumRefills))));
+               _global_num_blocks[i]/_global_num_workers[i]/CMSOldPLABNumRefills)));
       }
       // Reset counters for next round
       _global_num_workers[i] = 0;