6990933: assert(sender_cb) failed: sanity in frame::sender_for_interpreter_frame
authortwisti
Sat, 18 Dec 2010 01:15:01 -0800
changeset 7707 b4ff9fc6d954
parent 7704 cc9d3ed42704
child 7708 745395f5c673
6990933: assert(sender_cb) failed: sanity in frame::sender_for_interpreter_frame Reviewed-by: never
hotspot/src/share/vm/code/nmethod.cpp
--- a/hotspot/src/share/vm/code/nmethod.cpp	Thu Dec 16 14:15:12 2010 -0800
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Sat Dec 18 01:15:01 2010 -0800
@@ -811,9 +811,11 @@
     _stub_offset             = content_offset()      + code_buffer->total_offset_of(code_buffer->stubs());
 
     // Exception handler and deopt handler are in the stub section
+    assert(offsets->value(CodeOffsets::Exceptions) != -1, "must be set");
+    assert(offsets->value(CodeOffsets::Deopt     ) != -1, "must be set");
     _exception_offset        = _stub_offset          + offsets->value(CodeOffsets::Exceptions);
     _deoptimize_offset       = _stub_offset          + offsets->value(CodeOffsets::Deopt);
-    if (has_method_handle_invokes()) {
+    if (offsets->value(CodeOffsets::DeoptMH) != -1) {
       _deoptimize_mh_offset  = _stub_offset          + offsets->value(CodeOffsets::DeoptMH);
     } else {
       _deoptimize_mh_offset  = -1;
@@ -1909,6 +1911,7 @@
       break;
     }
   }
+  assert(has_method_handle_invokes() == (_deoptimize_mh_offset != -1), "must have deopt mh handler");
 
   int size = count * sizeof(PcDesc);
   assert(scopes_pcs_size() >= size, "oob");