[Mono-bugs] [Bug 684438] New: SIGABRT we can't encode valuetypes, we should have never reached this line
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Apr 1 07:15:27 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=684438
https://bugzilla.novell.com/show_bug.cgi?id=684438#c0
Summary: SIGABRT we can't encode valuetypes, we should have
never reached this line
Classification: Mono
Product: Mono: Runtime
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: msafar at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
using System;
using System.Reflection;
using System.Reflection.Emit;
class Program
{
static void Main ()
{
AssemblyName asmname = new AssemblyName ();
asmname.Name = "assemfilename.exe";
AssemblyBuilder asmbuild = System.Threading.Thread.GetDomain ().
DefineDynamicAssembly (asmname,
AssemblyBuilderAccess.RunAndSave);
ModuleBuilder modbuild = asmbuild.DefineDynamicModule ("modulename",
"assemfilename.exe");
TypeBuilder myType = modbuild.DefineType ("Sample",
TypeAttributes.Public);
MethodBuilder mb = myType.DefineMethod ("Method",
MethodAttributes.Public, typeof (void), new Type [] { typeof (int), typeof
(decimal) });
ParameterBuilder pb = mb.DefineParameter (1, ParameterAttributes.In,
"foo");
pb.SetConstant (5m);
mb.GetILGenerator ().Emit (OpCodes.Ret);
myType.CreateType ();
}
}
Compile & Run
Mono:
we can't encode valuetypes, we should have never reached this line
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native)
System.Reflection.Emit.TypeBuilder.create_runtime_class
(System.Reflection.Emit.TypeBuilder,System.Reflection.Emit.TypeBuilder)
<0xffffffff>
at System.Reflection.Emit.TypeBuilder.CreateType () <0x0043f>
at Program.Main () <0x001e3>
at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
NET
Unhandled Exception: System.ArgumentException: Constant does not match the
defined type.
at System.Reflection.Emit.TypeBuilder.SetConstantValue(ModuleBuilder module,
Int32 tk, Type destType, Object value)
at Program.Main()
--
Configure bugmail: https://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