6699669: Hotspot server leaves synchronized block with monitor in bad state

Remove usage of _highest_lock field in Thread so that is_lock_owned won't depend on the correct update of that field.

Reviewed-by: never, dice, acorn
This commit is contained in:
Xiaobin Lu 2009-04-06 15:47:39 -07:00
parent e1b2c1c442
commit 62fa852746
8 changed files with 37 additions and 79 deletions

View file

@ -37,11 +37,6 @@ JavaCallWrapper::JavaCallWrapper(methodHandle callee_method, Handle receiver, Ja
guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler");
_result = result;
// Make sure that that the value of the higest_lock is at least the same as the current stackpointer,
// since, the Java code is highly likely to use locks.
// Use '(address)this' to guarantee that highest_lock address is conservative and inside our thread
thread->update_highest_lock((address)this);
// Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub,
// since it can potentially block.
JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);