From 7498105ec7497bae2ba9f1a697da9efa0c979654 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 16 Jan 2017 17:54:09 +0000 Subject: 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 --- compiler/driver/compiler_driver.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 2e3b7c8eb5..6bfdd4da9c 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -433,12 +433,18 @@ class CompilerDriver { 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& dex_files, + TimingLogger* timings) + NO_THREAD_SAFETY_ANALYSIS; + void Verify(jobject class_loader, const std::vector& dex_files, - TimingLogger* timings) - NO_THREAD_SAFETY_ANALYSIS; + TimingLogger* timings); void VerifyDexFile(jobject class_loader, const DexFile& dex_file, -- cgit v1.2.3-59-g8ed1b