提交 c0ea5af3 编写于 作者: D dholmes

8215355: Object monitor deadlock with no threads holding the monitor (using jemalloc 5.1)

Reviewed-by: rehn, stuefe, dcubed, sspitsyn
上级 3447e172
......@@ -371,14 +371,14 @@ public class JavaThread extends Thread {
Address stackBase = getStackBase();
// Be robust
if (sp == null) return false;
return stackBase.greaterThanOrEqual(a) && sp.lessThanOrEqual(a);
return stackBase.greaterThan(a) && sp.lessThanOrEqual(a);
}
public boolean isLockOwned(Address a) {
Address stackBase = getStackBase();
Address stackLimit = stackBase.addOffsetTo(-getStackSize());
return stackBase.greaterThanOrEqual(a) && stackLimit.lessThanOrEqual(a);
return stackBase.greaterThan(a) && stackLimit.lessThanOrEqual(a);
// FIXME: should traverse MonitorArray/MonitorChunks as in VM
}
......
......@@ -962,7 +962,7 @@ bool Thread::is_in_stack(address adr) const {
address end = os::current_stack_pointer();
// Allow non Java threads to call this without stack_base
if (_stack_base == NULL) return true;
if (stack_base() >= adr && adr >= end) return true;
if (stack_base() > adr && adr >= end) return true;
return false;
}
......
......@@ -558,7 +558,7 @@ protected:
bool on_local_stack(address adr) const {
/* QQQ this has knowledge of direction, ought to be a stack method */
return (_stack_base >= adr && adr >= (_stack_base - _stack_size));
return (_stack_base > adr && adr >= (_stack_base - _stack_size));
}
uintptr_t self_raw_id() { return _self_raw_id; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册