[Mono-bugs] [Bug 463022] New: [PPC] [OSX] Prolog code size is insufficient for pinvoke2 .exe

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 30 17:40:04 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=463022


           Summary: [PPC] [OSX] Prolog code size is insufficient for
                    pinvoke2.exe
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: gnorton at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


pinvoke2.exe generates a 280byte prolog, and we currently allocate 276 bytes
for it.  We should make 2 changes to fix this (the second is just a logic
oversight):

diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c
index a9c068e..24fb085 100644
--- a/mono/mini/mini-ppc.c
+++ b/mono/mini/mini-ppc.c
@@ -4362,7 +4362,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                tracing = 1;

        sig = mono_method_signature (method);
-       cfg->code_size = MONO_PPC_32_64_CASE (256, 384) + sig->param_count *
20;
+       cfg->code_size = MONO_PPC_32_64_CASE (260, 384) + sig->param_count *
20;
        code = cfg->native_code = g_malloc (cfg->code_size);

        if (1 || cfg->flags & MONO_CFG_HAS_CALLS) {
@@ -4723,7 +4723,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                code = mono_arch_instrument_prolog (cfg,
mono_trace_enter_method, code, TRUE);

        cfg->code_len = code - cfg->native_code;
-       g_assert (cfg->code_len < cfg->code_size);
+       g_assert (cfg->code_len <= cfg->code_size);
        g_free (cinfo);

        return code;


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list