Change monitor checks to warnings in verifier.
Allows Whatsapp to install properly.
Bug: 11335470
Bug: 11476436
Public bug: https://code.google.com/p/android/issues/detail?id=61792
Change-Id: I2d9b9deaa0126d3dbd6bbfb2babfc15acceed01b
(cherry picked from commit 2bd5c233bb95877eab87c897bf802ae67a35178b)
diff --git a/runtime/verifier/register_line.cc b/runtime/verifier/register_line.cc
index 1a41657..31b0113 100644
--- a/runtime/verifier/register_line.cc
+++ b/runtime/verifier/register_line.cc
@@ -467,8 +467,8 @@
}
}
if (monitors_.size() != incoming_line->monitors_.size()) {
- verifier_->Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "mismatched stack depths (depth="
- << MonitorStackDepth() << ", incoming depth=" << incoming_line->MonitorStackDepth() << ")";
+ LOG(WARNING) << "mismatched stack depths (depth=" << MonitorStackDepth()
+ << ", incoming depth=" << incoming_line->MonitorStackDepth() << ")";
} else if (reg_to_lock_depths_ != incoming_line->reg_to_lock_depths_) {
for (uint32_t idx = 0; idx < num_regs_; idx++) {
size_t depths = reg_to_lock_depths_.count(idx);
@@ -477,8 +477,8 @@
if (depths == 0 || incoming_depths == 0) {
reg_to_lock_depths_.erase(idx);
} else {
- verifier_->Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "mismatched stack depths for register v" << idx
- << ": " << depths << " != " << incoming_depths;
+ LOG(WARNING) << "mismatched stack depths for register v" << idx
+ << ": " << depths << " != " << incoming_depths;
break;
}
}