Fri, 20 Jun 2014 09:25:13 +0200
8043158: Crash in CodeSweeperSweepNoFlushTest in CompileQueue::free_all()
Summary: Acquire lock before calling notify()
Reviewed-by: twisti, thartmann
src/share/vm/compiler/compileBroker.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/compiler/compileBroker.cpp Tue May 06 09:52:38 2014 +0200 1.2 +++ b/src/share/vm/compiler/compileBroker.cpp Fri Jun 20 09:25:13 2014 +0200 1.3 @@ -678,8 +678,11 @@ 1.4 while (next != NULL) { 1.5 CompileTask* current = next; 1.6 next = current->next(); 1.7 - // Wake up thread that blocks on the compile task. 1.8 - current->lock()->notify(); 1.9 + { 1.10 + // Wake up thread that blocks on the compile task. 1.11 + MutexLocker ct_lock(current->lock()); 1.12 + current->lock()->notify(); 1.13 + } 1.14 // Put the task back on the freelist. 1.15 CompileTask::free(current); 1.16 }