Runtime issues - vilinski/nemerle GitHub Wiki

This page is a summary of issues we have found in .NET runtime engines, which we are using for Nemerle development. Some of them are already resolved in newer versions of runtime, some other are still open and forces us to make workarounds.

Every time we encounter a bug in runtime or BCL we try to make a small testcase in C# or IL triggerring it and send it to the authors.

Most bugs we have found are related to System.Reflecton.Emit API.

Table of Contents

Unresolved issues

All runtimes / .NET design

  • No connection between uninstantiated and instantiated members of types. This is very serious, complicated issue which has a separate page.
  • Allow co/contravariant generic classes to be generated using S.R.E. Suggestion submitted.
  • CLR refuses to run / verify instance methods in enums. Suggestion submitted.
  • Allow void to be parameter of generic class (if not in C#, then just in runtime). Suggestion submitted.
  • System.Runtime.CompilerServices.IsVolatile class does not have a public constructor (the same applies to IsConst, etc.). Suggestion submitted.
  • System.Reflection.Emit.EventBuilder does not inherit from S.R.E.EventInfo nor S.R.E.MemberInfo. It forces us to make hacks and create inconsitent code in our compiler. Suggestion submitted.
  • It is not possible to set the size of the stack in the assembly generated by S.R.E. submitted here. Note that this is a problem only under MS.NET, since mono doesn't look at the value stored in the header, it happily uses system limit (which is 8 megs most of the time, which is enough).

Microsoft .NET only

This section contains only bugs, which are still present in .NET 2.0 betas.

  • Cannot create generic object hierarchy using S.R.E. Bugreport submitted.
    • Yet another bug By Design 2005-08-08 at 12:14:05, which is VERY bad, since it blocks generation of quite basic generics
  • problem with generics and DefineMethodOverride Bugreport submitted.
    • Postponed, again VERY BAD.
  • confused TypeBuilder.GetMethod/Constructor. Bugreport submitted.
  • TypeBuilder.GetConstructor throws ArgumentException when supplied created generic type. Bugreport submitted.
    • Yet another bug By Design
  • There are problems with using S.R.E.TypeBuilder representing enum type obtained from DefineType method instead of DefineEnum. Bugreport submitted.
  • Equals override of System.Type does not work properly for reflected array types. Bugreport submitted.
    • Yet another bug By Design, 2004-04-24 22:40:19.
  • Tail calls are slower than normal ones. Bugreport submitted.
  • IsConstructor returns False for ConstructorBuilder. Bugreport submitted.
    • Resolved as By Design by Microsoft on 2004-10-19 at 18:15:13
What is the best way to file bugs for MS.NET? Microsoft Product Feedback

Feel free to vote on unresolved MS.NET bugs, which we have filed, so they are fixed earlier.

Mono only

  • Code access security is not supported.

Issues reported by us and already resolved

  • (Mono) Unable to define generic field inside generic type through S.R.E. Resolved on mono svn.
  • (MS.NET) Static fields in generic types are not initialized correctly. Resolved as Fixed by Microsoft on 2005-07-07 at 09:25:13.
  • (MS.NET) S.R.E crashes when creating generic classes hierarchy. Closed by Microsoft on 2005-07-06 at 10:55:25 (it was already fixed internally.
  • (MS.NET) Unable to emit nested value types. Whenever they are finalized before containing type or after, the exception is being thrown (ArgumentException / TypeLoadException). Resolved by Microsoft on 2005-06-03.
  • (MS.NET) PEVerify from 2.0 is confused by correct (and verifiable by 1.1 PEVerify) code generated by 1.1 S.R.E. Resolved by Microsoft on 2005-05-30.
  • (MS.NET) Equals method throws exception when used on GenericTypeParameterBuilder Resolved by Microsoft on 2005-05-30.
  • (MS.NET) ToString do not work on instanciated generic type when building this type. Resolved by Microsoft on 2005-05-20.
  • (Mono) System.Type IsAssignableFrom crashes when assembly is builded for Save. Resolved in 1.1.6.
  • (MS.NET) Unable to generate code creating new generic object of instanciated TypeBuilder using Reflection. Resolved as By Design by Microsoft on 2005-01-28 at 13:53:24 (new API for doing this will be added in VS2005 Beta2).
  • (Mono) Improper alignment of the fat method header. Resolved in Mono 1.0.4.
  • (Mono) NullReferenceException inside mono runtime, when loading System.dll assembly through reflection. Resolved in Mono 1.0.4.
  • (Mono) Support for default parameters. Resolved in Mono 1.0.4.
  • (Mono development branch 1.1.1) Assertion fails at AOT compilation of array creation code. Resolved in Mono 1.1.2.
  • (Mono) Crash in runtime when using OpenGl bindings. Resolved in Mono 1.0.
  • (Mono) System.Type Name property outputs wrong string for System.Void*. Resolved in Mono 1.0.2.
  • (Mono) GetFields method returns inherited static fields. Resolved in Mono 0.30.
  • (Mono) CustomAttributeBuilder cannot be used on types created by TypeBuilder.CreateType. Resolved in Mono 0.30.
  • (Mono) conv.ovf.i8 doesn't work for negative values. Resolved in Mono 0.31.

Mono AMD64 JIT issues

Several issues were found in the Mono amd64 JIT, all are releated to various i8 arithmetics and conversions. All are already fixed.

  • http://bugzilla.ximian.com/show_bug.cgi?id=71236
  • http://bugzilla.ximian.com/show_bug.cgi?id=71319
  • http://bugzilla.ximian.com/show_bug.cgi?id=71320
  • http://bugzilla.ximian.com/show_bug.cgi?id=71361
  • http://bugzilla.ximian.com/show_bug.cgi?id=74588
  • http://bugzilla.ximian.com/show_bug.cgi?id=74591
  • http://bugzilla.ximian.com/show_bug.cgi?id=74726
⚠️ **GitHub.com Fallback** ⚠️