Skip to content

Commit

Permalink
8277213: CompileTask_lock is acquired out of order with MethodCompile…
Browse files Browse the repository at this point in the history
…Queue_lock

Reviewed-by: rbackman, coleenp
  • Loading branch information
TobiHartmann committed Nov 19, 2021
1 parent 47564ca commit f34f119
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hotspot/share/compiler/compileTask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ class CompileTask : public CHeapObj<mtCompiler> {

public:
CompileTask() : _failure_reason(NULL), _failure_reason_on_C_heap(false) {
_lock = new Monitor(Mutex::safepoint, "CompileTask_lock");
// May hold MethodCompileQueue_lock
_lock = new Monitor(Mutex::safepoint-1, "CompileTask_lock");
}

void initialize(int compile_id, const methodHandle& method, int osr_bci, int comp_level,
Expand Down

1 comment on commit f34f119

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.