[Mono-bugs] [Bug 515497] New: __arglist causes compiler crash.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 23 04:17:57 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=515497


           Summary: __arglist causes compiler crash.
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: simmons.44 at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

This code causes a crash in the compiler. ( I'm pretty sure it's valid code
also )

[DllImport( Lib, CallingConvention = CallingConvention.Cdecl, EntryPoint =
"luaL_error" )]
private static extern void L_error( IntPtr state, string format, __arglist );

public void L_Error( string format, __arglist )
{
    L_error( state, format, __arglis );
}

Stacktrace:

/opt/mono/bin/gmcs /noconfig
"/out:/home/josh/Projects/LuaCLI/LuaDLL/bin/Debug/LuaDLL.dll" "/r:System.dll"
/nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 "/define:DEBUG" 
/t:library "/home/josh/Projects/LuaCLI/LuaDLL/AssemblyInfo.cs"
"/home/josh/Projects/LuaCLI/LuaDLL/LuaDLL.cs" 
Exception caught by the compiler while emitting:
   Block that caused the problem begin at:
/home/josh/Projects/LuaCLI/LuaDLL/LuaDLL.cs(1203,17):
System.InvalidCastException: Cannot cast from source type to destination type.
Internal compiler error at
/home/josh/Projects/LuaCLI/LuaDLL/LuaDLL.cs(1202,29):: exception caught while
emitting MethodBuilder [LuaDLL::L_Error]


Unhandled Exception: System.InvalidCastException: Cannot cast from source type
to destination type.
  at Mono.CSharp.Invocation.GetVarargsTypes (System.Reflection.MethodBase mb,
System.Collections.ArrayList arguments) [0x00000] 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
method, System.Collections.ArrayList Arguments, Location loc, Boolean dup_args,
Boolean omit_args) [0x00000] 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
method, System.Collections.ArrayList Arguments, Location loc) [0x00000] 
  at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments) [0x00000] 
  at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Invocation.EmitStatement (Mono.CSharp.EmitContext ec)
[0x00000] 
  at Mono.CSharp.StatementExpression.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] 

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
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