Handle verify-profile and bootclasspath classes in vdex.
Two problems:
1) An apk might define a class twice, or define a class that
is already in the bootclasspath, or define a class that
in the future happens to be in the bootclasspath.
2) verify-profile does not make classes that were not verified
as verify-at-runtime for vdex.
Fixes:
1) Check that the resolved class is part of the dex file that
we are currently looking into. If not, don't update its
verification status.
2) Make unverified classes as such when they are not in the profile.
bug:34108532
Test: 634-vdex-duplicate
Change-Id: I77c5e417c16c91af257b88b6456d07c0e4c2ca93
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 2e3b7c8..6bfdd4d 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -433,12 +433,18 @@
TimingLogger* timings)
REQUIRES(!Locks::mutator_lock_);
+ // Do fast verification through VerifierDeps if possible. Return whether
+ // verification was successful.
// NO_THREAD_SAFETY_ANALYSIS as the method accesses a guarded value in a
// single-threaded way.
+ bool FastVerify(jobject class_loader,
+ const std::vector<const DexFile*>& dex_files,
+ TimingLogger* timings)
+ NO_THREAD_SAFETY_ANALYSIS;
+
void Verify(jobject class_loader,
const std::vector<const DexFile*>& dex_files,
- TimingLogger* timings)
- NO_THREAD_SAFETY_ANALYSIS;
+ TimingLogger* timings);
void VerifyDexFile(jobject class_loader,
const DexFile& dex_file,