Skip to content

jbevain/cecil

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

When resolving a `GenericInstanceMethod` for a `privatescope` method that has the same signature as other methods, `MetadataResolver.GetMethod` would incorrectly return the first method with the same name.

The fix for this seems to be an optimization opportunity as well.  Although I have to admit it feels a little to easy.  Please make sure I'm not overlooking some reason why this fix is not safe.

A added 2 variations of tests.

`PrivateScope` - These tests were fine and passed as is.  This is because the instruction operands are MethodDefinitions and therefore didn't need to be resolved by `MetadataResolver`

`PrivateScopeGeneric` - This test triggered the bug.
56d4409

Git stats

Files

Permalink
Failed to load latest commit information.

Cecil

Mono.Cecil is a library to generate and inspect programs and libraries in the ECMA CIL form.

To put it simply, you can use Cecil to:

  • Analyze .NET binaries using a simple and powerful object model, without having to load assemblies to use Reflection.
  • Modify .NET binaries, add new metadata structures and alter the IL code.

Cecil has been around since 2004 and is widely used in the .NET community. If you're using Cecil, or depend on a framework, project, or product using it, please consider sponsoring Cecil.

To discuss Cecil, the best place is the mono-cecil Google Group.

Cecil is a project under the benevolent umbrella of the .NET Foundation.