From f0d66d1fd3fad3baea893423f63c739682955834 Mon Sep 17 00:00:00 2001 From: Damon Fenacci Date: Fri, 6 Oct 2023 08:57:08 +0000 Subject: [PATCH] 8317502: Add asserts to check for non-null in ciInstance::java_lang_Class_klass Reviewed-by: kvn, thartmann --- src/hotspot/share/ci/ciInstance.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hotspot/share/ci/ciInstance.cpp b/src/hotspot/share/ci/ciInstance.cpp index 7d183c1e918..6ede59dd723 100644 --- a/src/hotspot/share/ci/ciInstance.cpp +++ b/src/hotspot/share/ci/ciInstance.cpp @@ -136,5 +136,6 @@ void ciInstance::print_impl(outputStream* st) { ciKlass* ciInstance::java_lang_Class_klass() { VM_ENTRY_MARK; + assert(java_lang_Class::as_Klass(get_oop()) != nullptr, "klass is null"); return CURRENT_ENV->get_metadata(java_lang_Class::as_Klass(get_oop()))->as_klass(); }