From 46666c576e612012d1d4f03365ae0c8f54fc4ba6 Mon Sep 17 00:00:00 2001 From: dbuck Date: Tue, 28 Apr 2015 00:37:33 -0700 Subject: [PATCH] 8072863: Replace fatal() with vm_exit_during_initialization() when an incorrect class is found on the bootclasspath Reviewed-by: dholmes, coleenp Contributed-by: Cheleswer Sahu --- src/share/vm/classfile/javaClasses.cpp | 4 ++-- src/share/vm/prims/whitebox.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/javaClasses.cpp index 8106fcaa8..e94d32c64 100644 --- a/src/share/vm/classfile/javaClasses.cpp +++ b/src/share/vm/classfile/javaClasses.cpp @@ -124,7 +124,7 @@ compute_offset(int &dest_offset, tty->print_cr(" name: %s, sig: %s, flags: %08x", fs.name()->as_C_string(), fs.signature()->as_C_string(), fs.access_flags().as_int()); } #endif //PRODUCT - fatal("Invalid layout of preloaded class"); + vm_exit_during_initialization("Invalid layout of preloaded class: use -XX:+TraceClassLoading to see the origin of the problem class"); } dest_offset = fd.offset(); } @@ -3601,7 +3601,7 @@ int InjectedField::compute_offset() { tty->print_cr(" name: %s, sig: %s, flags: %08x", fs.name()->as_C_string(), fs.signature()->as_C_string(), fs.access_flags().as_int()); } #endif //PRODUCT - fatal("Invalid layout of preloaded class"); + vm_exit_during_initialization("Invalid layout of preloaded class: use -XX:+TraceClassLoading to see the origin of the problem class"); return -1; } diff --git a/src/share/vm/prims/whitebox.cpp b/src/share/vm/prims/whitebox.cpp index 0175ae5d5..da0a753c9 100644 --- a/src/share/vm/prims/whitebox.cpp +++ b/src/share/vm/prims/whitebox.cpp @@ -913,7 +913,7 @@ int WhiteBox::offset_for_field(const char* field_name, oop object, if (res == NULL) { tty->print_cr("Invalid layout of %s at %s", ik->external_name(), name_symbol->as_C_string()); - fatal("Invalid layout of preloaded class"); + vm_exit_during_initialization("Invalid layout of preloaded class: use -XX:+TraceClassLoading to see the origin of the problem class"); } //fetch the field at the offset we've found -- GitLab