Stack overflow while handling SignatureCycle2 test #986
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Roslyn has a test with signatures cycle - here. When loading this binary Cecil stack overflows. This simple code snippet demonstrates it:
I think the fix should be done in 'public IMetadataTokenProvider LookupToken (MetadataToken token)' function, At the start it should check that token is not handled (a dedicated HashSet will help), if yes - throw an exception, if not - add the handled token to the set. Then execute the code of the function in a try/finally block, and remove the token from the set in finally.