{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/10996","labels_url":"https://api.github.com/repos/golang/go/issues/10996/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10996/comments","events_url":"https://api.github.com/repos/golang/go/issues/10996/events","html_url":"https://github.com/golang/go/issues/10996","id":82769467,"number":10996,"title":"debug/elf: index out of range","user":{"login":"dvyukov","id":1095328,"avatar_url":"https://avatars.githubusercontent.com/u/1095328?v=3","gravatar_id":"","url":"https://api.github.com/users/dvyukov","html_url":"https://github.com/dvyukov","followers_url":"https://api.github.com/users/dvyukov/followers","following_url":"https://api.github.com/users/dvyukov/following{/other_user}","gists_url":"https://api.github.com/users/dvyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvyukov/subscriptions","organizations_url":"https://api.github.com/users/dvyukov/orgs","repos_url":"https://api.github.com/users/dvyukov/repos","events_url":"https://api.github.com/users/dvyukov/events{/privacy}","received_events_url":"https://api.github.com/users/dvyukov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/1","html_url":"https://github.com/golang/go/milestones/Go1.5","labels_url":"https://api.github.com/repos/golang/go/milestones/1/labels","id":905105,"number":1,"title":"Go1.5","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":288,"closed_issues":563,"state":"open","created_at":"2014-12-16T02:26:41Z","updated_at":"2015-05-30T10:12:42Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":6,"created_at":"2015-05-30T10:07:05Z","updated_at":"2015-05-30T11:00:17Z","closed_at":null,"body":"The following program crashes with the panic:\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"bytes\"\r\n\t\"debug/elf\"\r\n)\r\n\r\nfunc main() {\r\n\tdata := []byte(\"\\u007fELF\\x02\\x01\\x010000000000000\" +\r\n\t\t\"\\x010000000000000000000\" +\r\n\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0000000000\\x00\\x00\\x00\\x00\" +\r\n\t\t\"0000\")\r\n\tf, err := elf.NewFile(bytes.NewReader(data))\r\n\tif err != nil {\r\n\t\tif f != nil {\r\n\t\t\tpanic(\"file is not nil on error\")\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\tdefer f.Close()\r\n\tf.DynamicSymbols()\r\n\tf.ImportedLibraries()\r\n\tf.ImportedSymbols()\r\n\tf.Section(\".data\")\r\n\tf.SectionByType(elf.SHT_GNU_VERSYM)\r\n\tf.Symbols()\r\n\tdw, err := f.DWARF()\r\n\tif err != nil {\r\n\t\tif dw != nil {\r\n\t\t\tpanic(\"dwarf is not nil on error\")\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\tdr := dw.Reader()\r\n\tfor {\r\n\t\te, _ := dr.Next()\r\n\t\tif e == nil {\r\n\t\t\tbreak\r\n\t\t}\r\n\t}\r\n\r\n}\r\n```\r\n```\r\npanic: runtime error: index out of range\r\n\r\ngoroutine 1 [running]:\r\ndebug/elf.NewFile(0x7f6e0f6071c0, 0xc208014420, 0x63d900, 0x0, 0x0)\r\n\tsrc/debug/elf/file.go:380 +0x1484\r\nmain.main()\r\n\telftest.go:13 +0x10e\r\n```\r\non commit 596bb76248dd7844ba3bebcdeab9a7c42ef5855a"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/107021736","html_url":"https://github.com/golang/go/issues/10996#issuecomment-107021736","issue_url":"https://api.github.com/repos/golang/go/issues/10996","id":107021736,"user":{"login":"gopherbot","id":8566911,"avatar_url":"https://avatars.githubusercontent.com/u/8566911?v=3","gravatar_id":"","url":"https://api.github.com/users/gopherbot","html_url":"https://github.com/gopherbot","followers_url":"https://api.github.com/users/gopherbot/followers","following_url":"https://api.github.com/users/gopherbot/following{/other_user}","gists_url":"https://api.github.com/users/gopherbot/gists{/gist_id}","starred_url":"https://api.github.com/users/gopherbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gopherbot/subscriptions","organizations_url":"https://api.github.com/users/gopherbot/orgs","repos_url":"https://api.github.com/users/gopherbot/repos","events_url":"https://api.github.com/users/gopherbot/events{/privacy}","received_events_url":"https://api.github.com/users/gopherbot/received_events","type":"User","site_admin":false},"created_at":"2015-05-30T11:00:17Z","updated_at":"2015-05-30T11:00:17Z","body":"CL https://golang.org/cl/10477 mentions this issue."}}