diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java index fa58440970cb8f4547d6dc8c075d6558c7ea6686..7e5dbb707419788c338466dadc5ba3ff11da66f1 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java @@ -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 } diff --git a/src/share/vm/runtime/thread.cpp b/src/share/vm/runtime/thread.cpp index 7d04bef08587d983f454cc9c8f63bcf6da7725f4..330593acb3ac67963824c8b6136f8f647e8ffd0f 100644 --- a/src/share/vm/runtime/thread.cpp +++ b/src/share/vm/runtime/thread.cpp @@ -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; } diff --git a/src/share/vm/runtime/thread.hpp b/src/share/vm/runtime/thread.hpp index 3298aeec8ba7321bf3a3bb39e579f8d870b12fa7..d3a6145771d6ec4979d986fd5c5b01fdc1c23a46 100644 --- a/src/share/vm/runtime/thread.hpp +++ b/src/share/vm/runtime/thread.hpp @@ -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; }