{"action":"created","comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/62714559","id":62714559,"diff_hunk":"@@ -161,24 +163,41 @@ ssize_t sock_ep_tx_atomic(struct fid_ep *ep,\n \tif (flags & FI_REMOTE_CQ_DATA)\n \t\tsock_tx_ctx_write(tx_ctx, &msg->data, sizeof(uint64_t));\n \n-\tsrc_len = 0;\n+\tsrc_len = dst_len = 0;\n \tif (flags & FI_INJECT) {\n \t\tfor (i = 0; i < msg->iov_count; i++) {\n \t\t\tsock_tx_ctx_write(tx_ctx, msg->msg_iov[i].addr,\n \t\t\t\t\t  msg->msg_iov[i].count * datatype_sz);\n \t\t\tsrc_len += (msg->msg_iov[i].count * datatype_sz);\n \t\t}\n+\t\tfor (i = 0; i < compare_count; i++) {","path":"prov/sockets/src/sock_atomic.c","position":43,"original_position":43,"commit_id":"8a3c33fbbd3d1a31f5491c2141d034520b648b92","original_commit_id":"8a3c33fbbd3d1a31f5491c2141d034520b648b92","user":{"login":"shantonu","id":1229120,"avatar_url":"https://avatars.githubusercontent.com/u/1229120?v=3","gravatar_id":"","url":"https://api.github.com/users/shantonu","html_url":"https://github.com/shantonu","followers_url":"https://api.github.com/users/shantonu/followers","following_url":"https://api.github.com/users/shantonu/following{/other_user}","gists_url":"https://api.github.com/users/shantonu/gists{/gist_id}","starred_url":"https://api.github.com/users/shantonu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantonu/subscriptions","organizations_url":"https://api.github.com/users/shantonu/orgs","repos_url":"https://api.github.com/users/shantonu/repos","events_url":"https://api.github.com/users/shantonu/events{/privacy}","received_events_url":"https://api.github.com/users/shantonu/received_events","type":"User","site_admin":false},"body":"I have changed the processing part as well. I grouped the ringbuffer copy/read in the same place as otherwise another check is needed for compare data.","created_at":"2016-05-10T17:23:54Z","updated_at":"2016-05-10T17:23:54Z","html_url":"https://github.com/ofiwg/libfabric/pull/2016#discussion_r62714559","pull_request_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016","_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/62714559"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/2016#discussion_r62714559"},"pull_request":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016"}}},"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016","id":69428558,"html_url":"https://github.com/ofiwg/libfabric/pull/2016","diff_url":"https://github.com/ofiwg/libfabric/pull/2016.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/2016.patch","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2016","number":2016,"state":"open","locked":false,"title":"prov/sockets: Fix compare buffer bug in fi_compare_atomic","user":{"login":"shantonu","id":1229120,"avatar_url":"https://avatars.githubusercontent.com/u/1229120?v=3","gravatar_id":"","url":"https://api.github.com/users/shantonu","html_url":"https://github.com/shantonu","followers_url":"https://api.github.com/users/shantonu/followers","following_url":"https://api.github.com/users/shantonu/following{/other_user}","gists_url":"https://api.github.com/users/shantonu/gists{/gist_id}","starred_url":"https://api.github.com/users/shantonu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantonu/subscriptions","organizations_url":"https://api.github.com/users/shantonu/orgs","repos_url":"https://api.github.com/users/shantonu/repos","events_url":"https://api.github.com/users/shantonu/events{/privacy}","received_events_url":"https://api.github.com/users/shantonu/received_events","type":"User","site_admin":false},"body":"When <code>FI_INJECT</code> is set as a flag in <code>fi_compare_atomic</code>, the compare data was not being copied to the internal buffer. This should fix #1959.\r\n\r\n@jithinjosepkl\r\nSigned-off-by: Shantonu Hossain <shantonu.hossain@intel.com>","created_at":"2016-05-09T23:40:08Z","updated_at":"2016-05-10T17:23:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f42d6c8bf1ac63cd02c6d62a87ee565e46b618c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016/commits","review_comments_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016/comments","review_comment_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2016/comments","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/8a3c33fbbd3d1a31f5491c2141d034520b648b92","head":{"label":"shantonu:pr/sockets-compbuf","ref":"pr/sockets-compbuf","sha":"8a3c33fbbd3d1a31f5491c2141d034520b648b92","user":{"login":"shantonu","id":1229120,"avatar_url":"https://avatars.githubusercontent.com/u/1229120?v=3","gravatar_id":"","url":"https://api.github.com/users/shantonu","html_url":"https://github.com/shantonu","followers_url":"https://api.github.com/users/shantonu/followers","following_url":"https://api.github.com/users/shantonu/following{/other_user}","gists_url":"https://api.github.com/users/shantonu/gists{/gist_id}","starred_url":"https://api.github.com/users/shantonu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantonu/subscriptions","organizations_url":"https://api.github.com/users/shantonu/orgs","repos_url":"https://api.github.com/users/shantonu/repos","events_url":"https://api.github.com/users/shantonu/events{/privacy}","received_events_url":"https://api.github.com/users/shantonu/received_events","type":"User","site_admin":false},"repo":{"id":31289769,"name":"libfabric","full_name":"shantonu/libfabric","owner":{"login":"shantonu","id":1229120,"avatar_url":"https://avatars.githubusercontent.com/u/1229120?v=3","gravatar_id":"","url":"https://api.github.com/users/shantonu","html_url":"https://github.com/shantonu","followers_url":"https://api.github.com/users/shantonu/followers","following_url":"https://api.github.com/users/shantonu/following{/other_user}","gists_url":"https://api.github.com/users/shantonu/gists{/gist_id}","starred_url":"https://api.github.com/users/shantonu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantonu/subscriptions","organizations_url":"https://api.github.com/users/shantonu/orgs","repos_url":"https://api.github.com/users/shantonu/repos","events_url":"https://api.github.com/users/shantonu/events{/privacy}","received_events_url":"https://api.github.com/users/shantonu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shantonu/libfabric","description":"Open Fabric Interfaces","fork":true,"url":"https://api.github.com/repos/shantonu/libfabric","forks_url":"https://api.github.com/repos/shantonu/libfabric/forks","keys_url":"https://api.github.com/repos/shantonu/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shantonu/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shantonu/libfabric/teams","hooks_url":"https://api.github.com/repos/shantonu/libfabric/hooks","issue_events_url":"https://api.github.com/repos/shantonu/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/shantonu/libfabric/events","assignees_url":"https://api.github.com/repos/shantonu/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/shantonu/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/shantonu/libfabric/tags","blobs_url":"https://api.github.com/repos/shantonu/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shantonu/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shantonu/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/shantonu/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shantonu/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/shantonu/libfabric/languages","stargazers_url":"https://api.github.com/repos/shantonu/libfabric/stargazers","contributors_url":"https://api.github.com/repos/shantonu/libfabric/contributors","subscribers_url":"https://api.github.com/repos/shantonu/libfabric/subscribers","subscription_url":"https://api.github.com/repos/shantonu/libfabric/subscription","commits_url":"https://api.github.com/repos/shantonu/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/shantonu/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/shantonu/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/shantonu/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/shantonu/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/shantonu/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shantonu/libfabric/merges","archive_url":"https://api.github.com/repos/shantonu/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shantonu/libfabric/downloads","issues_url":"https://api.github.com/repos/shantonu/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/shantonu/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/shantonu/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/shantonu/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shantonu/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/shantonu/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/shantonu/libfabric/deployments","created_at":"2015-02-25T00:40:49Z","updated_at":"2016-01-20T18:54:55Z","pushed_at":"2016-05-10T01:40:36Z","git_url":"git://github.com/shantonu/libfabric.git","ssh_url":"git@github.com:shantonu/libfabric.git","clone_url":"https://github.com/shantonu/libfabric.git","svn_url":"https://github.com/shantonu/libfabric","homepage":"http://ofiwg.github.io/libfabric/","size":10693,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ofiwg:master","ref":"master","sha":"0d4272cc72a93f399351eefb86645d1f5cbcca22","user":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","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,"name":"libfabric","full_name":"ofiwg/libfabric","owner":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","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},"private":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":"2016-04-14T15:34:09Z","pushed_at":"2016-05-10T16:51:30Z","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://ofiwg.github.io/libfabric/","size":12001,"stargazers_count":67,"watchers_count":67,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":75,"forks":65,"open_issues":75,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/2016"},"issue":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/2016"},"comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/2016/comments"},"review_comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016/comments"},"review_comment":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/2016/commits"},"statuses":{"href":"https://api.github.com/repos/ofiwg/libfabric/statuses/8a3c33fbbd3d1a31f5491c2141d034520b648b92"}}}}