{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/10399","labels_url":"https://api.github.com/repos/golang/go/issues/10399/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10399/comments","events_url":"https://api.github.com/repos/golang/go/issues/10399/events","html_url":"https://github.com/golang/go/issues/10399","id":67387976,"number":10399,"title":"x/image/bmp: out of memory","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":"nigeltao","id":8565232,"avatar_url":"https://avatars.githubusercontent.com/u/8565232?v=3","gravatar_id":"","url":"https://api.github.com/users/nigeltao","html_url":"https://github.com/nigeltao","followers_url":"https://api.github.com/users/nigeltao/followers","following_url":"https://api.github.com/users/nigeltao/following{/other_user}","gists_url":"https://api.github.com/users/nigeltao/gists{/gist_id}","starred_url":"https://api.github.com/users/nigeltao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigeltao/subscriptions","organizations_url":"https://api.github.com/users/nigeltao/orgs","repos_url":"https://api.github.com/users/nigeltao/repos","events_url":"https://api.github.com/users/nigeltao/events{/privacy}","received_events_url":"https://api.github.com/users/nigeltao/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":349,"closed_issues":333,"state":"open","created_at":"2014-12-16T02:26:41Z","updated_at":"2015-04-23T07:22:25Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":3,"created_at":"2015-04-09T15:34:38Z","updated_at":"2015-04-23T07:55:42Z","closed_at":null,"body":"Run the following program on the following input:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"bytes\"\r\n    \"io/ioutil\"\r\n    \"os\"\r\n    \"golang.org/x/image/bmp\"\r\n)\r\n\r\nfunc main() {\r\n    data, _ := ioutil.ReadFile(os.Args[1])\r\n    img, err := bmp.Decode(bytes.NewReader(data))\r\n    if err != nil {\r\n        return\r\n    }\r\n    var w bytes.Buffer\r\n    err = bmp.Encode(&w, img)\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n}\r\n```\r\n\r\nhttps://drive.google.com/file/d/0B20Uwp8Hs1oCTzFrMndWMjNtTHM/view?usp=sharing\r\n\r\nIt crashes as:\r\n\r\n```\r\nfatal error: runtime: out of memory\r\n\r\ngoroutine 1 [running]:\r\nruntime.systemstack_switch()\r\n\tsrc/runtime/asm_amd64.s:216 fp=0xc208041b58 sp=0xc208041b50\r\nruntime.mallocgc(0x1000000300, 0x4b27c0, 0x1, 0x0)\r\n\tsrc/runtime/malloc.go:625 +0x8f1 fp=0xc208041c28 sp=0xc208041b58\r\nruntime.newarray(0x4b27c0, 0x1000000300, 0x1)\r\n\tsrc/runtime/malloc.go:736 +0xce fp=0xc208041c68 sp=0xc208041c28\r\nruntime.makeslice(0x4ac5a0, 0x1000000300, 0x1000000300, 0x0, 0x0, 0x0)\r\n\tsrc/runtime/slice.go:32 +0x178 fp=0xc208041cb8 sp=0xc208041c68\r\ngolang.org/x/image/bmp.decodeNRGBA(0x7f87732092d8, 0xc208014420, 0x7f87732090d0, 0xc20802e020, 0x10, 0x4000000c, 0x1, 0x0, 0x0, 0x0, ...)\r\n\tsrc/golang.org/x/image/bmp/reader.go:83 +0x185 fp=0xc208041e30 sp=0xc208041cb8\r\ngolang.org/x/image/bmp.Decode(0x7f87732092d8, 0xc208014420, 0x0, 0x0, 0x0, 0x0)\r\n\tsrc/golang.org/x/image/bmp/reader.go:114 +0x1be fp=0xc208041ed0 sp=0xc208041e30\r\nmain.main()\r\n\t/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0\r\n```\r\n\r\nI am on commit 65a798f031fd31a65574938bed2ec44c2bcba496"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/95480351","html_url":"https://github.com/golang/go/issues/10399#issuecomment-95480351","issue_url":"https://api.github.com/repos/golang/go/issues/10399","id":95480351,"user":{"login":"minux","id":135652,"avatar_url":"https://avatars.githubusercontent.com/u/135652?v=3","gravatar_id":"","url":"https://api.github.com/users/minux","html_url":"https://github.com/minux","followers_url":"https://api.github.com/users/minux/followers","following_url":"https://api.github.com/users/minux/following{/other_user}","gists_url":"https://api.github.com/users/minux/gists{/gist_id}","starred_url":"https://api.github.com/users/minux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minux/subscriptions","organizations_url":"https://api.github.com/users/minux/orgs","repos_url":"https://api.github.com/users/minux/repos","events_url":"https://api.github.com/users/minux/events{/privacy}","received_events_url":"https://api.github.com/users/minux/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T07:55:42Z","updated_at":"2015-04-23T07:55:42Z","body":"BMP does support RLE compression. I'm not sure x/image/bmp supports RLE\nthough.\n"}}