comparison src/share/vm/compiler/compileBroker.cpp @ 20591:28051f14c328

8043158: Crash in CodeSweeperSweepNoFlushTest in CompileQueue::free_all() Summary: Acquire lock before calling notify() Reviewed-by: twisti, thartmann
author anoll
date Fri, 20 Jun 2014 09:25:13 +0200
parents c47fcf523fff
children ecccc23346fe
comparison
equal deleted inserted replaced
20590:c47fcf523fff 20591:28051f14c328
676 676
677 // Iterate over all tasks in the compile queue 677 // Iterate over all tasks in the compile queue
678 while (next != NULL) { 678 while (next != NULL) {
679 CompileTask* current = next; 679 CompileTask* current = next;
680 next = current->next(); 680 next = current->next();
681 // Wake up thread that blocks on the compile task. 681 {
682 current->lock()->notify(); 682 // Wake up thread that blocks on the compile task.
683 MutexLocker ct_lock(current->lock());
684 current->lock()->notify();
685 }
683 // Put the task back on the freelist. 686 // Put the task back on the freelist.
684 CompileTask::free(current); 687 CompileTask::free(current);
685 } 688 }
686 _first = NULL; 689 _first = NULL;
687 690