[Mono-devel-list] IKVM show stopper

Jeroen Frijters jeroen at sumatra.nl
Thu Jun 10 08:12:11 EDT 2004


Hello Paolo,

To fix an IKVM bug, I had to make a change to how MethodBuilder
instances are converted into their baked MethodInfo equivalents. This
exposed a bug in Mono's (0.95) ModuleBuilder.GetMethodToken().

The attached program demonstrates that ModuleBuilder.GetMethodToken()
allocates a new token, instead of returning the existing one, when it is
called with a MethodInfo (instead of a MethodBuilder).

I think the bug is in mono_image_create_token (reflection.c), as that
just blindly assigns a new token value when the passed in object is a
MonoMethod.

Also, if you look at the generated test.dll, you'll see that the actual
method token is also one off from the one reported by
MethodBuilder.GetToken().

Regards,
Jeroen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Class1.cs
Type: application/octet-stream
Size: 849 bytes
Desc: Class1.cs
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040610/733f918b/attachment.obj 


More information about the Mono-devel-list mailing list