{"action":"created","comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/224274470","pull_request_review_id":163601795,"id":224274470,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDI3NDQ3MA==","diff_hunk":"@@ -624,26 +624,37 @@ static void *rxm_conn_eq_read(void *arg)\n static void *rxm_conn_progress(void *arg)\n {\n \tstruct rxm_ep *rxm_ep = container_of(arg, struct rxm_ep, util_ep);\n-\tstruct rxm_msg_eq_entry entry;\n+\tstruct rxm_msg_eq_entry *entry;\n \tint ret;\n \n+\tentry = calloc(1, RXM_MSG_EQ_ENTRY_SZ);\n+\tif (!entry) {\n+\t\tFI_WARN(&rxm_prov, FI_LOG_EP_CTRL,\n+\t\t\t\"Unable to allocate memory!\\n\");\n+\t\treturn NULL;\n+\t}\n \tFI_DBG(&rxm_prov, FI_LOG_EP_CTRL, \"Starting conn event handler\\n\");\n+\n \twhile (1) {\n-\t\tmemset(&entry, 0, sizeof(entry));\n-\t\tentry.rd = rxm_eq_sread(rxm_ep, RXM_CM_ENTRY_SZ, &entry);\n-\t\tif (entry.rd < 0 && entry.rd != -FI_ECONNREFUSED)\n-\t\t\treturn NULL;\n+\t\tentry->rd = rxm_eq_sread(rxm_ep, RXM_CM_ENTRY_SZ, entry);\n+\t\tif (entry->rd < 0 && entry->rd != -FI_ECONNREFUSED)\n+\t\t\tgoto exit;\n \n-\t\tif (entry.event == FI_NOTIFY &&\n+\t\tif (entry->event == FI_NOTIFY &&\n \t\t    (enum ofi_cmap_signal)((struct fi_eq_entry *)\n-\t\t\t\t\t   &entry.cm_entry)->data == OFI_CMAP_EXIT) {\n-\t\t\tFI_DBG(&rxm_prov, FI_LOG_EP_CTRL, \"Closing CM thread\\n\");\n-\t\t\treturn NULL;\n+\t\t\t\t\t   &entry->cm_entry)->data == OFI_CMAP_EXIT) {\n+\t\t\tFI_DBG(&rxm_prov, FI_LOG_EP_CTRL,\n+\t\t\t       \"Closing CM thread\\n\");\n+\t\t\tgoto exit;\n \t\t}\n-\t\tret = rxm_conn_handle_event(rxm_ep, &entry);\n+\t\tret = rxm_conn_handle_event(rxm_ep, entry);\n \t\tif (ret)\n-\t\t\treturn NULL;\n+\t\t\tgoto exit;\n+\t\tmemset(entry, 0, RXM_MSG_EQ_ENTRY_SZ);","path":"prov/rxm/src/rxm_conn.c","position":41,"original_position":41,"commit_id":"f2de81e70cc2d596172b13c337a5a163cb0c3a8e","original_commit_id":"f2de81e70cc2d596172b13c337a5a163cb0c3a8e","user":{"login":"shefty","id":3967608,"node_id":"MDQ6VXNlcjM5Njc2MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3967608?v=4","gravatar_id":"","url":"https://api.github.com/users/shefty","html_url":"https://github.com/shefty","followers_url":"https://api.github.com/users/shefty/followers","following_url":"https://api.github.com/users/shefty/following{/other_user}","gists_url":"https://api.github.com/users/shefty/gists{/gist_id}","starred_url":"https://api.github.com/users/shefty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shefty/subscriptions","organizations_url":"https://api.github.com/users/shefty/orgs","repos_url":"https://api.github.com/users/shefty/repos","events_url":"https://api.github.com/users/shefty/events{/privacy}","received_events_url":"https://api.github.com/users/shefty/received_events","type":"User","site_admin":false},"body":"I know the original code did a memset to 0, but why? Are we not trusting sread() to be correct?","created_at":"2018-10-10T23:36:19Z","updated_at":"2018-10-10T23:36:54Z","html_url":"https://github.com/ofiwg/libfabric/pull/4513#discussion_r224274470","pull_request_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/224274470"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/4513#discussion_r224274470"},"pull_request":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513"}}},"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513","id":221960646,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxOTYwNjQ2","html_url":"https://github.com/ofiwg/libfabric/pull/4513","diff_url":"https://github.com/ofiwg/libfabric/pull/4513.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/4513.patch","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/4513","number":4513,"state":"open","locked":false,"title":"prov/rxm: bugfix - stack corruption in in rxm_conn_progress (#33)","user":{"login":"swelch","id":7690298,"node_id":"MDQ6VXNlcjc2OTAyOTg=","avatar_url":"https://avatars0.githubusercontent.com/u/7690298?v=4","gravatar_id":"","url":"https://api.github.com/users/swelch","html_url":"https://github.com/swelch","followers_url":"https://api.github.com/users/swelch/followers","following_url":"https://api.github.com/users/swelch/following{/other_user}","gists_url":"https://api.github.com/users/swelch/gists{/gist_id}","starred_url":"https://api.github.com/users/swelch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swelch/subscriptions","organizations_url":"https://api.github.com/users/swelch/orgs","repos_url":"https://api.github.com/users/swelch/repos","events_url":"https://api.github.com/users/swelch/events{/privacy}","received_events_url":"https://api.github.com/users/swelch/received_events","type":"User","site_admin":false},"body":"@dmitrygladkov @a-ilango this addresses issue #4512\r\nI was seeing stack smashing with OSU benchmarks at termination. This makes sure space\r\nis allocated for the RXM connection data, the structure \"entry\" allocated on the stack\r\ndid not include space for RXM connection data. This was problem is first seen\r\nin commit: 632421e.\r\n\r\nSigned-off-by: Steve Welch <swelch@systemfabricworks.com>","created_at":"2018-10-10T23:10:24Z","updated_at":"2018-10-10T23:36:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a239e7bfabf7381361d616ea5384817e350cc805","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513/commits","review_comments_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513/comments","review_comment_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/4513/comments","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/f2de81e70cc2d596172b13c337a5a163cb0c3a8e","head":{"label":"SystemFabricWorks:fix/rxm_stack_smash","ref":"fix/rxm_stack_smash","sha":"f2de81e70cc2d596172b13c337a5a163cb0c3a8e","user":{"login":"SystemFabricWorks","id":7690024,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTAwMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7690024?v=4","gravatar_id":"","url":"https://api.github.com/users/SystemFabricWorks","html_url":"https://github.com/SystemFabricWorks","followers_url":"https://api.github.com/users/SystemFabricWorks/followers","following_url":"https://api.github.com/users/SystemFabricWorks/following{/other_user}","gists_url":"https://api.github.com/users/SystemFabricWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/SystemFabricWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SystemFabricWorks/subscriptions","organizations_url":"https://api.github.com/users/SystemFabricWorks/orgs","repos_url":"https://api.github.com/users/SystemFabricWorks/repos","events_url":"https://api.github.com/users/SystemFabricWorks/events{/privacy}","received_events_url":"https://api.github.com/users/SystemFabricWorks/received_events","type":"Organization","site_admin":false},"repo":{"id":132017100,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIwMTcxMDA=","name":"libfabric","full_name":"SystemFabricWorks/libfabric","private":false,"owner":{"login":"SystemFabricWorks","id":7690024,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTAwMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7690024?v=4","gravatar_id":"","url":"https://api.github.com/users/SystemFabricWorks","html_url":"https://github.com/SystemFabricWorks","followers_url":"https://api.github.com/users/SystemFabricWorks/followers","following_url":"https://api.github.com/users/SystemFabricWorks/following{/other_user}","gists_url":"https://api.github.com/users/SystemFabricWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/SystemFabricWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SystemFabricWorks/subscriptions","organizations_url":"https://api.github.com/users/SystemFabricWorks/orgs","repos_url":"https://api.github.com/users/SystemFabricWorks/repos","events_url":"https://api.github.com/users/SystemFabricWorks/events{/privacy}","received_events_url":"https://api.github.com/users/SystemFabricWorks/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SystemFabricWorks/libfabric","description":"SFW OFI Libfabric work (staging area)","fork":true,"url":"https://api.github.com/repos/SystemFabricWorks/libfabric","forks_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/forks","keys_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/teams","hooks_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/hooks","issue_events_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/events","assignees_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/tags","blobs_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/languages","stargazers_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/stargazers","contributors_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/contributors","subscribers_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/subscribers","subscription_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/subscription","commits_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/merges","archive_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/downloads","issues_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/SystemFabricWorks/libfabric/deployments","created_at":"2018-05-03T15:45:38Z","updated_at":"2018-10-10T05:29:13Z","pushed_at":"2018-10-10T22:57:55Z","git_url":"git://github.com/SystemFabricWorks/libfabric.git","ssh_url":"git@github.com:SystemFabricWorks/libfabric.git","clone_url":"https://github.com/SystemFabricWorks/libfabric.git","svn_url":"https://github.com/SystemFabricWorks/libfabric","homepage":"http://libfabric.org/","size":22641,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ofiwg:master","ref":"master","sha":"f5d7d100b77d98d7e0aeeb240cb25b4a76963b8e","user":{"login":"ofiwg","id":8459445,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0NTk0NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/8459445?v=4","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"repo":{"id":22996097,"node_id":"MDEwOlJlcG9zaXRvcnkyMjk5NjA5Nw==","name":"libfabric","full_name":"ofiwg/libfabric","private":false,"owner":{"login":"ofiwg","id":8459445,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0NTk0NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/8459445?v=4","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ofiwg/libfabric","description":"Open Fabric Interfaces","fork":false,"url":"https://api.github.com/repos/ofiwg/libfabric","forks_url":"https://api.github.com/repos/ofiwg/libfabric/forks","keys_url":"https://api.github.com/repos/ofiwg/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ofiwg/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ofiwg/libfabric/teams","hooks_url":"https://api.github.com/repos/ofiwg/libfabric/hooks","issue_events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/ofiwg/libfabric/events","assignees_url":"https://api.github.com/repos/ofiwg/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/ofiwg/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/ofiwg/libfabric/tags","blobs_url":"https://api.github.com/repos/ofiwg/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ofiwg/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ofiwg/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/ofiwg/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/ofiwg/libfabric/languages","stargazers_url":"https://api.github.com/repos/ofiwg/libfabric/stargazers","contributors_url":"https://api.github.com/repos/ofiwg/libfabric/contributors","subscribers_url":"https://api.github.com/repos/ofiwg/libfabric/subscribers","subscription_url":"https://api.github.com/repos/ofiwg/libfabric/subscription","commits_url":"https://api.github.com/repos/ofiwg/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/ofiwg/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/ofiwg/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/ofiwg/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ofiwg/libfabric/merges","archive_url":"https://api.github.com/repos/ofiwg/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ofiwg/libfabric/downloads","issues_url":"https://api.github.com/repos/ofiwg/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/ofiwg/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/ofiwg/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/ofiwg/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ofiwg/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/ofiwg/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/ofiwg/libfabric/deployments","created_at":"2014-08-15T16:45:53Z","updated_at":"2018-10-10T23:01:16Z","pushed_at":"2018-10-10T23:10:25Z","git_url":"git://github.com/ofiwg/libfabric.git","ssh_url":"git@github.com:ofiwg/libfabric.git","clone_url":"https://github.com/ofiwg/libfabric.git","svn_url":"https://github.com/ofiwg/libfabric","homepage":"http://libfabric.org/","size":22796,"stargazers_count":159,"watchers_count":159,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":150,"mirror_url":null,"archived":false,"open_issues_count":130,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":150,"open_issues":130,"watchers":159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/4513"},"issue":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/4513"},"comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/4513/comments"},"review_comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513/comments"},"review_comment":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/4513/commits"},"statuses":{"href":"https://api.github.com/repos/ofiwg/libfabric/statuses/f2de81e70cc2d596172b13c337a5a163cb0c3a8e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shefty"}}