From 3d3c6a7e75225c4491ec69daf4f65c8995d8cb29 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Sun, 18 Aug 2019 03:18:24 -0400 Subject: [PATCH] [jit] Don't mark ThrowForUnsupportedVectorBaseType as do-not-return. Assert that do-not-return methods actually don't return. Commit migrated from https://github.com/mono/mono/commit/121d9ca4a9012b3669e7f62b30b78e37e728d017 --- src/mono/mono/mini/method-to-ir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c index ffc2a66..c66e36e 100644 --- a/src/mono/mono/mini/method-to-ir.c +++ b/src/mono/mono/mini/method-to-ir.c @@ -3765,7 +3765,8 @@ method_does_not_return (MonoMethod *method) // FIXME: Under netcore, these are decorated with the [DoesNotReturn] attribute return m_class_get_image (method->klass) == mono_defaults.corlib && !strcmp (m_class_get_name (method->klass), "ThrowHelper") && - strstr (method->name, "Throw") == method->name; + strstr (method->name, "Throw") == method->name && + !method->is_inflated; } static int inline_limit, llvm_jit_inline_limit; @@ -7878,6 +7879,8 @@ calli_end: case MONO_CEE_RET: mini_profiler_emit_leave (cfg, sig->ret->type != MONO_TYPE_VOID ? sp [-1] : NULL); + g_assert (!method_does_not_return (method)); + if (cfg->method != method) { /* return from inlined method */ /* -- 2.7.4