{"action":"opened","number":11311,"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11311","id":45271141,"html_url":"https://github.com/cms-sw/cmssw/pull/11311","diff_url":"https://github.com/cms-sw/cmssw/pull/11311.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/11311.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11311","number":11311,"state":"open","locked":false,"title":"correctedP4 must return a copy of p4()","user":{"login":"davidlt","id":197091,"avatar_url":"https://avatars.githubusercontent.com/u/197091?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlt","html_url":"https://github.com/davidlt","followers_url":"https://api.github.com/users/davidlt/followers","following_url":"https://api.github.com/users/davidlt/following{/other_user}","gists_url":"https://api.github.com/users/davidlt/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlt/subscriptions","organizations_url":"https://api.github.com/users/davidlt/orgs","repos_url":"https://api.github.com/users/davidlt/repos","events_url":"https://api.github.com/users/davidlt/events{/privacy}","received_events_url":"https://api.github.com/users/davidlt/received_events","type":"User","site_admin":false},"body":"`correctedJet()` returns a new `Jet` object. In `correctedP4()` we\r\nreturn a reference to p4() on a stack, thus the reference is invalid and\r\nmost likely value will be changed with the next few function calls.\r\n\r\n    DataFormats/PatCandidates/interface/Jet.h:155:178: error: function\r\n    returns address of local variable [-Werror=return-local-addr]\r\n    DataFormats/PatCandidates/interface/Jet.h:158:204: error: function\r\n    returns address of local variable [-Werror=return-local-addr]\r\n\r\nA quick fix (this patch) is to make `correctedP4()` return a copy\r\ninstead of a reference.\r\n\r\nIf `correctedJet()` is on hot path, the new `Jet` object should be\r\ncached and then we could also return a reference in `correctedP4()`.\r\n\r\nSigned-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>","created_at":"2015-09-17T09:49:52Z","updated_at":"2015-09-17T09:49:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11311/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11311/comments","review_comment_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11311/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/40b6690d9cb260e24b3978168331bbe610bee8f4","head":{"label":"davidlt:fix-Jet-return-local-addr","ref":"fix-Jet-return-local-addr","sha":"40b6690d9cb260e24b3978168331bbe610bee8f4","user":{"login":"davidlt","id":197091,"avatar_url":"https://avatars.githubusercontent.com/u/197091?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlt","html_url":"https://github.com/davidlt","followers_url":"https://api.github.com/users/davidlt/followers","following_url":"https://api.github.com/users/davidlt/following{/other_user}","gists_url":"https://api.github.com/users/davidlt/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlt/subscriptions","organizations_url":"https://api.github.com/users/davidlt/orgs","repos_url":"https://api.github.com/users/davidlt/repos","events_url":"https://api.github.com/users/davidlt/events{/privacy}","received_events_url":"https://api.github.com/users/davidlt/received_events","type":"User","site_admin":false},"repo":{"id":11146704,"name":"cmssw","full_name":"davidlt/cmssw","owner":{"login":"davidlt","id":197091,"avatar_url":"https://avatars.githubusercontent.com/u/197091?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlt","html_url":"https://github.com/davidlt","followers_url":"https://api.github.com/users/davidlt/followers","following_url":"https://api.github.com/users/davidlt/following{/other_user}","gists_url":"https://api.github.com/users/davidlt/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlt/subscriptions","organizations_url":"https://api.github.com/users/davidlt/orgs","repos_url":"https://api.github.com/users/davidlt/repos","events_url":"https://api.github.com/users/davidlt/events{/privacy}","received_events_url":"https://api.github.com/users/davidlt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidlt/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/davidlt/cmssw","forks_url":"https://api.github.com/repos/davidlt/cmssw/forks","keys_url":"https://api.github.com/repos/davidlt/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidlt/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidlt/cmssw/teams","hooks_url":"https://api.github.com/repos/davidlt/cmssw/hooks","issue_events_url":"https://api.github.com/repos/davidlt/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/davidlt/cmssw/events","assignees_url":"https://api.github.com/repos/davidlt/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/davidlt/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/davidlt/cmssw/tags","blobs_url":"https://api.github.com/repos/davidlt/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidlt/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidlt/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidlt/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidlt/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/davidlt/cmssw/languages","stargazers_url":"https://api.github.com/repos/davidlt/cmssw/stargazers","contributors_url":"https://api.github.com/repos/davidlt/cmssw/contributors","subscribers_url":"https://api.github.com/repos/davidlt/cmssw/subscribers","subscription_url":"https://api.github.com/repos/davidlt/cmssw/subscription","commits_url":"https://api.github.com/repos/davidlt/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidlt/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidlt/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidlt/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidlt/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/davidlt/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidlt/cmssw/merges","archive_url":"https://api.github.com/repos/davidlt/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidlt/cmssw/downloads","issues_url":"https://api.github.com/repos/davidlt/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/davidlt/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/davidlt/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/davidlt/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidlt/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/davidlt/cmssw/releases{/id}","created_at":"2013-07-03T09:27:23Z","updated_at":"2014-06-16T11:13:12Z","pushed_at":"2015-09-17T09:48:48Z","git_url":"git://github.com/davidlt/cmssw.git","ssh_url":"git@github.com:davidlt/cmssw.git","clone_url":"https://github.com/davidlt/cmssw.git","svn_url":"https://github.com/davidlt/cmssw","homepage":"cms-sw.github.io/cmssw","size":830297,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"CMSSW_7_0_X"}},"base":{"label":"cms-sw:CMSSW_7_6_X","ref":"CMSSW_7_6_X","sha":"3fd9c445561d2ddf3e0ca165fc14ef81983365a1","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"repo":{"id":10969551,"name":"cmssw","full_name":"cms-sw/cmssw","owner":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cms-sw/cmssw","description":"CMS Offline Software","fork":false,"url":"https://api.github.com/repos/cms-sw/cmssw","forks_url":"https://api.github.com/repos/cms-sw/cmssw/forks","keys_url":"https://api.github.com/repos/cms-sw/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-sw/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-sw/cmssw/teams","hooks_url":"https://api.github.com/repos/cms-sw/cmssw/hooks","issue_events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/cms-sw/cmssw/events","assignees_url":"https://api.github.com/repos/cms-sw/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/cms-sw/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/cms-sw/cmssw/tags","blobs_url":"https://api.github.com/repos/cms-sw/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-sw/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-sw/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-sw/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-sw/cmssw/languages","stargazers_url":"https://api.github.com/repos/cms-sw/cmssw/stargazers","contributors_url":"https://api.github.com/repos/cms-sw/cmssw/contributors","subscribers_url":"https://api.github.com/repos/cms-sw/cmssw/subscribers","subscription_url":"https://api.github.com/repos/cms-sw/cmssw/subscription","commits_url":"https://api.github.com/repos/cms-sw/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-sw/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-sw/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/cms-sw/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-sw/cmssw/merges","archive_url":"https://api.github.com/repos/cms-sw/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-sw/cmssw/downloads","issues_url":"https://api.github.com/repos/cms-sw/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/cms-sw/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-sw/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-sw/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-sw/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/cms-sw/cmssw/releases{/id}","created_at":"2013-06-26T14:09:07Z","updated_at":"2015-09-17T06:23:51Z","pushed_at":"2015-09-17T09:49:28Z","git_url":"git://github.com/cms-sw/cmssw.git","ssh_url":"git@github.com:cms-sw/cmssw.git","clone_url":"https://github.com/cms-sw/cmssw.git","svn_url":"https://github.com/cms-sw/cmssw","homepage":"http://cms-sw.github.io/","size":1288100,"stargazers_count":260,"watchers_count":260,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1559,"mirror_url":null,"open_issues_count":225,"forks":1559,"open_issues":225,"watchers":260,"default_branch":"CMSSW_7_6_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11311"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/11311"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/11311"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/11311/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11311/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11311/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/40b6690d9cb260e24b3978168331bbe610bee8f4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}