changeset 24017:9f2a972df4da

8147026: Convert an assert in ClassLoaderData to a guarantee Summary: Guarantee is to ensure classloader is a valid oop will help catch the errors at an early stage rather than crashing the JVM later on in the GC Reviewed-by: coleenp
author shshahma
date Tue, 26 Apr 2016 23:29:51 +0530
parents 3e2abbf1320d
children 001e0c530e2c
files src/share/vm/classfile/classLoaderData.inline.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoaderData.inline.hpp	Mon Jun 20 08:04:04 2016 +0200
+++ b/src/share/vm/classfile/classLoaderData.inline.hpp	Tue Apr 26 23:29:51 2016 +0530
@@ -40,7 +40,7 @@
 
 
 inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader, TRAPS) {
-  assert(loader() != NULL,"Must be a class loader");
+  guarantee(loader() != NULL && loader()->is_oop(), "Loader must be oop");
   // Gets the class loader data out of the java/lang/ClassLoader object, if non-null
   // it's already in the loader_data, so no need to add
   ClassLoaderData* loader_data= java_lang_ClassLoader::loader_data(loader());