mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8185164: GetOwnedMonitorInfo() returns incorrect owned monitor
The GetOwnedMonitorInfo() should not return a pending monitor Reviewed-by: dholmes, dcubed, sspitsyn
This commit is contained in:
parent
7d3e2cd5a3
commit
8b26f53df7
4 changed files with 347 additions and 2 deletions
|
@ -307,6 +307,8 @@ void ObjectMonitor::enter(TRAPS) {
|
|||
{ // Change java thread status to indicate blocked on monitor enter.
|
||||
JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this);
|
||||
|
||||
Self->set_current_pending_monitor(this);
|
||||
|
||||
DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt);
|
||||
if (JvmtiExport::should_post_monitor_contended_enter()) {
|
||||
JvmtiExport::post_monitor_contended_enter(jt, this);
|
||||
|
@ -321,8 +323,6 @@ void ObjectMonitor::enter(TRAPS) {
|
|||
OSThreadContendState osts(Self->osthread());
|
||||
ThreadBlockInVM tbivm(jt);
|
||||
|
||||
Self->set_current_pending_monitor(this);
|
||||
|
||||
// TODO-FIXME: change the following for(;;) loop to straight-line code.
|
||||
for (;;) {
|
||||
jt->set_suspend_equivalent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue