Fix bug in verifier: hard fail allowed following softfail
Rationale:
Dexfuzzing found a situation where a hard fail (not calling
super in constructor) did not immediately bail, allowing
a soft fail to follow, causing a FATAL message later on.
With crash-before/pass after test.
BUG=29070461
Change-Id: I46bd7a7457b9d408b254400aadac122539f2279c
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index b2be770..8ad79fb 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -4928,6 +4928,9 @@
// Initialize them as conflicts so they don't add to GC and deoptimization information.
const Instruction* ret_inst = Instruction::At(code_item_->insns_ + next_insn);
AdjustReturnLine(this, ret_inst, target_line);
+ if (have_pending_hard_failure_) {
+ return false;
+ }
}
} else {
RegisterLineArenaUniquePtr copy;