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.