svn path=/trunk/mono/; revision=53658
[mono.git] / mono / mini / jit-icalls.c
index 8acce64f28d169eca1d3ff07a3cb24b54ec77a01..8f0c7aa0efead853447ecfe1df8c923e0bfd7fde 100644 (file)
@@ -19,7 +19,7 @@ mono_ldftn (MonoMethod *method)
 
        addr = mono_create_jump_trampoline (mono_domain_get (), method, TRUE);
 
-       return addr;
+       return mono_create_ftnptr (mono_domain_get (), addr);
 }
 
 /*
@@ -35,7 +35,7 @@ mono_ldftn_nosync (MonoMethod *method)
 
        addr = mono_create_jump_trampoline (mono_domain_get (), method, FALSE);
 
-       return addr;
+       return mono_create_ftnptr (mono_domain_get (), addr);
 }
 
 static void*
@@ -498,7 +498,12 @@ mono_array_new_va (MonoMethod *cm, ...)
 
        if (rank == pcount) {
                /* Only lengths provided. */
-               lower_bounds = NULL;
+               if (cm->klass->byval_arg.type == MONO_TYPE_ARRAY) {
+                       lower_bounds = alloca (sizeof (guint32) * rank);
+                       memset (lower_bounds, 0, sizeof (guint32) * rank);
+               } else {
+                       lower_bounds = NULL;
+               }
        } else {
                g_assert (pcount == (rank * 2));
                /* lower bounds are first. */