Fix ClassLinker::InitializeStaticStorageFromCode
Previously the code computed the storage and returned the pointer to
it, but it forgot to set the value into the table for future
callers. Added a test to confirm the correct behavior.
Change-Id: I48717a3d4926f5ddc0ad09d065f75d031eb5b8fb
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 9a6470b..8ddcc5f 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1394,6 +1394,7 @@
CHECK(Thread::Current()->IsExceptionPending());
UNIMPLEMENTED(FATAL) << "throw exception due to class initializtion problem";
}
+ referrer->GetDexCacheInitializedStaticStorage()->Set(type_idx, klass);
return klass;
}