changeset 48688:044979e94c4e

8191852: Null pointer dereference in ciKlass::get_Klass of ciKlass.hpp:58 Reviewed-by: kvn
author dlong
date Fri, 22 Dec 2017 22:01:53 -0800
parents 08144d9cbdaa
children 2207e2917a68
files src/hotspot/share/ci/ciField.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/ci/ciField.cpp	Fri Dec 22 18:49:41 2017 +0000
+++ b/src/hotspot/share/ci/ciField.cpp	Fri Dec 22 22:01:53 2017 -0800
@@ -234,7 +234,9 @@
   // Get the flags, offset, and canonical holder of the field.
   _flags = ciFlags(fd->access_flags());
   _offset = fd->offset();
-  _holder = CURRENT_ENV->get_instance_klass(fd->field_holder());
+  Klass* field_holder = fd->field_holder();
+  assert(field_holder != NULL, "null field_holder");
+  _holder = CURRENT_ENV->get_instance_klass(field_holder);
 
   // Check to see if the field is constant.
   Klass* k = _holder->get_Klass();