[Mono-bugs] [Bug 676856] New: mcs compiled code fails when run under .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Mar 3 17:23:09 EST 2011



           Summary: mcs compiled code fails when run under .NET
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.10.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: kummer at fdy.tu-darmstadt.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Description of Problem:

Some pice of code, when compiled with mcs, runs under mono, but crashes when it
is executed by .NET;
(It works fine under .NET and mono if it is compiled with Microsoft compiler)

Steps to reproduce the problem:

(1) Use the following code:

using System;

namespace Test1 {
  class MainClass {
    public static void Main (string[] args) {
      PlatformID[] a = 
            new PlatformID[]
{PlatformID.Unix,PlatformID.Win32NT,PlatformID.Unix };
      for(int i = 0; i < a.Length; i++)

(2) Compile with mcs (version
(3) run under Windows, do not use mono;

Actual Results:


Unhandled Exception: System.ArgumentException: Value does not fall within the
pected range.
   at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array
, RuntimeFieldHandle fldHandle)
   at Test1.MainClass.Main(String[] args)

Expected Results:
Console Output should be:

How often does this happen? 

Additional Information:

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