< prev index next >

src/hotspot/share/code/codeHeapState.cpp

Print this page
rev 51532 : 8209950: SIGBUS in CodeHeapState::print_names()
Reviewed-by:

*** 2166,2178 **** ast->print("(+" PTR32_FORMAT ")", (unsigned int)((char*)this_blob-low_bound)); ast->fill_to(33); // this_blob->as_nmethod_or_null() is safe. Inlined, maybe invisible on stack. nmethod* nm = this_blob->as_nmethod_or_null(); ! Method* method = (nm == NULL) ? NULL : nm->method(); // may be uninitialized, i.e. != NULL, but invalid ! if ((nm != NULL) && (method != NULL) && (cbType != nMethod_dead) && (cbType != nMethod_inconstruction) && ! os::is_readable_pointer(method) && os::is_readable_pointer(method->constants())) { ResourceMark rm; //---< collect all data to locals as quickly as possible >--- unsigned int total_size = nm->total_size(); int hotness = nm->hotness_counter(); bool get_name = (cbType == nMethod_inuse) || (cbType == nMethod_notused); --- 2166,2178 ---- ast->print("(+" PTR32_FORMAT ")", (unsigned int)((char*)this_blob-low_bound)); ast->fill_to(33); // this_blob->as_nmethod_or_null() is safe. Inlined, maybe invisible on stack. nmethod* nm = this_blob->as_nmethod_or_null(); ! Method* method = (nm == NULL) ? NULL : nm->method(); // nm->method() may be uninitialized, i.e. != NULL, but invalid ! if ((nm != NULL) && (method != NULL) && (method->signature() != NULL) && (cbType != nMethod_dead) && (cbType != nMethod_inconstruction) && ! os::is_readable_pointer(method) && os::is_readable_pointer(method->constants()) && os::is_readable_pointer(method->signature())) { ResourceMark rm; //---< collect all data to locals as quickly as possible >--- unsigned int total_size = nm->total_size(); int hotness = nm->hotness_counter(); bool get_name = (cbType == nMethod_inuse) || (cbType == nMethod_notused);
< prev index next >