diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-19 10:35:42 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-22 11:49:27 +0100 |
commit | 39d40afb789c9ae80b1105168241dcdc92491b5d (patch) | |
tree | 2cb1fb422f4f0aee449bc93bf6cada97537ceb1d /runtime | |
parent | a04e7b7ceae01a7ceda41419e4c639a43e18361e (diff) | |
download | art-39d40afb789c9ae80b1105168241dcdc92491b5d.zip art-39d40afb789c9ae80b1105168241dcdc92491b5d.tar.gz art-39d40afb789c9ae80b1105168241dcdc92491b5d.tar.bz2 |
Verifier: check an aput, even if we know it will fail.
bug:21867457
(cherry picked from commit 66389fbeb41c981648bb2e1e7e2f43089f095591)
Change-Id: Id01edeb871f6bc59518eb341e5b76f021cfdfe06
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/verifier/method_verifier.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index b1f958d..bd78006 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -3789,8 +3789,9 @@ void MethodVerifier::VerifyAPut(const Instruction* inst, } else { const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); if (array_type.IsZero()) { - // Null array type; this code path will fail at runtime. Infer a merge-able type from the - // instruction type. + // Null array type; this code path will fail at runtime. + // Still check that the given value matches the instruction's type. + work_line_->VerifyRegisterType(this, inst->VRegA_23x(), insn_type); } else if (!array_type.IsArrayTypes()) { Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "not array type " << array_type << " with aput"; } else { |