Fix infinite recursion in the CompareExchange aot code.
authorZoltan Varga <vargaz@gmail.com>
Thu, 18 Nov 2010 17:58:37 +0000 (18:58 +0100)
committerZoltan Varga <vargaz@gmail.com>
Thu, 18 Nov 2010 17:59:08 +0000 (18:59 +0100)
mono/mini/aot-runtime.c

index 7515c6ac0f3b258044ea9f5689bf3b3a25145023..119aeab8274587548bd04288b0b7442534765c95 100644 (file)
@@ -2865,6 +2865,10 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
 
                        m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method (m, &ctx), TRUE, TRUE);
 
+                       /* Avoid recursion */
+                       if (method == m)
+                               return NULL;
+
                        /* 
                         * Get the code for the <object> instantiation which should be emitted into
                         * the mscorlib aot image by the AOT compiler.