src/share/vm/runtime/vframe.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/vframe.hpp

Print this page




 382 
 383 
 384 inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) {
 385   _mode = compiled_mode;
 386 
 387   // Range check to detect ridiculous offsets.
 388   if (decode_offset == DebugInformationRecorder::serialized_null ||
 389       decode_offset < 0 ||
 390       decode_offset >= nm()->scopes_data_size()) {
 391     // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
 392     // If we attempt to read nmethod::scopes_data at serialized_null (== 0),
 393     // or if we read some at other crazy offset,
 394     // we will decode garbage and make wild references into the heap,
 395     // leading to crashes in product mode.
 396     // (This isn't airtight, of course, since there are internal
 397     // offsets which are also crazy.)
 398 #ifdef ASSERT
 399     if (WizardMode) {
 400       tty->print_cr("Error in fill_from_frame: pc_desc for "
 401                     INTPTR_FORMAT " not found or invalid at %d",
 402                     _frame.pc(), decode_offset);
 403       nm()->print();
 404       nm()->method()->print_codes();
 405       nm()->print_code();
 406       nm()->print_pcs();
 407     }
 408 #endif
 409     // Provide a cheap fallback in product mode.  (See comment above.)
 410     found_bad_method_frame();
 411     fill_from_compiled_native_frame();
 412     return;
 413   }
 414 
 415   // Decode first part of scopeDesc
 416   DebugInfoReadStream buffer(nm(), decode_offset);
 417   _sender_decode_offset = buffer.read_int();
 418   _method               = buffer.read_method();
 419   _bci                  = buffer.read_bci();
 420 
 421   assert(_method->is_method(), "checking type of decoded method");
 422 }




 382 
 383 
 384 inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) {
 385   _mode = compiled_mode;
 386 
 387   // Range check to detect ridiculous offsets.
 388   if (decode_offset == DebugInformationRecorder::serialized_null ||
 389       decode_offset < 0 ||
 390       decode_offset >= nm()->scopes_data_size()) {
 391     // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
 392     // If we attempt to read nmethod::scopes_data at serialized_null (== 0),
 393     // or if we read some at other crazy offset,
 394     // we will decode garbage and make wild references into the heap,
 395     // leading to crashes in product mode.
 396     // (This isn't airtight, of course, since there are internal
 397     // offsets which are also crazy.)
 398 #ifdef ASSERT
 399     if (WizardMode) {
 400       tty->print_cr("Error in fill_from_frame: pc_desc for "
 401                     INTPTR_FORMAT " not found or invalid at %d",
 402                     p2i(_frame.pc()), decode_offset);
 403       nm()->print();
 404       nm()->method()->print_codes();
 405       nm()->print_code();
 406       nm()->print_pcs();
 407     }
 408 #endif
 409     // Provide a cheap fallback in product mode.  (See comment above.)
 410     found_bad_method_frame();
 411     fill_from_compiled_native_frame();
 412     return;
 413   }
 414 
 415   // Decode first part of scopeDesc
 416   DebugInfoReadStream buffer(nm(), decode_offset);
 417   _sender_decode_offset = buffer.read_int();
 418   _method               = buffer.read_method();
 419   _bci                  = buffer.read_bci();
 420 
 421   assert(_method->is_method(), "checking type of decoded method");
 422 }


src/share/vm/runtime/vframe.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File