[Mono-bugs] [Bug 600560] New: System.ArgumentException thrown while compiling exception code with generic method
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Apr 28 11:36:30 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=600560
http://bugzilla.novell.com/show_bug.cgi?id=600560#c0
Summary: System.ArgumentException thrown while compiling
exception code with generic method
Classification: Mono
Product: Mono: Compilers
Version: SVN
Platform: x86-64
OS/Version: RHEL 4
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: billholmes54 at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
In the sample below notice that the catch block names an unused variable. If
you remove the variable name from the catch argument list the bug does not
occur.
Reproducible: Always
Steps to Reproduce:
//Compile the attached sample - gmcs -target:library throwBug.cs
using System;
public class Test
{
public System.Collections.Generic.IEnumerable<int> TestMethod ()
{
try
{
}
catch (Exception ex)
{
throw;
}
yield break;
}
}
Actual Results:
Internal compiler error at throwBug.cs(5,60):: exception caught while emitting
MethodBuilder [<TestMethod>c__Iterator0::MoveNext]
Unhandled Exception: Mono.CSharp.InternalErrorException: Helper class already
defined!
at Mono.CSharp.CompilerGeneratedClass.CheckMembersDefined () [0x00000]
at Mono.CSharp.AnonymousMethodStorey.AddCapturedVariable (System.String name,
System.Type type) [0x00000]
at Mono.CSharp.HoistedVariable..ctor (Mono.CSharp.AnonymousMethodStorey
storey, System.String name, System.Type type) [0x00000]
at Mono.CSharp.HoistedLocalVariable..ctor (Mono.CSharp.AnonymousMethodStorey
scope, Mono.CSharp.LocalInfo local, System.String name) [0x00000]
at Mono.CSharp.AnonymousMethodStorey.CaptureLocalVariable
(Mono.CSharp.EmitContext ec, Mono.CSharp.LocalInfo local_info) [0x00000]
at Mono.CSharp.LocalVariableReference.DoResolveBase (Mono.CSharp.EmitContext
ec) [0x00000]
at Mono.CSharp.LocalVariableReference.DoResolve (Mono.CSharp.EmitContext ec)
[0x00000]
at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000]
at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Catch.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.TryCatch.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Iterator.EmitMoveNext_NoResumePoints (Mono.CSharp.EmitContext
ec, Mono.CSharp.Block original_block) [0x00000]
at Mono.CSharp.Iterator.EmitMoveNext (Mono.CSharp.EmitContext ec,
Mono.CSharp.Block original_block) [0x00000]
at Mono.CSharp.IteratorStatement.DoEmit (Mono.CSharp.EmitContext ec)
[0x00000]
at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000]
at Mono.CSharp.EmitContext.EmitResolvedTopBlock (Mono.CSharp.ToplevelBlock
block, Boolean unreachable) [0x00000]
at Mono.CSharp.EmitContext.EmitTopBlock (IMethodData md,
Mono.CSharp.ToplevelBlock block) [0x00000]
at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace parent) [0x00000]
at Mono.CSharp.MethodOrOperator.Emit () [0x00000]
at Mono.CSharp.Method.Emit () [0x00000]
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list