From 48eca4df90525c833dea197f08e4ba1ffd9e2b10 Mon Sep 17 00:00:00 2001 From: kumpera Date: Thu, 4 Feb 2010 22:24:27 +0000 Subject: [PATCH] 2010-02-04 Rodrigo Kumpera * mini.c (mini_method_verify): Report the method which failed to verify. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@150890 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- mono/mini/ChangeLog | 4 ++++ mono/mini/mini.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 60d9c9297..394cd03f6 100755 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,5 +1,9 @@ 2010-02-04 Rodrigo Kumpera + * mini.c (mini_method_verify): Report the method which failed to verify. + +2010-02-04 Rodrigo Kumpera + * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass to avoid JIT'ng dead basic blocks. This is the same behavior as the runtime MS verifier. diff --git a/mono/mini/mini.c b/mono/mini/mini.c index d2b6b458c..159e273fd 100644 --- a/mono/mini/mini.c +++ b/mono/mini/mini.c @@ -1278,15 +1278,19 @@ mini_method_verify (MonoCompile *cfg, MonoMethod *method) for (tmp = res; tmp; tmp = tmp->next) { MonoVerifyInfoExtended *info = (MonoVerifyInfoExtended *)tmp->data; if (info->info.status == MONO_VERIFY_ERROR) { + char *method_name = mono_method_full_name (method, TRUE); cfg->exception_type = info->exception_type; - cfg->exception_message = g_strdup (info->info.message); + cfg->exception_message = g_strdup_printf ("Error verifying %s: %s", method_name, info->info.message); mono_free_verify_list (res); + g_free (method_name); return TRUE; } if (info->info.status == MONO_VERIFY_NOT_VERIFIABLE && (!is_fulltrust || info->exception_type == MONO_EXCEPTION_METHOD_ACCESS || info->exception_type == MONO_EXCEPTION_FIELD_ACCESS)) { + char *method_name = mono_method_full_name (method, TRUE); cfg->exception_type = info->exception_type; - cfg->exception_message = g_strdup (info->info.message); + cfg->exception_message = g_strdup_printf ("Error verifying %s: %s", method_name, info->info.message); mono_free_verify_list (res); + g_free (method_name); return TRUE; } } -- 2.11.4.GIT