Imported Upstream version 5.12.0.220

Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-04-24 09:31:23 +00:00
parent 8bd104cef2
commit 8fc30896db
1200 changed files with 29534 additions and 26161 deletions

View File

@@ -364,12 +364,12 @@ dump_verify_info (MonoImage *image, int flags, gboolean valid_only)
for (i = 0; i < m->rows; ++i) {
MonoMethod *method;
MonoError error;
ERROR_DECL (error);
method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i+1), NULL, NULL, &error);
method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i+1), NULL, NULL, error);
if (!method) {
g_print ("Warning: Cannot lookup method with token 0x%08x due to %s\n", i + 1, mono_error_get_message (&error));
mono_error_cleanup (&error);
g_print ("Warning: Cannot lookup method with token 0x%08x due to %s\n", i + 1, mono_error_get_message (error));
mono_error_cleanup (error);
continue;
}
errors = mono_method_verify (method, flags);
@@ -515,31 +515,29 @@ verify_image_file (const char *fname)
table = &image->tables [MONO_TABLE_TYPEDEF];
for (i = 1; i <= table->rows; ++i) {
MonoError error;
ERROR_DECL (error);
guint32 token = i | MONO_TOKEN_TYPE_DEF;
MonoClass *klass = mono_class_get_checked (image, token, &error);
MonoClass *klass = mono_class_get_checked (image, token, error);
if (!klass) {
printf ("Could not load class with token %x due to %s\n", token, mono_error_get_message (&error));
mono_error_cleanup (&error);
printf ("Could not load class with token %x due to %s\n", token, mono_error_get_message (error));
mono_error_cleanup (error);
continue;
}
mono_class_init (klass);
if (mono_class_has_failure (klass)) {
MonoError type_load_error;
error_init (&type_load_error);
mono_error_set_for_class_failure (&type_load_error, klass);
printf ("Could not initialize class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (&type_load_error));
mono_error_cleanup (&type_load_error);
ERROR_DECL (type_load_error);
mono_error_set_for_class_failure (type_load_error, klass);
printf ("Could not initialize class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (type_load_error));
mono_error_cleanup (type_load_error);
++count;
}
mono_class_setup_vtable (klass);
if (mono_class_has_failure (klass)) {
MonoError type_load_error;
error_init (&type_load_error);
mono_error_set_for_class_failure (&type_load_error, klass);
printf ("Could not initialize vtable of class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (&type_load_error));
mono_error_cleanup (&type_load_error);
ERROR_DECL (type_load_error);
mono_error_set_for_class_failure (type_load_error, klass);
printf ("Could not initialize vtable of class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (type_load_error));
mono_error_cleanup (type_load_error);
++count;
}
}