-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b48
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083206 | emb-9 | Thomas Schatzl | P4 | Resolved | Fixed | team |
The G1CollectorPolicy constructor uses a huge initializer list. In this list it calls "new SurvRateGroup(this, ..)" passing passing it a reference to the no yet fully initialized G1CollectorPolicy instance.
Via the following call chain, the SurvRateGroup constructor calls back to G1CollectorPolicy::get_new_prediction() which uses the uninitialzed value of G1CollectorPolicy::_sigma:
G1CollectorPolicy::G1CollectorPolicy
SurvRateGroup::SurvRateGroup
SurvRateGroup::reset
SurvRateGroup::all_surviving_words_recorded
G1CollectorPolicy::get_new_prediction
Depending on the indefinite value of '_sigma' this can lead to situations, where a GC is triggered before the whole system is initialized and ready for a GC resulting in the following crash:
Error occurred during initialization of VM
GC triggered before VM initialization completed. Try increasing NewSize, current value 5324K.
The fix is trivial - initialize the G1CollectorPolicy members in the right order
Via the following call chain, the SurvRateGroup constructor calls back to G1CollectorPolicy::get_new_prediction() which uses the uninitialzed value of G1CollectorPolicy::_sigma:
G1CollectorPolicy::G1CollectorPolicy
SurvRateGroup::SurvRateGroup
SurvRateGroup::reset
SurvRateGroup::all_surviving_words_recorded
G1CollectorPolicy::get_new_prediction
Depending on the indefinite value of '_sigma' this can lead to situations, where a GC is triggered before the whole system is initialized and ready for a GC resulting in the following crash:
Error occurred during initialization of VM
GC triggered before VM initialization completed. Try increasing NewSize, current value 5324K.
The fix is trivial - initialize the G1CollectorPolicy members in the right order
- backported by
-
JDK-8083206 G1CollectorPolicy uses uninitialized field '_sigma' in the constructor
-
- Resolved
-
- relates to
-
JDK-8068942 Improve validation of -XX:G1ConfidencePercent value
-
- Resolved
-
-
JDK-8068883 Remove disabling of warning "C4355: 'this' : used in base member initializer list"
-
- Closed
-