{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/17458","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/17458/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/17458/comments","events_url":"https://api.github.com/repos/golang/go/issues/17458/events","html_url":"https://github.com/golang/go/issues/17458","id":183241295,"number":17458,"title":"cmd/compile: escape analysis doesn't work for the function which has leaking params, level < 0","user":{"login":"hirochachacha","id":898442,"avatar_url":"https://avatars.githubusercontent.com/u/898442?v=3","gravatar_id":"","url":"https://api.github.com/users/hirochachacha","html_url":"https://github.com/hirochachacha","followers_url":"https://api.github.com/users/hirochachacha/followers","following_url":"https://api.github.com/users/hirochachacha/following{/other_user}","gists_url":"https://api.github.com/users/hirochachacha/gists{/gist_id}","starred_url":"https://api.github.com/users/hirochachacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hirochachacha/subscriptions","organizations_url":"https://api.github.com/users/hirochachacha/orgs","repos_url":"https://api.github.com/users/hirochachacha/repos","events_url":"https://api.github.com/users/hirochachacha/events{/privacy}","received_events_url":"https://api.github.com/users/hirochachacha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-16T00:30:40Z","updated_at":"2016-10-16T00:30:40Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n#### What did you do?\r\nIf possible, provide a recipe for reproducing the error.\r\nA complete runnable program is good.\r\nA link on play.golang.org is best.\r\n```go\r\npackage main\r\n\r\nfunc main() {\r\n\tb := []byte(\"test\")\r\n\r\n\tNewA(b)\r\n}\r\n\r\ntype A struct {\r\n\tb []byte\r\n}\r\n\r\nfunc NewA(b []byte) *A {\r\n\treturn &A{b}\r\n}\r\n```\r\n$ go build -gcflags \"-m -l\" z.go\r\n\r\n#### What did you expect to see?\r\n./z.go:4: main ([]byte)(\"test\") does not escape\r\n\r\n#### What did you see instead?\r\n./z.go:4: ([]byte)(\"test\") escapes to heap\r\n\r\n#### Does this issue reproduce with the latest release (go1.7.1)?\r\n\r\n\r\n#### System details\r\n\r\n```\r\ngo version devel +be48aa3 Fri Oct 14 23:38:29 2016 +0000 darwin/amd64\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\nGOOS=\"darwin\"\r\nGOPATH=\"/Users/hiro/.go\"\r\nGORACE=\"\"\r\nGOROOT=\"/Users/hiro/go\"\r\nGOTOOLDIR=\"/Users/hiro/go/pkg/tool/darwin_amd64\"\r\nTERM=\"dumb\"\r\nCC=\"clang\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wq/dwn8hs0x7njbzty9f68y61700000gn/T/go-build855186748=/tmp/go-build -gno-record-gcc-switches -fno-common\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\nuname -v: Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64\r\nProductName:\tMac OS X\r\nProductVersion:\t10.11.6\r\nBuildVersion:\t15G1004\r\nlldb --version: lldb-360.1.50\r\ngdb --version: GNU gdb (GDB) 7.11.1\r\n```\r\n"}}
{"actor":{"display_login":"hirochachacha"}}