OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22e59fd
)
ART: Reject array-length on non-reference register
author
Andreas Gampe
<agampe@google.com>
Mon, 28 Jul 2014 20:14:34 +0000
(13:14 -0700)
committer
Andreas Gampe
<agampe@google.com>
Mon, 28 Jul 2014 20:30:57 +0000
(13:30 -0700)
It should be a hard verifier failure if we detect an array-length
instruction over a non-reference-type register.
Bug:
16595896
(cherry picked from commit
65c9db8dfbeea3f708f95f058f4fed7c2af71052
)
Change-Id: I56babcbe95d50fd66a132cf4434cf5fa780beb4e
runtime/verifier/method_verifier.cc
patch
|
blob
|
history
diff --git
a/runtime/verifier/method_verifier.cc
b/runtime/verifier/method_verifier.cc
index
afcc7c4
..
3214592
100644
(file)
--- a/
runtime/verifier/method_verifier.cc
+++ b/
runtime/verifier/method_verifier.cc
@@
-1774,6
+1774,8
@@
bool MethodVerifier::CodeFlowVerifyInstruction(uint32_t* start_guess) {
} else {
work_line_->SetRegisterType(inst->VRegA_12x(), reg_types_.Integer());
}
+ } else {
+ Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "array-length on non-array " << res_type;
}
break;
}