diff options
author | Andreas Gampe <agampe@google.com> | 2014-09-12 00:49:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-12 00:49:46 +0000 |
commit | 3fec7718041302f769995eedda9beef362131842 (patch) | |
tree | 40e13d2b70928d2d885fdf2f9d501c2d067bf3c9 | |
parent | 59dae45a3d1ef83771fb78421fcf8fda838b4d16 (diff) | |
parent | bb0c7f6a247521bc3e85f08f93603122bccb1a72 (diff) | |
download | art-3fec7718041302f769995eedda9beef362131842.zip art-3fec7718041302f769995eedda9beef362131842.tar.gz art-3fec7718041302f769995eedda9beef362131842.tar.bz2 |
Merge "ART: Fix preverified setting in VerifyClass"
-rw-r--r-- | runtime/class_linker.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 42e0899..f94535c 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -3530,11 +3530,13 @@ void ClassLinker::VerifyClass(ConstHandle<mirror::Class> klass) { ObjectLock<mirror::Class> lock(self, klass); // Don't attempt to re-verify if already sufficiently verified. - if (klass->IsVerified() || - (klass->IsCompileTimeVerified() && Runtime::Current()->IsCompiler())) { + if (klass->IsVerified()) { EnsurePreverifiedMethods(klass); return; } + if (klass->IsCompileTimeVerified() && Runtime::Current()->IsCompiler()) { + return; + } // The class might already be erroneous, for example at compile time if we attempted to verify // this class as a parent to another. @@ -3641,6 +3643,9 @@ void ClassLinker::VerifyClass(ConstHandle<mirror::Class> klass) { klass->SetStatus(mirror::Class::kStatusRetryVerificationAtRuntime, self); } else { klass->SetStatus(mirror::Class::kStatusVerified, self); + // As this is a fake verified status, make sure the methods are _not_ marked preverified + // later. + klass->SetAccessFlags(klass->GetAccessFlags() | kAccPreverified); } } } else { |