In the current mono svn trunk r124301 the generics-sharing tests are
failing:

351 test(s) passed. 4 test(s) did not pass.

Failed tests:

generics-sharing.2.exe
shared-generic-synchronized.2.exe
generic-array-iface-set.2.exe
generic-stack-traces2.2.exe

This is due to a g_assert in mini-ppc.c (mono_arch_context_get_int_reg):

        g_assert (reg >= ppc_r13);

Which does not account for accessing the stack pointer (ppc_r1). The
attached patch resolves this:

This patch is contributed under the terms of the MIT/X11 license


2009-01-21  Steven Munroe  <munro...@us.ibm.com>

This patch is contributed under the terms of the MIT/X11 license

        * mini-ppc.c (mono_arch_context_get_int_reg): Handle ppc_r1 in
        addition to ppc_r13-ppc_r31.

diff -urN mono-svn/mono/mono/mini/mini-ppc.c 
mono-svn64/mono/mono/mini/mini-ppc.c
--- mono-svn/mono/mono/mini/mini-ppc.c  2009-01-21 14:27:11.000000000 -0600
+++ mono-svn64/mono/mono/mini/mini-ppc.c        2009-01-22 17:29:42.000000000 
-0600
@@ -5660,7 +5660,11 @@
 gpointer
 mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
 {
-       g_assert (reg >= ppc_r13);
-
-       return (gpointer)ctx->regs [reg - ppc_r13];
+       if (reg = ppc_r1) {
+               return (gpointer)ctx->sc_sp;
+       } else {
+               g_assert (reg >= ppc_r13);
+               
+               return (gpointer)ctx->regs [reg - ppc_r13];
+       }
 }
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to