diff options
author | 2018-05-02 14:58:12 +0100 | |
---|---|---|
committer | 2018-05-10 16:17:30 -0700 | |
commit | d8860b42e47d48fcc47db9d0daf5a1b9432180a1 (patch) | |
tree | c5522fa9c6d1e9e63cb497da7dc84b72b6b11531 /runtime/oat_file_assistant.cc | |
parent | 48af3b39cd7c8abaa7f9671191ec8260630239b2 (diff) |
Do not load app image for class collisions
Even for special shared libraries that are compiled with
'--class-loader-context=&', we must reject the app image
if there are duplicate classes.
In the case where "&" is not specified, avoid the collision check.
This is safe since the class loader context check was actually run.
Test: 172-app-image-twice
Bug: 77342775
Bug: 79200502
Change-Id: Idc2d59166680948d4d34d0f224491f77ecad2974
Diffstat (limited to 'runtime/oat_file_assistant.cc')
-rw-r--r-- | runtime/oat_file_assistant.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc index 9c8b6512a7..241102ea83 100644 --- a/runtime/oat_file_assistant.cc +++ b/runtime/oat_file_assistant.cc @@ -1217,7 +1217,9 @@ bool OatFileAssistant::OatFileInfo::ClassLoaderContextIsOkay(ClassLoaderContext* return false; } - bool result = context->VerifyClassLoaderContextMatch(file->GetClassLoaderContext()); + + bool result = context->VerifyClassLoaderContextMatch(file->GetClassLoaderContext()) == + ClassLoaderContext::VerificationResult::kVerifies; if (!result) { VLOG(oat) << "ClassLoaderContext check failed. Context was " << file->GetClassLoaderContext() |