Do not call IsMarked on null.
The concurrent collector checks it.
Test: ART_TEST_JIT=true test-art-host-run-test-jit
Change-Id: I02c2462ce1d8f3092f0b2f52f8b6dede8ff4a339
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 1c47e7e..2ae989a 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -342,7 +342,7 @@
// This does not need a read barrier because this is called by GC.
mirror::Object* class_loader =
cls->GetClassLoader<kDefaultVerifyFlags, kWithoutReadBarrier>();
- if (visitor->IsMarked(class_loader) != nullptr) {
+ if (class_loader == nullptr || visitor->IsMarked(class_loader) != nullptr) {
// The class loader is live, update the entry if the class has moved.
mirror::Class* new_cls = down_cast<mirror::Class*>(visitor->IsMarked(cls));
// Note that new_object can be null for CMS and newly allocated objects.