Clarification

Posted by Jb Evain Fri, 20 Jul 2007 20:33:00 GMT

Light

Eight days ago, I’ve blogged about an issue involving Cecil and ildasm. And the last security update to the .net framework.

After a few hours of investigation, I’ve managed to be able to reproduce the ildasm crash. It turns out that the security update is actually not involved in the issue. It’s just that I stumbled upon right after the security update, and that I had not experienced it before.

So, the ildasm crash happened when I was disassembling an assembly that I had just round-tripped. The issue is that in the same folder as the new assembly, there was the pdb file that was going along the assembly. So when Cecil re-writes the assembly, the methods identifiers are re-generated, and the pdb which keep track of them, becomes out of sync. ildasm uses the pdb file to read the variable names, and other infos. So when it tries to read them from the pdb, which doesn’t match the assembly, it may crash.

You can read the bug reported at Microsoft. It’s somewhat a corner case, so it’s not really critical. But if ever you face the same symptoms while disassembling an assembly generated by Cecil, you can try to delete the pdb.

Mono.Cecil have moved

Posted by Jb Evain Fri, 13 Jul 2007 18:57:00 GMT

Poison Warning

Yesterday night was filled with emotion. After more than two years in its own module in SVN, the library Mono.Cecil have moved to a shiner place, right where the core assemblies are, in the mcs module.

Dear Cecil users, you’ll now have to check Cecil out from mcs/class/Mono.Cecil.

Yet, Cecil’s API is not set in stone, so if Cecil makes it to the GAC, you’ll still have to keep a private copy of Cecil for your developments, as it won’t be deployed as a package, you’ll need a private copy during the compilation.

As soon as I can freeze the API, it will be packaged like the other assemblies. But this is another story.

Cecil, ildasm and the security update

Posted by Jb Evain Thu, 12 Jul 2007 16:46:00 GMT

Joutes Sètoises

Since the last security update of the .net 2 framework, ildasm may have some issues with assemblies emitted by Cecil. This goes from a pure ildasm crash, to methods that can’t be disassembled. Plus, the behavior is sometimes random. That’s clearly a regression in ildasm, because it used to work, and other disassembler are able to read the assembly (Reflector, monodis).

Still, as it seems to happen only with assemblies emitted by Cecil, Cecil must be doing something that ildasm doesn’t appreciate anymore, but on the other hand, ildasm shouldn’t crash either. I’ve not yet been able to discover what this particular thing is. I’ve submited a bug to Microsoft. Let see if they can help telling what’s going wrong.

Reflexil, easy assembly patching 1

Posted by Jb Evain Mon, 02 Jul 2007 09:47:00 GMT

My old friend Sébastien pinged me a few days ago because he started to use Cecil. Let simply say that he was modifying some assemblies to circumvent a natural limitation of whatever program.

This long time Delphi user like to have a GUI for this kind of hack, so he simply started to write yet another plugin for Reflector.



The plugin is only in a very early stage, but still, you can deal with primitives types and branches very easily.

You can find here the mandatory introducing post for Reflexil. Even if it’s in french, I bet you’ll locate the binaries as well as the sources easily.

Older posts: 1 2 3 4 ... 12