{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/25507","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/25507/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/25507/comments","events_url":"https://api.github.com/repos/golang/go/issues/25507/events","html_url":"https://github.com/golang/go/issues/25507","id":325520804,"number":25507,"title":"cmd/compile: <autogenerated>:1:0: invalid instruction: 00000 (/home/xxx/main.go:8) MOVQ    $0, \"\".n+2147483680(SP)","user":{"login":"limpo1989","id":4050314,"avatar_url":"https://avatars2.githubusercontent.com/u/4050314?v=4","gravatar_id":"","url":"https://api.github.com/users/limpo1989","html_url":"https://github.com/limpo1989","followers_url":"https://api.github.com/users/limpo1989/followers","following_url":"https://api.github.com/users/limpo1989/following{/other_user}","gists_url":"https://api.github.com/users/limpo1989/gists{/gist_id}","starred_url":"https://api.github.com/users/limpo1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/limpo1989/subscriptions","organizations_url":"https://api.github.com/users/limpo1989/orgs","repos_url":"https://api.github.com/users/limpo1989/repos","events_url":"https://api.github.com/users/limpo1989/events{/privacy}","received_events_url":"https://api.github.com/users/limpo1989/received_events","type":"User","site_admin":false},"labels":[{"id":373402289,"url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/62","html_url":"https://github.com/golang/go/milestone/62","labels_url":"https://api.github.com/repos/golang/go/milestones/62/labels","id":2827591,"number":62,"title":"Go1.11","description":"","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","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},"open_issues":796,"closed_issues":450,"state":"open","created_at":"2017-10-10T13:39:17Z","updated_at":"2018-05-23T02:31:10Z","due_on":"2018-07-31T07:00:00Z","closed_at":null},"comments":2,"created_at":"2018-05-23T01:52:28Z","updated_at":"2018-05-23T04:04:44Z","closed_at":null,"author_association":"NONE","body":"### What version of Go are you using (`go version`)?\r\ngo version go1.10.2 linux/amd64\r\n\r\n### Does this issue reproduce with the latest release?\r\nYes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\nlinux/amd64\r\n\r\n### What did you do?\r\n\r\ngo build main.go\r\n\r\n### What did you see instead?\r\n```\r\n# command-line-arguments\r\n<autogenerated>:1:0: invalid instruction: 00000 (/home/xxx/main.go:8) MOVQ    $0, \"\".n+2147483680(SP)\r\n<autogenerated>:1:0: invalid instruction: 00003 (/home/xxx/main.go:8) MOVUPS  X0, \"\".err+2147483688(SP)\r\n```\r\n###  cat main.go\r\n```golang\r\npackage main\r\n\r\ntype aa struct {\r\n        // 1024 * 1024 * 255 is ok.\r\n        I [1024 * 1024 * 256]int\r\n}\r\n\r\n// change to pointer receiver is no compiler error.\r\n// func(a *aa) Write(p []byte) (n int, err error) \r\nfunc (a aa) Write(p []byte) (n int, err error) {\r\n        return\r\n}\r\n\r\nfunc main() {\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/391213512","html_url":"https://github.com/golang/go/issues/25507#issuecomment-391213512","issue_url":"https://api.github.com/repos/golang/go/issues/25507","id":391213512,"user":{"login":"randall77","id":6889504,"avatar_url":"https://avatars0.githubusercontent.com/u/6889504?v=4","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T04:04:44Z","updated_at":"2018-05-23T04:04:44Z","author_association":"CONTRIBUTOR","body":"I don't think we ever expect this to work.  You're putting a 2GB object on the stack.  We limit stacks to 1GB.\r\nWe could go through heroics to make this work by modifying the calling convention to keep big arguments and return values on the heap and pass pointers to them around.  Seems like a lot more work than benefit.\r\n\r\nWe could obviously use a better error message.  We should detect bad cases like this earlier in compilation, before we try to make a stack frame so big that instructions can't address it.\r\n"}}
{"actor":{"display_login":"randall77"}}