Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp @ 13437:1de8e5356754
8029326: G1 does not check if threads gets created
Reviewed-by: brutisso, jmasa, jwilhelm
author | ehelin |
---|---|
date | Mon, 09 Dec 2013 08:20:45 +0100 |
parents | e72f7eecc96d |
children | 63a4eb8bcd23 8847586c9037 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Fri Dec 06 09:41:57 2013 -0800 +++ b/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Mon Dec 09 08:20:45 2013 +0100 @@ -27,6 +27,7 @@ #include "gc_implementation/g1/concurrentG1RefineThread.hpp" #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" #include "gc_implementation/g1/g1HotCardCache.hpp" +#include "runtime/java.hpp" ConcurrentG1Refine::ConcurrentG1Refine(G1CollectedHeap* g1h) : _threads(NULL), _n_threads(0), @@ -62,6 +63,10 @@ for (int i = _n_threads - 1; i >= 0; i--) { ConcurrentG1RefineThread* t = new ConcurrentG1RefineThread(this, next, worker_id_offset, i); assert(t != NULL, "Conc refine should have been created"); + if (t->osthread() == NULL) { + vm_shutdown_during_initialization("Could not create ConcurrentG1RefineThread"); + } + assert(t->cg1r() == this, "Conc refine thread should refer to this"); _threads[i] = t; next = t;