From 31883646547a036f58b9fa0894eb0fac0bcf05a1 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Mon, 6 Jun 2016 15:02:44 -0700 Subject: Do not hide instance field hard failure with soft failure Rationale: Yet another verifier inaccuracy found with fuzz testing. Instance field verification should proceed testing instance field access after soft failures in cases where hard failures could still follow. Failure to do so resulted in a compiler crash (now made bit friendly with DCHECK as well). With crash-before/pass-after test. BUG=29126870 Change-Id: I8674d6171158eaa2aeb0492b35dfafea76416cac --- compiler/optimizing/instruction_builder.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing') diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 5e691c7f5f..135038b753 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -381,10 +381,11 @@ HInstruction* HInstructionBuilder::LoadLocal(uint32_t reg_number, Primitive::Typ // If the operation requests a specific type, we make sure its input is of that type. if (type != value->GetType()) { if (Primitive::IsFloatingPointType(type)) { - return ssa_builder_->GetFloatOrDoubleEquivalent(value, type); + value = ssa_builder_->GetFloatOrDoubleEquivalent(value, type); } else if (type == Primitive::kPrimNot) { - return ssa_builder_->GetReferenceTypeEquivalent(value); + value = ssa_builder_->GetReferenceTypeEquivalent(value); } + DCHECK(value != nullptr); } return value; -- cgit v1.2.3-59-g8ed1b