Fixes calling ResolveTypeSpec without gpContext causing listTypeSpecMD polluted#439
Fixes calling ResolveTypeSpec without gpContext causing listTypeSpecMD polluted#439wtfsck merged 1 commit into0xd4d:masterfrom
Conversation
|
That check was added due to: #331 Have you tested your code with the code from that issue? |
|
Seems like the only problem is that it doesn't find the generic parameter in the type/method so it can't print the GP name, only its GP index. It shouldn't be a problem. |
|
The TypeSpec I printed is in instruction read by MethodBodyReader, which is read with gpContext. |
I patched dnSpy's dnlib with this fix and load 'HelloWorld.MaliciousTypeSpecLoop.exe', dnSpy doesn't hang. updated: var m = ModuleDefMD.Load("HelloWorld.MaliciousTypeSpecLoop.exe");
var t = m.ResolveTypeSpec(1).TypeSig;I think this problem is fixed in ReadTypeDefOrRef(bool allowTypeSpec) |
|
Thanks for testing it! Merged. |
No description provided.