< prev index next >

src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp

Print this page
rev 51015 : 8207342: error occurred during error reporting (printing register info)
Summary: os::print_location misses a check if the pointer is readable.
Reviewed-by:


 611   }
 612   st->cr();
 613   st->cr();
 614 
 615   intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc);
 616   st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", p2i(sp));
 617   print_hex_dump(st, (address)sp, (address)(sp + 128), sizeof(intptr_t));
 618   st->cr();
 619 
 620   // Note: it may be unsafe to inspect memory near pc. For example, pc may
 621   // point to garbage if entry point in an nmethod is corrupted. Leave
 622   // this at the end, and hope for the best.
 623   address pc = os::Linux::ucontext_get_pc(uc);
 624   if (Verbose) { st->print_cr("pc at " PTR_FORMAT, p2i(pc)); }
 625   st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc));
 626   print_hex_dump(st, pc-64, pc+64, /*intrsize=*/4);
 627   st->cr();
 628 }
 629 
 630 void os::print_register_info(outputStream *st, const void *context) {
 631   st->print("Not ported\n");












 632 }
 633 
 634 #ifndef PRODUCT
 635 void os::verify_stack_alignment() {
 636 }
 637 #endif
 638 
 639 int os::extra_bang_size_in_bytes() {
 640   // z/Architecture does not require the additional stack bang.
 641   return 0;
 642 }


 611   }
 612   st->cr();
 613   st->cr();
 614 
 615   intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc);
 616   st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", p2i(sp));
 617   print_hex_dump(st, (address)sp, (address)(sp + 128), sizeof(intptr_t));
 618   st->cr();
 619 
 620   // Note: it may be unsafe to inspect memory near pc. For example, pc may
 621   // point to garbage if entry point in an nmethod is corrupted. Leave
 622   // this at the end, and hope for the best.
 623   address pc = os::Linux::ucontext_get_pc(uc);
 624   if (Verbose) { st->print_cr("pc at " PTR_FORMAT, p2i(pc)); }
 625   st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc));
 626   print_hex_dump(st, pc-64, pc+64, /*intrsize=*/4);
 627   st->cr();
 628 }
 629 
 630 void os::print_register_info(outputStream *st, const void *context) {
 631   if (context == NULL) return;
 632 
 633   const ucontext_t *uc = (const ucontext_t*)context;
 634 
 635   st->print_cr("Register to memory mapping:");
 636   st->cr();
 637 
 638   st->print("pc ="); print_location(st, (intptr_t)uc->uc_mcontext.psw.addr);
 639   for (int i = 0; i < 16; i++) {
 640     st->print("r%-2d=", i);
 641     print_location(st, uc->uc_mcontext.gregs[i]);
 642   }
 643   st->cr();
 644 }
 645 
 646 #ifndef PRODUCT
 647 void os::verify_stack_alignment() {
 648 }
 649 #endif
 650 
 651 int os::extra_bang_size_in_bytes() {
 652   // z/Architecture does not require the additional stack bang.
 653   return 0;
 654 }
< prev index next >