8191852: Null pointer dereference in ciKlass::get_Klass of ciKlass.hpp:58

Reviewed-by: kvn
This commit is contained in:
Dean Long 2017-12-22 22:01:53 -08:00
parent 384238b493
commit c336bb1f8b

View File

@ -234,7 +234,9 @@ void ciField::initialize_from(fieldDescriptor* fd) {
// 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();