-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DacNameParser.Parse(name) throws System.IndexOutOfRangeException #897
Comments
@ryanmolden Do you have some time to take a look? I'll likely put a try catch at the bottom of Parse in the next release either way. |
Wrap Dac name parsing in a try/catch. Historically parsing all of the various type names has been a real pain point. We need to fix the underlying exception but for now we'll wrap the method in a try/catch to ensure it doesn't unexpectedly throw. Contributes to #897.
@leculver wow, I never use GitHub (sorry), so I never saw this tag. Anyhow, ironically I am running into the same issue here, the problem is the non-assembly qualified names (T and TPluginType). The parser assumes all generic args will be assembly qualified (i.e. [Foo, Bar]), which clearly is not true. I am working on a fix but as you stated in the fix to add the catch...this area is a massive pain due to the complexity of the DAC name stuff. |
…assembly qualified names (see bug microsoft#897) Add lots of comments to parser as its complex due to having to deal with tragedies like the type name in ParseGenericWithComplexGenericArgs2 Replace uses of char literals in numerous places with their named constants I was using elsewhere Correct numerous comment spelling errors (thanks VS spell checker) Add numerous tests both for the case in 897, some variants of it, and another case I encountered internally
…assembly qualified names (see bug microsoft#897) Add lots of comments to parser as its complex due to having to deal with tragedies like the type name in ParseGenericWithComplexGenericArgs2 Replace uses of char literals in numerous places with their named constants I was using elsewhere Correct numerous comment spelling errors (thanks VS spell checker) Add numerous tests both for the case in 897, some variants of it, and another case I encountered internally
…assembly qualified names (#1172) * Fix bugs in DAC names that either contain non-closed generics or non-assembly qualified names (see bug #897) Add lots of comments to parser as its complex due to having to deal with tragedies like the type name in ParseGenericWithComplexGenericArgs2 Replace uses of char literals in numerous places with their named constants I was using elsewhere Correct numerous comment spelling errors (thanks VS spell checker) Add numerous tests both for the case in 897, some variants of it, and another case I encountered internally * More DAC name corner cases * Add accidental omission of nullability specifier * Fix spacing complaints in my if statements * Fix typos/omitted words in comment in test * Fix copy paste error where I left Fact off of couple of test methods * Reduce allocations --------- Co-authored-by: Lee Culver <leculver@microsoft.com>
I'm enumerating all the types in a dump with ClrMD 2.0
For one of the types, DAC returns the following name:
StructureMap.Pipeline.ExpressedInstance`3[[StructureMap.Pipeline.LambdaInstance`2, EnforceHttpsModule],T,TPluginType]
DacNameParser can't parse it and throws System.IndexOutOfRangeException.
CLR version: 4.7.2650.0
Architecture: Amd64
The text was updated successfully, but these errors were encountered: