Fix pointer conversion error in SetElementPtrSize
SetElementPtrSize used to cast from pointer to uint64_t which
could sign extend with 32 bit dex2oat for 64 bit app image.
Also removed C style casts and added more logging.
Bug: 22858531
(cherry picked from commit d22886357d4c53f74ca298faa7ad2555794e17e0)
Change-Id: I479124328fbc497cfcae20c43b4b55827e446527
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index bb709e8..44cc9b7 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1533,6 +1533,14 @@
}
}
if (!equal) {
+ VLOG(image) << "Image dex files " << image_dex_file_names.size();
+ for (mirror::String* name : image_dex_file_names) {
+ VLOG(image) << name->ToModifiedUtf8();
+ }
+ VLOG(image) << "Loader dex files " << loader_dex_file_names.size();
+ for (mirror::String* name : loader_dex_file_names) {
+ VLOG(image) << name->ToModifiedUtf8();
+ }
*error_msg = "Rejecting application image due to class loader mismatch";
return false;
}