From 5440d5718b3c081b7b8e13c01ed0aeefd0fb2ea1 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Wed, 18 Oct 2017 09:27:40 -0400 Subject: [PATCH] [runtime] Avoid an assertion in mono_profiler_get_coverage_data () if the method doesn't have a body. (#5777) --- mono/metadata/profiler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mono/metadata/profiler.c b/mono/metadata/profiler.c index 5165533a309..f29024ff50b 100644 --- a/mono/metadata/profiler.c +++ b/mono/metadata/profiler.c @@ -203,6 +203,9 @@ mono_profiler_get_coverage_data (MonoProfilerHandle handle, MonoMethod *method, if (!mono_profiler_state.code_coverage) return FALSE; + if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) || (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) || (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) || (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)) + return FALSE; + coverage_lock (); MonoProfilerCoverageInfo *info = g_hash_table_lookup (mono_profiler_state.coverage_hash, method); -- 2.11.4.GIT