{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/51130275","id":51130275,"diff_hunk":"@@ -20846,7 +20846,7 @@ GlobOpt::EmitMemop(Loop * loop, LoopCount *loopCount, const MemOpEmitData* emitD\n         IR::RegOpnd *srcIndexOpnd = nullptr;\n         IRType srcType;\n         GetMemOpSrcInfo(loop, data->ldElemInstr, srcBaseOpnd, srcIndexOpnd, srcType);\n-        Assert(GetVarSymID(srcIndexOpnd->GetStackSym()) == GetVarSymID(srcIndexOpnd->GetStackSym()));\n+        Assert(GetVarSymID(srcIndexOpnd->GetStackSym()) == GetVarSymID(indexOpnd->GetStackSym()));","path":"lib/Backend/GlobOpt.cpp","position":23,"original_position":23,"commit_id":"8d36f95cad0c655db50e0ec9612b4e6d2a602433","original_commit_id":"8d36f95cad0c655db50e0ec9612b4e6d2a602433","user":{"login":"abchatra","id":6107272,"avatar_url":"https://avatars.githubusercontent.com/u/6107272?v=3","gravatar_id":"","url":"https://api.github.com/users/abchatra","html_url":"https://github.com/abchatra","followers_url":"https://api.github.com/users/abchatra/followers","following_url":"https://api.github.com/users/abchatra/following{/other_user}","gists_url":"https://api.github.com/users/abchatra/gists{/gist_id}","starred_url":"https://api.github.com/users/abchatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abchatra/subscriptions","organizations_url":"https://api.github.com/users/abchatra/orgs","repos_url":"https://api.github.com/users/abchatra/repos","events_url":"https://api.github.com/users/abchatra/events{/privacy}","received_events_url":"https://api.github.com/users/abchatra/received_events","type":"User","site_admin":false},"body":"Thanks. I will run a quick ExprGen run before merging this change. ","created_at":"2016-01-28T14:43:55Z","updated_at":"2016-01-28T14:43:55Z","html_url":"https://github.com/Microsoft/ChakraCore/pull/207#discussion_r51130275","pull_request_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/51130275"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/207#discussion_r51130275"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207","id":57373976,"html_url":"https://github.com/Microsoft/ChakraCore/pull/207","diff_url":"https://github.com/Microsoft/ChakraCore/pull/207.diff","patch_url":"https://github.com/Microsoft/ChakraCore/pull/207.patch","issue_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/207","number":207,"state":"open","locked":false,"title":"Fix static analysis issues reported by PVS-Studio","user":{"login":"abchatra","id":6107272,"avatar_url":"https://avatars.githubusercontent.com/u/6107272?v=3","gravatar_id":"","url":"https://api.github.com/users/abchatra","html_url":"https://github.com/abchatra","followers_url":"https://api.github.com/users/abchatra/followers","following_url":"https://api.github.com/users/abchatra/following{/other_user}","gists_url":"https://api.github.com/users/abchatra/gists{/gist_id}","starred_url":"https://api.github.com/users/abchatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abchatra/subscriptions","organizations_url":"https://api.github.com/users/abchatra/orgs","repos_url":"https://api.github.com/users/abchatra/repos","events_url":"https://api.github.com/users/abchatra/events{/privacy}","received_events_url":"https://api.github.com/users/abchatra/received_events","type":"User","site_admin":false},"body":"This PR fixes the issues reported in https://github.com/Microsoft/ChakraCore/issues/177\r\n\r\nFollowing two are bug with ChakraCore:\r\n* There are identical sub-expressions 'this->propId == Js::PropertyIds::_superReferenceSymbol' to the left and to the right of the '||' operator Comment: This is a bug. The superCtorReferenceSymbol is misspelled (201fa36)\r\n* The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence (16b407b)\r\n\r\nFollowing two are bug with test driver which runs ChakraCore:\r\n* Array overrun is possible. Comments:  This is in test code rl.exe not in shipping ChakraCore or Chakra.dll (9765e7c)\r\n* Consider inspecting the 'sub[i] != '-' && sub[i] == '/'' expression. The expression is excessive or contains a misprint. rl.cpp (9765e7c)\r\n\r\nFollowing are incorrect asserts with no product impact:\r\n* There are identical sub-expressions 'GetVarSymID(srcIndexOpnd->GetStackSym())' to the left and to the right of the '==' operator (ec8d276)\r\n* Expression 'srcIndex - src->left >= 0' is always true. Unsigned type value is always >= 0. (5e8716b)\r\n* Expression 'callSiteId >= 0' is always true. (723d946)\r\n* Expression is always true. Probably the '&&' operator should be used here. *I haven't fix this assert in ByteCodeGenerator::AssignRegister as it seem to hit in unittest. I will open a issue for the same.*\r\n\r\nFollowing are not  bugs as they are mostly redudant checks. Good to fix from code hygiene perspective:\r\n* Undefined behavior. Check the shift operator '<<'. The left operand '-1' is negative. ( 8d36f95)\r\n* The 'this->isInlined' variable is assigned to itself. (ab04762)\r\n* The pointer scriptContext was utilized in the logical expression before it was verified against nullptr in the same logical expression. (3252d0d)\r\n* The 'symDst' pointer was utilized before it was verified against nullptr. (4cb0212)\r\n* The 'm_lastInstr' pointer was utilized before it was verified against nullptr. (54c6ccb)\r\n* The 'src2Val' pointer was utilized before it was verified against nullptr. (9ade8e3)\r\n* The 'instrLd' pointer was utilized before it was verified against nullptr (Added an assert) (73d8aea)\r\n* The 'pMembersList' pointer was utilized before it was verified against nullptr. (201fa36)\r\n\r\nFollowing are not bugs and I haven't fixed them either\r\n* The object was created but it is not being used. If you wish to call constructor, 'this->StringCopyInfo::StringCopyInfo(....)' should be used   *This function is unused but required for avoiding errors in the linker due to force-inline. See comments in the function.*\r\n* The 'walkerRef' pointer was utilized before it was verified against nullptr. *Guaranteed to be non-null if walker is initialized*\r\n* The 'block->loop' pointer was utilized before it was verified against nullptr. *Control flow gauranees block->loop to be non-null. The block->isLoopHeader is checked rightly before accessing the block->loop.*  ","created_at":"2016-01-27T15:20:27Z","updated_at":"2016-01-28T14:43:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24747a84b11b486fdb992185e57913af61c4b2bc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207/commits","review_comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207/comments","review_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/207/comments","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/8d36f95cad0c655db50e0ec9612b4e6d2a602433","head":{"label":"abchatra:prefast1","ref":"prefast1","sha":"8d36f95cad0c655db50e0ec9612b4e6d2a602433","user":{"login":"abchatra","id":6107272,"avatar_url":"https://avatars.githubusercontent.com/u/6107272?v=3","gravatar_id":"","url":"https://api.github.com/users/abchatra","html_url":"https://github.com/abchatra","followers_url":"https://api.github.com/users/abchatra/followers","following_url":"https://api.github.com/users/abchatra/following{/other_user}","gists_url":"https://api.github.com/users/abchatra/gists{/gist_id}","starred_url":"https://api.github.com/users/abchatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abchatra/subscriptions","organizations_url":"https://api.github.com/users/abchatra/orgs","repos_url":"https://api.github.com/users/abchatra/repos","events_url":"https://api.github.com/users/abchatra/events{/privacy}","received_events_url":"https://api.github.com/users/abchatra/received_events","type":"User","site_admin":false},"repo":{"id":49750145,"name":"ChakraCore","full_name":"abchatra/ChakraCore","owner":{"login":"abchatra","id":6107272,"avatar_url":"https://avatars.githubusercontent.com/u/6107272?v=3","gravatar_id":"","url":"https://api.github.com/users/abchatra","html_url":"https://github.com/abchatra","followers_url":"https://api.github.com/users/abchatra/followers","following_url":"https://api.github.com/users/abchatra/following{/other_user}","gists_url":"https://api.github.com/users/abchatra/gists{/gist_id}","starred_url":"https://api.github.com/users/abchatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abchatra/subscriptions","organizations_url":"https://api.github.com/users/abchatra/orgs","repos_url":"https://api.github.com/users/abchatra/repos","events_url":"https://api.github.com/users/abchatra/events{/privacy}","received_events_url":"https://api.github.com/users/abchatra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abchatra/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":true,"url":"https://api.github.com/repos/abchatra/ChakraCore","forks_url":"https://api.github.com/repos/abchatra/ChakraCore/forks","keys_url":"https://api.github.com/repos/abchatra/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abchatra/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abchatra/ChakraCore/teams","hooks_url":"https://api.github.com/repos/abchatra/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/abchatra/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/abchatra/ChakraCore/events","assignees_url":"https://api.github.com/repos/abchatra/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/abchatra/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/abchatra/ChakraCore/tags","blobs_url":"https://api.github.com/repos/abchatra/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abchatra/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abchatra/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/abchatra/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abchatra/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/abchatra/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/abchatra/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/abchatra/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/abchatra/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/abchatra/ChakraCore/subscription","commits_url":"https://api.github.com/repos/abchatra/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/abchatra/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/abchatra/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/abchatra/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/abchatra/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/abchatra/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abchatra/ChakraCore/merges","archive_url":"https://api.github.com/repos/abchatra/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abchatra/ChakraCore/downloads","issues_url":"https://api.github.com/repos/abchatra/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/abchatra/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/abchatra/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/abchatra/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abchatra/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/abchatra/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/abchatra/ChakraCore/deployments","created_at":"2016-01-15T23:13:45Z","updated_at":"2016-01-15T23:14:01Z","pushed_at":"2016-01-27T15:20:27Z","git_url":"git://github.com/abchatra/ChakraCore.git","ssh_url":"git@github.com:abchatra/ChakraCore.git","clone_url":"https://github.com/abchatra/ChakraCore.git","svn_url":"https://github.com/abchatra/ChakraCore","homepage":null,"size":17014,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"Microsoft:master","ref":"master","sha":"4a5d96b63edfe6055e8bec0895d8f5b2733504d6","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":49086513,"name":"ChakraCore","full_name":"Microsoft/ChakraCore","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":false,"url":"https://api.github.com/repos/Microsoft/ChakraCore","forks_url":"https://api.github.com/repos/Microsoft/ChakraCore/forks","keys_url":"https://api.github.com/repos/Microsoft/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/ChakraCore/teams","hooks_url":"https://api.github.com/repos/Microsoft/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/ChakraCore/events","assignees_url":"https://api.github.com/repos/Microsoft/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/ChakraCore/tags","blobs_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/Microsoft/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/ChakraCore/subscription","commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/ChakraCore/merges","archive_url":"https://api.github.com/repos/Microsoft/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/ChakraCore/downloads","issues_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/ChakraCore/deployments","created_at":"2016-01-05T19:05:31Z","updated_at":"2016-01-28T14:34:34Z","pushed_at":"2016-01-28T10:28:18Z","git_url":"git://github.com/Microsoft/ChakraCore.git","ssh_url":"git@github.com:Microsoft/ChakraCore.git","clone_url":"https://github.com/Microsoft/ChakraCore.git","svn_url":"https://github.com/Microsoft/ChakraCore","homepage":null,"size":17321,"stargazers_count":4690,"watchers_count":4690,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":449,"mirror_url":null,"open_issues_count":65,"forks":449,"open_issues":65,"watchers":4690,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/207"},"issue":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/207"},"comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/8d36f95cad0c655db50e0ec9612b4e6d2a602433"}}}}