comparison src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp @ 364:919e7959392a

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
author tonyp
date Mon, 22 Sep 2008 09:56:49 -0400
parents 37f87013dfd8
children ad8c8ca4ab0f
comparison
equal deleted inserted replaced
363:032ddb9432ad 364:919e7959392a
206 bool b = 206 bool b =
207 DirtyCardQueue::apply_closure_to_buffer(_closure, nd->buf, 207 DirtyCardQueue::apply_closure_to_buffer(_closure, nd->buf,
208 nd->index, _sz, 208 nd->index, _sz,
209 true, worker_i); 209 true, worker_i);
210 void** buf = nd->buf; 210 void** buf = nd->buf;
211 size_t index = nd->index;
211 delete nd; 212 delete nd;
212 if (b) { 213 if (b) {
213 deallocate_buffer(buf); 214 deallocate_buffer(buf);
214 return true; // In normal case, go on to next buffer. 215 return true; // In normal case, go on to next buffer.
215 } else { 216 } else {
216 enqueue_complete_buffer(buf, nd->index, true); 217 enqueue_complete_buffer(buf, index, true);
217 return false; 218 return false;
218 } 219 }
219 } else { 220 } else {
220 return false; 221 return false;
221 } 222 }