{"action":"created","issue":{"url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/723","repository_url":"https://api.github.com/repos/icsharpcode/ILSpy","labels_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/723/labels{/name}","comments_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/723/comments","events_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/723/events","html_url":"https://github.com/icsharpcode/ILSpy/issues/723","id":162794259,"number":723,"title":"Failure to load assemblies with a portable pdb","user":{"login":"AustinWise","id":7751,"avatar_url":"https://avatars.githubusercontent.com/u/7751?v=3","gravatar_id":"","url":"https://api.github.com/users/AustinWise","html_url":"https://github.com/AustinWise","followers_url":"https://api.github.com/users/AustinWise/followers","following_url":"https://api.github.com/users/AustinWise/following{/other_user}","gists_url":"https://api.github.com/users/AustinWise/gists{/gist_id}","starred_url":"https://api.github.com/users/AustinWise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AustinWise/subscriptions","organizations_url":"https://api.github.com/users/AustinWise/orgs","repos_url":"https://api.github.com/users/AustinWise/repos","events_url":"https://api.github.com/users/AustinWise/events{/privacy}","received_events_url":"https://api.github.com/users/AustinWise/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-28T21:40:45Z","updated_at":"2016-07-12T23:56:14Z","closed_at":null,"body":"If you compile hello world using the new .NET Core CLI:\r\n````\r\ndotnet new\r\ndotnet restore\r\ndotnet build\r\n````\r\nand try to open the resulting DLL using IlSpy, the DLL fails to load with this exception:\r\n````\r\nSystem.OutOfMemoryException: Array dimensions exceeded supported range.\r\n   at Microsoft.Cci.Pdb.MsfDirectory..ctor(PdbReader reader, PdbFileHeader head, BitAccess bits)\r\n   at Microsoft.Cci.Pdb.PdbFile.LoadFunctions(Stream read, Dictionary`2& tokenToSourceMapping, String& sourceServerData, Int32& age, Guid& guid)\r\n   at Mono.Cecil.Pdb.PdbReader.PopulateFunctions()\r\n   at Mono.Cecil.Pdb.PdbReader.ProcessDebugHeader(ImageDebugDirectory directory, Byte[] header)\r\n   at Mono.Cecil.ModuleDefinition.ProcessDebugHeader()\r\n   at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader)\r\n   at ICSharpCode.ILSpy.LoadedAssembly.LoadSymbols(ModuleDefinition module)\r\n   at ICSharpCode.ILSpy.LoadedAssembly.LoadAssembly(Object state)\r\n   at System.Threading.Tasks.Task`1.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n````\r\n\r\nThe root cause is the cecil class [PdbFileHeader](https://github.com/jbevain/cecil/blob/042bdd2432705ae4c682743ff9740550dee3bead/symbols/pdb/Microsoft.Cci.Pdb/PdbFileHeader.cs) does some not check the header of the PDB file.\r\n\r\nThis could worked around in IlSpy by [catching more exceptions](https://github.com/icsharpcode/ILSpy/blob/e2e952a9be85c57eed8c70d7315281a6724b7049/ILSpy/LoadedAssembly.cs#L134) during symbol loading."},"comment":{"url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/comments/232216573","html_url":"https://github.com/icsharpcode/ILSpy/issues/723#issuecomment-232216573","issue_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/723","id":232216573,"user":{"login":"AraHaan","id":15173749,"avatar_url":"https://avatars.githubusercontent.com/u/15173749?v=3","gravatar_id":"","url":"https://api.github.com/users/AraHaan","html_url":"https://github.com/AraHaan","followers_url":"https://api.github.com/users/AraHaan/followers","following_url":"https://api.github.com/users/AraHaan/following{/other_user}","gists_url":"https://api.github.com/users/AraHaan/gists{/gist_id}","starred_url":"https://api.github.com/users/AraHaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AraHaan/subscriptions","organizations_url":"https://api.github.com/users/AraHaan/orgs","repos_url":"https://api.github.com/users/AraHaan/repos","events_url":"https://api.github.com/users/AraHaan/events{/privacy}","received_events_url":"https://api.github.com/users/AraHaan/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T23:56:14Z","updated_at":"2016-07-12T23:56:14Z","body":"You know you can make a Pull Request right?"}}
{"actor":{"display_login":"AraHaan"}}