[coop] Assert that trampolines are called from GC unsafe code
[mono.git] / mono / mini / mini-exceptions.c
index 8251f4ef15d8c78808e2992039e605d2545dbdcb..779f02c6dd861579af35dea039746b0762da4e6e 100644 (file)
@@ -2146,6 +2146,8 @@ restore_stack_protection (void)
 gpointer
 mono_altstack_restore_prot (mgreg_t *regs, guint8 *code, gpointer *tramp_data, guint8* tramp)
 {
+       MONO_REQ_GC_UNSAFE_MODE;
+
        void (*func)(void) = (void (*)(void))tramp_data;
        func ();
        return NULL;