8191852: Null pointer dereference in ciKlass::get_Klass of ciKlass.hpp:58
Reviewed-by: kvn
--- 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();