提交 a5cebdbe 编写于 作者: J johnc

6981746: G1: SEGV with -XX:+TraceGen0Time

Summary: Pass correct value for length to NumberSeq constructor. Guard dereferences of "body_summary" pointer with a NULL check.
Reviewed-by: tonyp, ysr
上级 35fc3cb6
...@@ -2148,7 +2148,7 @@ void G1CollectorPolicy::print_summary(PauseSummary* summary) const { ...@@ -2148,7 +2148,7 @@ void G1CollectorPolicy::print_summary(PauseSummary* summary) const {
body_summary->get_termination_seq() body_summary->get_termination_seq()
}; };
NumberSeq calc_other_times_ms(body_summary->get_parallel_seq(), NumberSeq calc_other_times_ms(body_summary->get_parallel_seq(),
7, other_parts); 6, other_parts);
check_other_times(2, body_summary->get_parallel_other_seq(), check_other_times(2, body_summary->get_parallel_other_seq(),
&calc_other_times_ms); &calc_other_times_ms);
} }
...@@ -2166,6 +2166,7 @@ void G1CollectorPolicy::print_summary(PauseSummary* summary) const { ...@@ -2166,6 +2166,7 @@ void G1CollectorPolicy::print_summary(PauseSummary* summary) const {
} }
print_summary(1, "Other", summary->get_other_seq()); print_summary(1, "Other", summary->get_other_seq());
{ {
if (body_summary != NULL) {
NumberSeq calc_other_times_ms; NumberSeq calc_other_times_ms;
if (parallel) { if (parallel) {
// parallel // parallel
...@@ -2187,10 +2188,11 @@ void G1CollectorPolicy::print_summary(PauseSummary* summary) const { ...@@ -2187,10 +2188,11 @@ void G1CollectorPolicy::print_summary(PauseSummary* summary) const {
body_summary->get_obj_copy_seq() body_summary->get_obj_copy_seq()
}; };
calc_other_times_ms = NumberSeq(summary->get_total_seq(), calc_other_times_ms = NumberSeq(summary->get_total_seq(),
7, other_parts); 6, other_parts);
} }
check_other_times(1, summary->get_other_seq(), &calc_other_times_ms); check_other_times(1, summary->get_other_seq(), &calc_other_times_ms);
} }
}
} else { } else {
print_indent(0); print_indent(0);
gclog_or_tty->print_cr("none"); gclog_or_tty->print_cr("none");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册