{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/8980","labels_url":"https://api.github.com/repos/golang/go/issues/8980/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/8980/comments","events_url":"https://api.github.com/repos/golang/go/issues/8980/events","html_url":"https://github.com/golang/go/issues/8980","id":51288944,"number":8980,"title":"cmd/cgo: panic in main.(*Package).rewriteRef(0x1043c4d0, 0x1040a080)","user":{"login":"davecheney","id":7171,"avatar_url":"https://avatars.githubusercontent.com/u/7171?v=3","gravatar_id":"","url":"https://api.github.com/users/davecheney","html_url":"https://github.com/davecheney","followers_url":"https://api.github.com/users/davecheney/followers","following_url":"https://api.github.com/users/davecheney/following{/other_user}","gists_url":"https://api.github.com/users/davecheney/gists{/gist_id}","starred_url":"https://api.github.com/users/davecheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecheney/subscriptions","organizations_url":"https://api.github.com/users/davecheney/orgs","repos_url":"https://api.github.com/users/davecheney/repos","events_url":"https://api.github.com/users/davecheney/events{/privacy}","received_events_url":"https://api.github.com/users/davecheney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"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":236,"closed_issues":688,"state":"open","created_at":"2014-12-16T02:26:41Z","updated_at":"2015-06-19T02:41:52Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":15,"created_at":"2014-10-22T20:33:10Z","updated_at":"2015-06-19T15:27:30Z","closed_at":null,"body":"<pre>What steps will reproduce the problem?\n\nOn a linux/arm host\n\nenv CC=clang ./all.bash\n\nWhat is the expected output? What do you see instead?\n\n# os/user\nos/user/lookup_unix.go:49:10: type C.struct_passwd: undefined C type 'struct passwd'\nos/user/lookup_unix.go:50:14: type C.struct_passwd: undefined C type 'struct passwd'\nos/user/lookup_unix.go:52:14: type C.long: undefined C type 'long'\nos/user/lookup_unix.go:59:13: call of non-function C.sysconf\nos/user/lookup_unix.go:59:23: unable to find value of constant C._SC_GETPW_R_SIZE_MAX\nos/user/lookup_unix.go:64:9: call of non-function C.malloc\npanic: runtime error: invalid memory address or nil pointer dereference\n[signal 0xb code=0x1 addr=0x0 pc=0x1d9ec]\n\ngoroutine 1 [running]:\nmain.(*Package).rewriteRef(0x1043c4d0, 0x1040a080)\n        /home/dfc/go/src/cmd/cgo/gcc.go:610 +0xee4\nmain.(*Package).Translate(0x1043c4d0, 0x1040a080)\n        /home/dfc/go/src/cmd/cgo/gcc.go:184 +0x188\nmain.main()\n        /home/dfc/go/src/cmd/cgo/main.go:231 +0xf54\n\nPlease use labels and text to provide additional information.\n\ndfc@qnap:~/go/src$ uname -a\nLinux qnap 3.14-2-kirkwood #1 Debian 3.14.15-2 (2014-08-09) armv5tel GNU/Linux\ndfc@qnap:~/go/src$ clang -v\nDebian clang version 3.5.0-6 (tags/RELEASE_350/final) (based on LLVM 3.5.0)\nTarget: arm-unknown-linux-gnueabi\nThread model: posix\nFound candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabi/4.9\nFound candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabi/4.9.1\nFound candidate GCC installation: /usr/lib/gcc/arm-linux-gnueabi/4.9\nFound candidate GCC installation: /usr/lib/gcc/arm-linux-gnueabi/4.9.1\nSelected GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabi/4.9\nCandidate multilib: .;@m32\nSelected multilib: .;@m32\n\ndfc@qnap:~/go/src$ hg parents\nchangeset:   21552:66a91d217fcb\ntag:         tip\nuser:        Dave Cheney &lt;dave@cheney.net&gt;\ndate:        Wed Oct 22 12:30:15 2014 +1100\nsummary:     runtime/cgo: encode BLX directly, fixes one clang build error on arm</pre>"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/113548193","html_url":"https://github.com/golang/go/issues/8980#issuecomment-113548193","issue_url":"https://api.github.com/repos/golang/go/issues/8980","id":113548193,"user":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T15:27:30Z","updated_at":"2015-06-19T15:27:30Z","body":"Hmmm.  bradfitz got me onto an ARM GNU/Linux machine, all.bash failed without CL 11222, passed with it.  I only tested the most recent version of the CL, using clang-3.5.\r\n\r\nI will send you an SSH key."}}