dnlib x64 exhausts all memory when read method body.
See original GitHub issuestatic void Main(string[] args) {
Console.WriteLine(IntPtr.Size); // Can only reproduce if current program is AnyCPU/x64
var module = ModuleDefMD.Load("test.exe");
var method = module.ResolveMethod(0x11d);
var body = method.Body; // here
Console.WriteLine(body);
Console.ReadKey();
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:26 (26 by maintainers)
Top Results From Across the Web
dnlib
dnlib is a library that can read, write and create .NET assemblies and modules. Become a Bounty Hunter
Read more >0xd4d/dnlib: Reads and writes .NET assemblies and ...
First of all, the important namespaces are dnlib.DotNet and dnlib.DotNet.Emit . dnlib.DotNet.Emit is only needed if you intend to read/write method bodies.
Read more >Untitled
Star stationery shop dunedin, Uber ride code, Too fat for memory foam, ... Re-reading or rereading, Djvijayraj, Skittles wedding dress commercial, ...
Read more >Untitled
Gift cards online canada, Crontab every 15 minutes aix, #Education in 19th ... Siphano fk 2 episode 3, Arylide grove eglinton, F body...
Read more >Untitled
Lenny venito family, Libdb 4.3 so 64bit, Ben hoitink canberra, Pen window launcher 1.5, ... Fantastic mr fox roald dahl read online, Wood...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I test it, when run the output
Test.exe
.NET will throw TypeLoadException when greater than 65535: Internal limit: There’re so many generic arguments. (I don’t know the exact message, I translate from Chinese) EDIT: TypeLoadException even if 0-65535 without overflowits metadata is invalid. bp at line ‘if (!reader.TryReadCompressedUInt32(out uint numParams))’ you will see ‘numParams’ is a extremely large number.