mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-26 02:00:12 +00:00
8371216: oopDesc::print_value_on breaks if klass is garbage
Reviewed-by: coleenp, mdoerr
This commit is contained in:
parent
2c378e26d7
commit
f48ad21ecc
@ -83,7 +83,10 @@ char* oopDesc::print_value_string() {
|
||||
|
||||
void oopDesc::print_value_on(outputStream* st) const {
|
||||
oop obj = const_cast<oopDesc*>(this);
|
||||
if (java_lang_String::is_instance(obj)) {
|
||||
// We can't use java_lang_String::is_instance since that has klass assertions enabled.
|
||||
// If the klass is garbage we want to just fail the check and continue printing, as
|
||||
// opposed to aborting the VM entirely.
|
||||
if (obj != nullptr && obj->klass_without_asserts() == vmClasses::String_klass()) {
|
||||
java_lang_String::print(obj, st);
|
||||
print_address_on(st);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user