diff options
| -rw-r--r-- | compiler/image_writer.cc | 2 | ||||
| -rw-r--r-- | runtime/class_linker.cc | 7 | ||||
| -rw-r--r-- | runtime/jit/jit.cc | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index d63fed5257..73574ba673 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -859,7 +859,7 @@ class NonImageClassesVisitor : public ClassVisitor { return true; } - mutable std::unordered_set<mirror::Class*> classes_to_prune_; + std::unordered_set<mirror::Class*> classes_to_prune_; ImageWriter* const image_writer_; }; diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 777786cad3..c80f91a7b8 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -1290,8 +1290,11 @@ bool ClassLinker::UpdateAppImageClassLoadersAndDexCaches( // the app image. klass->SetClassLoader(class_loader.Get()); // The resolved type could be from another dex cache, go through the dex cache just in - // case. - klass->SetDexCacheStrings(klass->GetDexCache()->GetStrings()); + // case. May be null for array classes. + if (klass->GetDexCacheStrings() != nullptr) { + DCHECK(!klass->IsArrayClass()); + klass->SetDexCacheStrings(klass->GetDexCache()->GetStrings()); + } // If there are multiple dex caches, there may be the same class multiple times // in different dex caches. Check for this since inserting will add duplicates // otherwise. diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc index b7111815e4..fa5c41d7ae 100644 --- a/runtime/jit/jit.cc +++ b/runtime/jit/jit.cc @@ -243,7 +243,7 @@ void Jit::DumpTypeInfoForLoadedTypes(ClassLinker* linker) { classes_.push_back(klass); return true; } - mutable std::vector<mirror::Class*> classes_; + std::vector<mirror::Class*> classes_; }; if (generate_debug_info_) { |