[Mono-dev] Cecil bug report and a question
mono at evain.net
Wed Aug 23 19:02:44 EDT 2006
Bjarke Hammersholt Roune wrote:
> I have found the following bug in Cecil. Here is how to trigger it: Make
> an assembly with a method where the last instruction in that method is
> also the last instruction in a handler block. Use Cecil to load the
> assembly and then save it. This will result in a NullReferenceException
> being thrown from Mono.Cecil.Cil.CodeWriter.IsRangeFat. I have attached
> an example assembly that contains such a method.
This seems to be already fixed. Please use the very fresh 0.4.3 release
or even better, an always up to date SVN checkout.
> It would probably be a good idea to document how ranges are represented
> in Cecil in the FAQ, as there are several reasonable ways it could work,
> and it is not possible to tell from the Cecil interface which one it is.
Good idea! Feel tree to add another entry to
> I also have a question: I have an example of an assembly output by the
> MS C# compiler that shrinks from 3.072 bytes to 2.048 bytes simply by
> loading and then saving it using Cecil. How does that happen?
Cecil does not preserve the .rsrc (aka Win32 resources) section or the
PE file for the moment. So it saves some place.
More information about the Mono-devel-list