max_eden_size is wrongly calculated in CMSCollector::acquire_control_and_collect, as reported in JBS. This issue has already been fixed in jdk9, and should have been backported to jdk8u, but nobody did it. I haven't signed the OCA so I can't make a patch. Would someone help with backporting this? BTW, this patch applies cleanly in jdk8u.