The verifier will now reject any iget/iput insts
that do not have a reference object in vB.
Bug:
17207857
Signed-off-by: Stuart Monteith <stuart.monteith@arm.com>
(cherry picked from commit
695c5982eeddee18c643cc2f94c9d78fa75599ab)
Change-Id: I3790b8687673643bb142549d74f36a3e2978bf13
} else if (obj_type.IsZero()) {
// Cannot infer and check type, however, access will cause null pointer exception
return field;
+ } else if (!obj_type.IsReferenceTypes()) {
+ // Trying to read a field from something that isn't a reference
+ Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "instance field access on object that has "
+ << "non-reference type " << obj_type;
+ return NULL;
} else {
mirror::Class* klass = field->GetDeclaringClass();
RegType& field_klass =