[runtime] Avoid rethrowing ThreadAbortException's from cctors down the stack from...
authorZoltan Varga <vargaz@gmail.com>
Fri, 2 Dec 2016 00:07:45 +0000 (19:07 -0500)
committerGitHub <noreply@github.com>
Fri, 2 Dec 2016 00:07:45 +0000 (19:07 -0500)
mono/metadata/object.c

index 3147588dcd53f1cba61b536d742c247f16235789..9289b790308eb7580347177a35246b726ee94ef4 100644 (file)
@@ -483,7 +483,7 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
                if (exc && mono_object_class (exc) == mono_defaults.threadabortexception_class)
                        pending_tae = exc;
                //TAEs are blocked around .cctors, they must escape as soon as no cctor is left to run.
-               if (!pending_tae)
+               if (!pending_tae && mono_get_eh_callbacks ()->mono_above_abort_threshold ())
                        pending_tae = mono_thread_try_resume_interruption ();
        } else {
                /* this just blocks until the initializing thread is done */