mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6742641: G1: NullPointerException during GCOld
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
This commit is contained in:
parent
1d67e1d25c
commit
c03ab32ab5
1 changed files with 2 additions and 1 deletions
|
@ -208,12 +208,13 @@ apply_closure_to_completed_buffer_helper(int worker_i,
|
||||||
nd->index, _sz,
|
nd->index, _sz,
|
||||||
true, worker_i);
|
true, worker_i);
|
||||||
void** buf = nd->buf;
|
void** buf = nd->buf;
|
||||||
|
size_t index = nd->index;
|
||||||
delete nd;
|
delete nd;
|
||||||
if (b) {
|
if (b) {
|
||||||
deallocate_buffer(buf);
|
deallocate_buffer(buf);
|
||||||
return true; // In normal case, go on to next buffer.
|
return true; // In normal case, go on to next buffer.
|
||||||
} else {
|
} else {
|
||||||
enqueue_complete_buffer(buf, nd->index, true);
|
enqueue_complete_buffer(buf, index, true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue