{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/glow/issues/1493","repository_url":"https://api.github.com/repos/pytorch/glow","labels_url":"https://api.github.com/repos/pytorch/glow/issues/1493/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/glow/issues/1493/comments","events_url":"https://api.github.com/repos/pytorch/glow/issues/1493/events","html_url":"https://github.com/pytorch/glow/pull/1493","id":352485253,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5Nzg0MTQw","number":1493,"title":"Prevent getInputName() from returning a dangling pointer","user":{"login":"boncheolgu","id":32979551,"node_id":"MDQ6VXNlcjMyOTc5NTUx","avatar_url":"https://avatars1.githubusercontent.com/u/32979551?v=4","gravatar_id":"","url":"https://api.github.com/users/boncheolgu","html_url":"https://github.com/boncheolgu","followers_url":"https://api.github.com/users/boncheolgu/followers","following_url":"https://api.github.com/users/boncheolgu/following{/other_user}","gists_url":"https://api.github.com/users/boncheolgu/gists{/gist_id}","starred_url":"https://api.github.com/users/boncheolgu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boncheolgu/subscriptions","organizations_url":"https://api.github.com/users/boncheolgu/orgs","repos_url":"https://api.github.com/users/boncheolgu/repos","events_url":"https://api.github.com/users/boncheolgu/events{/privacy}","received_events_url":"https://api.github.com/users/boncheolgu/received_events","type":"User","site_admin":false},"labels":[{"id":706497924,"node_id":"MDU6TGFiZWw3MDY0OTc5MjQ=","url":"https://api.github.com/repos/pytorch/glow/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-21T10:48:04Z","updated_at":"2018-08-21T20:14:44Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pytorch/glow/pulls/1493","html_url":"https://github.com/pytorch/glow/pull/1493","diff_url":"https://github.com/pytorch/glow/pull/1493.diff","patch_url":"https://github.com/pytorch/glow/pull/1493.patch"},"body":"fixes #1492 \r\n\r\nThis will generate the following:\r\n```\r\nllvm::StringRef ConcatNode::getInputName(unsigned idx) const {\r\n  idx -= 0;\r\n  static std::vector<std::string> names;\r\n  if (idx < Inputs_.size()) {\r\n    while (idx >= names.size()) {\r\n      names.push_back(\"Inputs\" + std::to_string(names.size()));\r\n    }\r\n    return names[idx];\r\n  }\r\n  idx -= Inputs_.size();\r\n  llvm_unreachable(\"Invalid index\");\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/pytorch/glow/issues/comments/414806659","html_url":"https://github.com/pytorch/glow/pull/1493#issuecomment-414806659","issue_url":"https://api.github.com/repos/pytorch/glow/issues/1493","id":414806659,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDgwNjY1OQ==","user":{"login":"nadavrot","id":8635342,"node_id":"MDQ6VXNlcjg2MzUzNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/8635342?v=4","gravatar_id":"","url":"https://api.github.com/users/nadavrot","html_url":"https://github.com/nadavrot","followers_url":"https://api.github.com/users/nadavrot/followers","following_url":"https://api.github.com/users/nadavrot/following{/other_user}","gists_url":"https://api.github.com/users/nadavrot/gists{/gist_id}","starred_url":"https://api.github.com/users/nadavrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadavrot/subscriptions","organizations_url":"https://api.github.com/users/nadavrot/orgs","repos_url":"https://api.github.com/users/nadavrot/repos","events_url":"https://api.github.com/users/nadavrot/events{/privacy}","received_events_url":"https://api.github.com/users/nadavrot/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T20:14:44Z","updated_at":"2018-08-21T20:14:44Z","author_association":"CONTRIBUTOR","body":"oops, I am sorry. @rdzhabarov and @opti-mix pointed out that the vector is static, which means that this PR is correct. \r\n\r\nI wonder, would it be better to just return std::string?"}}
{"actor":{"display_login":"nadavrot"}}