8152182: Possible overflow in initialzation of _rescan_task_size and _marking_task_size

Add constraints for CMSRescanMultiple and CMSConcMarkMultiple flags

Reviewed-by: jwilhelm, jmasa
This commit is contained in:
Sangheon Kim 2016-04-07 15:34:21 -07:00
parent 10c7cac93e
commit 25f35cda7d
5 changed files with 60 additions and 2 deletions

View file

@ -1806,13 +1806,17 @@ public:
"enough work per iteration") \
range(0, max_intx) \
\
/* 4096 = CardTableModRefBS::card_size_in_words * BitsPerWord */ \
product(size_t, CMSRescanMultiple, 32, \
"Size (in cards) of CMS parallel rescan task") \
range(1, max_uintx) \
range(1, SIZE_MAX / 4096) \
constraint(CMSRescanMultipleConstraintFunc,AfterMemoryInit) \
\
/* 4096 = CardTableModRefBS::card_size_in_words * BitsPerWord */ \
product(size_t, CMSConcMarkMultiple, 32, \
"Size (in cards) of CMS concurrent MT marking task") \
range(1, max_uintx) \
range(1, SIZE_MAX / 4096) \
constraint(CMSConcMarkMultipleConstraintFunc,AfterMemoryInit) \
\
product(bool, CMSAbortSemantics, false, \
"Whether abort-on-overflow semantics is implemented") \