[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
https://bugzilla.novell.com/show_bug.cgi?id=676856
https://bugzilla.novell.com/show_bug.cgi?id=676856#c0
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++)
Console.WriteLine(a[i]);
}
}
}
(2) Compile with mcs (version 2.10.1.0)
(3) run under Windows, do not use mono;
Actual Results:
---------------
c:\Users\kummer\MonoDev-Projects\Test1\Test1\bin\Debug>Test1.exe
Unhandled Exception: System.ArgumentException: Value does not fall within the
ex
pected range.
at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array
array
, RuntimeFieldHandle fldHandle)
at Test1.MainClass.Main(String[] args)
Expected Results:
-----------------
Console Output should be:
Unix
Win32NT
Unix
How often does this happen?
---------------------------
allways
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