Description of Problem:
a) emitting a dynamic type in an assembly defined with AssemblyBuilderAccess.RunAndSave AND
b) the type's base class has a generic parameter AND
c) the base class is given to the method defining the dynamic type as a generic parameter
d) emitting ldfld in a constructor
Steps to reproduce the problem:
1. mcs Main.cs && mono Main.exe
Abnormal termination with SIGSEGV
The program completes successfully
How often does this happen?
This is 100% reliable for my configuration (Mac OSX 10.7, Mono 2.10.9). The example code works as expected in CLR v4.0.
Created attachment 3207 [details]
A complete reproduction.
This is, as far as I can tell, a minimal reproduction.
Fixed in master. As a workaround, try using @base = typeof(Example<int>>)