[Mono-list] Assertion failed in Mono JIT 2.4.2.3 (tarball Mon Aug 31 09:54:11 MDT 2009)

Rodrigo Kumpera kumpera at gmail.com
Sat Sep 19 09:13:16 EDT 2009


The following patch fixes the runtime crash for me.

But the issue is not the runtime, but a compiler bug since mcs generates
an int64 on stack as argument for newarr and this not correct.

Zoltan, please review & commit my patch.

Cheers,
Rodrigo

On Sat, Sep 19, 2009 at 6:29 AM, Marco Cecconi <marco.cecconi at gmail.com>wrote:

> Hello, I am running mono 2.4.2.3 under MacOSX Snow Leopard.
>
> marco-cecconis-macbook-pro:Debug marcocecconi$ cat ../../Main.cs
> using System;
>
> namespace Primes
> {
>     class MainClass
>     {
>         public static void Main (string[] args)
>         {
>             const ulong max = 1000;
>
>             bool[] numbers = new bool[max];
>
>             for (ulong i = 0; i<max; i++)
>                 numbers[i] = true;
>
>             for (ulong j = 1; j<max; j++)
>                 for (ulong k = (j+1)*2; k<max; k+=j+1)
>                     numbers[k] = false;
>
>             for (ulong i = 0; i<max; i++)
>                 if (numbers[i])
>                     Console.WriteLine(i+1);
>
>             Console.ReadLine();
>
>         }
>     }
> }
> marco-cecconis-macbook-pro:Debug marcocecconi$ mono -V
> Mono JIT compiler version 2.4.2.3 (tarball Mon Aug 31 09:54:11 MDT 2009)
> Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
>     TLS:           normal
>     GC:            Included Boehm (with typed GC)
>     SIGSEGV:       normal
>     Notification:  Thread + polling
>     Architecture:  x86
>     Disabled:      none
> marco-cecconis-macbook-pro:Debug marcocecconi$ mono -v Primes.exe
> Method (wrapper runtime-invoke) object:runtime_invoke_void__this___object
> (object,intptr,intptr,intptr) emitted at 0x8ed040 to 0x8ed0fd (code length
> 189) [Primes.exe]
> Method System.OutOfMemoryException:.ctor (string) emitted at 0x8ed100 to
> 0x8ed123 (code length 35) [Primes.exe]
> Method System.SystemException:.ctor (string) emitted at 0x8ed130 to
> 0x8ed153 (code length 35) [Primes.exe]
> Method System.Exception:.ctor (string) emitted at 0x8ed160 to 0x8ed178
> (code length 24) [Primes.exe]
> Method System.NullReferenceException:.ctor (string) emitted at 0x8ed178 to
> 0x8ed19b (code length 35) [Primes.exe]
> Method System.StackOverflowException:.ctor (string) emitted at 0x8ed1a0 to
> 0x8ed1b9 (code length 25) [Primes.exe]
> Method (wrapper runtime-invoke) Primes.MainClass:runtime_invoke_void_object
> (object,intptr,intptr,intptr) emitted at 0x8ed1c0 to 0x8ed27a (code length
> 186) [Primes.exe]
> **
> *ERROR:mini-codegen.c:1032:mono_local_regalloc: assertion failed: (reginfo
> [ins->sreg1].born_in > 0)
> Stacktrace:
>
> Abort trap*
>
>
> Marco Cecconi
> Encrypt your messages to me using this key: http://tinyurl.com/nhy4w
>
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20090919/0ab41599/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_crash.diff
Type: text/x-diff
Size: 699 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20090919/0ab41599/attachment.bin 


More information about the Mono-list mailing list