# HG changeset patch # User shshahma # Date 1461693591 -19800 # Node ID 9f2a972df4da4d114b9d1d5ebcdda571dbee7abb # Parent 3e2abbf1320dd2af0765591a1586f8dcbe3cae34 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 diff -r 3e2abbf1320d -r 9f2a972df4da src/share/vm/classfile/classLoaderData.inline.hpp --- 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());