Bug 25690 - * Assertion: should not be reached at icall.c:1902
Summary: * Assertion: should not be reached at icall.c:1902
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-01-03 03:38 UTC by Marek Safar
Modified: 2015-01-03 06:48 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Marek Safar 2015-01-03 03:38:30 UTC
using System;
using System.Threading;
using System.Reflection;
using System.Reflection.Emit;
using System.IO;

namespace cons234234324

	class MainClass
		public static void Main(string[] args)
			var assembly = Thread.GetDomain ().DefineDynamicAssembly (new AssemblyName ("ASSEMBLY_NAME"), AssemblyBuilderAccess.RunAndSave, Path.GetTempPath ());
			var module = assembly.DefineDynamicModule ("Instance.exe");
			EnumBuilder enumBuilder = module.DefineEnum ("gggg",
				TypeAttributes.Public, typeof(int));
			enumBuilder.DefineLiteral ("TF", 4);

			enumBuilder.CreateType ();

			var fields = enumBuilder.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);

			for (int i = 0; i < fields.Length; ++i) {
				var m = fields[i].GetRawConstantValue ();

			var n0 = enumBuilder.GetEnumName (4);

When run mono fails with

* Assertion: should not be reached at icall.c:1902


  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoField.GetRawConstantValue (System.Reflection.MonoField) <IL 0x0002d, 0xffffffff>
  at cons234234324.MainClass.Main (string[]) [0x0006e] in /Users/marek/Projects/c2/c2/Program.cs:25
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Comment 1 Zoltan Varga 2015-01-03 06:48:42 UTC
Fixed in master.

Note You need to log in before you can comment on or make changes to this bug.