2008-08-20 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Wed, 20 Aug 2008 00:42:32 +0000 (00:42 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 20 Aug 2008 00:42:32 +0000 (00:42 -0000)
* mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
one from the caller.

svn path=/trunk/mono/; revision=111050

mono/mini/ChangeLog
mono/mini/mini-amd64.c

index 799a6745f7fa405c799cf8816eac39785505491d..22bb854a4862632c11ba0406195679389b8d0a3a 100644 (file)
@@ -1,5 +1,8 @@
 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
 
+       * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
+       one from the caller.
+
        * aot-runtime.c (decode_generic_inst): New function to decode and
        return a interned generic inst.
        (decode_klass_ref): Use it.
index da60a9f58fada0bafa7919e7f27551f38845f8fd..f53c28e2a9d3e5e363e047879363e458941614cc 100644 (file)
@@ -405,6 +405,15 @@ add_valuetype (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, ArgIn
        ArgumentClass args [2];
        MonoMarshalType *info;
        MonoClass *klass;
+       MonoGenericSharingContext tmp_gsctx;
+
+       /* 
+        * The gsctx currently contains no data, it is only used for checking whenever
+        * open types are allowed, some callers like mono_arch_get_argument_info ()
+        * don't pass it to us, so work around that.
+        */
+       if (!gsctx)
+               gsctx = &tmp_gsctx;
 
        klass = mono_class_from_mono_type (type);
        if (sig->pinvoke)