< prev index next >

src/hotspot/cpu/arm/frame_arm.cpp

Print this page




 477   Method* m = *interpreter_frame_method_addr();
 478 
 479   // validate the method we'd find in this potential sender
 480   if (!Method::is_valid_method(m)) return false;
 481 
 482   // stack frames shouldn't be much larger than max_stack elements
 483 
 484   if (fp() - sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) {
 485     return false;
 486   }
 487 
 488   // validate bci/bcp
 489 
 490   address bcp = interpreter_frame_bcp();
 491   if (m->validate_bci_from_bcp(bcp) < 0) {
 492     return false;
 493   }
 494 
 495   // validate ConstantPoolCache*
 496   ConstantPoolCache* cp = *interpreter_frame_cache_addr();
 497   if (MetaspaceObj::is_valid(cp) == false) return false;
 498 
 499   // validate locals
 500 
 501   address locals =  (address) *interpreter_frame_locals_addr();
 502 
 503   if (locals > thread->stack_base() || locals < (address) fp()) return false;
 504 
 505   // We'd have to be pretty unlucky to be mislead at this point
 506 
 507   return true;
 508 }
 509 
 510 BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
 511   assert(is_interpreted_frame(), "interpreted frame expected");
 512   Method* method = interpreter_frame_method();
 513   BasicType type = method->result_type();
 514 
 515   intptr_t* res_addr;
 516   if (method->is_native()) {
 517     // Prior to calling into the runtime to report the method_exit both of




 477   Method* m = *interpreter_frame_method_addr();
 478 
 479   // validate the method we'd find in this potential sender
 480   if (!Method::is_valid_method(m)) return false;
 481 
 482   // stack frames shouldn't be much larger than max_stack elements
 483 
 484   if (fp() - sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) {
 485     return false;
 486   }
 487 
 488   // validate bci/bcp
 489 
 490   address bcp = interpreter_frame_bcp();
 491   if (m->validate_bci_from_bcp(bcp) < 0) {
 492     return false;
 493   }
 494 
 495   // validate ConstantPoolCache*
 496   ConstantPoolCache* cp = *interpreter_frame_cache_addr();
 497   if (cp == NULL || !cp->is_metaspace_object()) return false;
 498 
 499   // validate locals
 500 
 501   address locals =  (address) *interpreter_frame_locals_addr();
 502 
 503   if (locals > thread->stack_base() || locals < (address) fp()) return false;
 504 
 505   // We'd have to be pretty unlucky to be mislead at this point
 506 
 507   return true;
 508 }
 509 
 510 BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
 511   assert(is_interpreted_frame(), "interpreted frame expected");
 512   Method* method = interpreter_frame_method();
 513   BasicType type = method->result_type();
 514 
 515   intptr_t* res_addr;
 516   if (method->is_native()) {
 517     // Prior to calling into the runtime to report the method_exit both of


< prev index next >