[Mono-devel-list] a jit bug?

Paolo Molaro lupus at ximian.com
Thu Dec 4 11:12:29 EST 2003


On 12/04/03 Mohammad DAMT wrote:
> The attached files can be compiled by mcs, but the jit will abort with
> message as described below. However it can be run by mint.
> 
> config: mono+mcs from cvs today
> 
> [mdamt at gordon tmp]$ mcs test.cs
> Compilation succeeded
> [mdamt at gordon tmp]$ mint test.exe
> Sada
> [mdamt at gordon tmp]$ mono test.exe
>  
> ** ERROR **: Invalid IL code at IL0020 in
> Weirdo.Weirdo:ProblematicSwitch (string): IL_0020: br        IL_005c

It is a bug in mcs.
mint doesn't do the consistency checks the jit does, so it executes the
code even if it's incorrect.

> aborting...
> Aborted
> 
> and this is the il codes:
>     // method line 2
>     .method private
>            instance default string 'ProblematicSwitch' (string 'param') 
> cil managed
>     {
>         .param [1]
>         // Method begins at RVA 0x20f4
>         // Code size 92 (0x5c)
>         .maxstack 5
>         .locals init (
>                 string  V_0)
[...]
>         IL_0020:  br IL_005c
[...]
>         IL_0057:  br IL_005c
>  
>     } // end of method Weirdo::instance default string
> 'ProblematicSwitch' (string 'param')

As you see there is no IL_005c label where the code cna jump to.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list