hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
changeset 4566 b363f6ef4068
parent 2105 347008ce7984
child 4748 3fa8d8a7c0ea
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Mon Jan 04 15:21:09 2010 -0800
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Tue Jan 05 13:05:58 2010 +0100
@@ -225,11 +225,12 @@
 // top of expression stack
 inline intptr_t* frame::interpreter_frame_tos_address() const {
   intptr_t* last_sp = interpreter_frame_last_sp();
-  if (last_sp == NULL ) {
+  if (last_sp == NULL) {
     return sp();
   } else {
-    // sp() may have been extended by an adapter
-    assert(last_sp < fp() && last_sp >= sp(), "bad tos");
+    // sp() may have been extended or shrunk by an adapter.  At least
+    // check that we don't fall behind the legal region.
+    assert(last_sp < (intptr_t*) interpreter_frame_monitor_begin(), "bad tos");
     return last_sp;
   }
 }