Revert "ART: Remove workaround in verifer after Jack update."
This reverts commit 1aab04df52529d3cabe28fd9f0cb008bf8180a56.
Change-Id: Ifecad6a16f2c6dfeea99adcdca7da05fb71592a8
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index c40609e..ebecc85 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -3936,10 +3936,13 @@
/* caught by static verifier */
DCHECK(is_range || expected_args <= 5);
- if (expected_args > code_item_->outs_size_) {
- Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "invalid argument count (" << expected_args
- << ") exceeds outsSize (" << code_item_->outs_size_ << ")";
- return nullptr;
+ // TODO(oth): Enable this path for invoke-polymorphic when b/33099829 is resolved.
+ if (method_type != METHOD_POLYMORPHIC) {
+ if (expected_args > code_item_->outs_size_) {
+ Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "invalid argument count (" << expected_args
+ << ") exceeds outsSize (" << code_item_->outs_size_ << ")";
+ return nullptr;
+ }
}
/*