提交 7040bab9 编写于 作者: T tonyp

6742641: G1: NullPointerException during GCOld

Summary: An update buffer is not processed correctly, which causes roots into the collection set not to be scanned and, hence, for the heap to be corrupted. The cause is that an object is accessed after it has been explicitly deleted, which causes a race.
Reviewed-by: jcoomes, ysr
上级 921fdff2
......@@ -208,12 +208,13 @@ apply_closure_to_completed_buffer_helper(int worker_i,
nd->index, _sz,
true, worker_i);
void** buf = nd->buf;
size_t index = nd->index;
delete nd;
if (b) {
deallocate_buffer(buf);
return true; // In normal case, go on to next buffer.
} else {
enqueue_complete_buffer(buf, nd->index, true);
enqueue_complete_buffer(buf, index, true);
return false;
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册