{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/socorro/pulls/comments/93492602","pull_request_review_id":14021833,"id":93492602,"diff_hunk":"@@ -795,6 +795,35 @@ static string stripquotes(const string& s) {\n   return s;\n }\n \n+static string trim(const string& s) {\n+  size_t first = s.find_first_not_of(\" \\t\");\n+  if (first == string::npos) {\n+    first = 0;\n+  }\n+\n+  size_t last = s.find_last_not_of(\" \\t\");\n+  if (last == string::npos) {\n+    last = s.length();\n+  }\n+\n+  return s.substr(first, last);\n+}\n+\n+static void ConvertCPUInfoToJSON(const string& cpuinfo,\n+                                 Json::Value& root) {\n+  for (string& line : split(cpuinfo, '\\n')) {\n+    vector<string> bits = split(line, ':');\n+    if (bits.size() != 2 || !startswith(bits[0], \"microcode\")) {\n+        continue;\n+    }\n+\n+    try {\n+        root[\"system_info\"][\"cpu_microcode_version\"] = static_cast<Json::UInt>(std::stoi(trim(bits[1]), 0, 0));","path":"minidump-stackwalk/stackwalker.cc","position":35,"original_position":27,"commit_id":"bd6ef98a790da82ff8c2a7168ade045ccfe05242","original_commit_id":"74bc160f9acafaf24f33cf3eea1fbcdace0c9b87","user":{"login":"luser","id":286001,"avatar_url":"https://avatars.githubusercontent.com/u/286001?v=3","gravatar_id":"","url":"https://api.github.com/users/luser","html_url":"https://github.com/luser","followers_url":"https://api.github.com/users/luser/followers","following_url":"https://api.github.com/users/luser/following{/other_user}","gists_url":"https://api.github.com/users/luser/gists{/gist_id}","starred_url":"https://api.github.com/users/luser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luser/subscriptions","organizations_url":"https://api.github.com/users/luser/orgs","repos_url":"https://api.github.com/users/luser/repos","events_url":"https://api.github.com/users/luser/events{/privacy}","received_events_url":"https://api.github.com/users/luser/received_events","type":"User","site_admin":false},"body":"two nits:\r\n1. You should pass `nullptr` as the second parameter here\r\n2. I think you should explicitly pass `16` for the third parameter, since this should always be a hex string. \r\n\r\nAdding C++ exception usage to this file makes me a little uncomfortable, since we're not currently using them elsewhere, but this is only ever run as a standalone binary anyway so I think it should be fine. (We just don't use C++ exceptions anywhere in Gecko so I have a bit of an aversion to them.)","created_at":"2016-12-21T18:26:27Z","updated_at":"2016-12-21T18:26:27Z","html_url":"https://github.com/mozilla/socorro/pull/3606#discussion_r93492602","pull_request_url":"https://api.github.com/repos/mozilla/socorro/pulls/3606","_links":{"self":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/comments/93492602"},"html":{"href":"https://github.com/mozilla/socorro/pull/3606#discussion_r93492602"},"pull_request":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3606"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/socorro/pulls/3606","id":95690934,"html_url":"https://github.com/mozilla/socorro/pull/3606","diff_url":"https://github.com/mozilla/socorro/pull/3606.diff","patch_url":"https://github.com/mozilla/socorro/pull/3606.patch","issue_url":"https://api.github.com/repos/mozilla/socorro/issues/3606","number":3606,"state":"open","locked":false,"title":"Fixes bug 1320922 - Add cpu_microcode_version from /proc/cpuinfo to json_dump","user":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-29T13:22:02Z","updated_at":"2016-12-21T18:26:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92824e724612154d0ec2de43d12b17d6415dc763","assignee":{"login":"luser","id":286001,"avatar_url":"https://avatars.githubusercontent.com/u/286001?v=3","gravatar_id":"","url":"https://api.github.com/users/luser","html_url":"https://github.com/luser","followers_url":"https://api.github.com/users/luser/followers","following_url":"https://api.github.com/users/luser/following{/other_user}","gists_url":"https://api.github.com/users/luser/gists{/gist_id}","starred_url":"https://api.github.com/users/luser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luser/subscriptions","organizations_url":"https://api.github.com/users/luser/orgs","repos_url":"https://api.github.com/users/luser/repos","events_url":"https://api.github.com/users/luser/events{/privacy}","received_events_url":"https://api.github.com/users/luser/received_events","type":"User","site_admin":false},"assignees":[{"login":"luser","id":286001,"avatar_url":"https://avatars.githubusercontent.com/u/286001?v=3","gravatar_id":"","url":"https://api.github.com/users/luser","html_url":"https://github.com/luser","followers_url":"https://api.github.com/users/luser/followers","following_url":"https://api.github.com/users/luser/following{/other_user}","gists_url":"https://api.github.com/users/luser/gists{/gist_id}","starred_url":"https://api.github.com/users/luser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luser/subscriptions","organizations_url":"https://api.github.com/users/luser/orgs","repos_url":"https://api.github.com/users/luser/repos","events_url":"https://api.github.com/users/luser/events{/privacy}","received_events_url":"https://api.github.com/users/luser/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/socorro/pulls/3606/commits","review_comments_url":"https://api.github.com/repos/mozilla/socorro/pulls/3606/comments","review_comment_url":"https://api.github.com/repos/mozilla/socorro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/socorro/issues/3606/comments","statuses_url":"https://api.github.com/repos/mozilla/socorro/statuses/bd6ef98a790da82ff8c2a7168ade045ccfe05242","head":{"label":"marco-c:add_cpu_microcode_version_to_json_dump","ref":"add_cpu_microcode_version_to_json_dump","sha":"bd6ef98a790da82ff8c2a7168ade045ccfe05242","user":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"repo":{"id":67224770,"name":"socorro","full_name":"marco-c/socorro","owner":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marco-c/socorro","description":"Socorro is a server to accept and process Breakpad crash reports. ","fork":true,"url":"https://api.github.com/repos/marco-c/socorro","forks_url":"https://api.github.com/repos/marco-c/socorro/forks","keys_url":"https://api.github.com/repos/marco-c/socorro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marco-c/socorro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marco-c/socorro/teams","hooks_url":"https://api.github.com/repos/marco-c/socorro/hooks","issue_events_url":"https://api.github.com/repos/marco-c/socorro/issues/events{/number}","events_url":"https://api.github.com/repos/marco-c/socorro/events","assignees_url":"https://api.github.com/repos/marco-c/socorro/assignees{/user}","branches_url":"https://api.github.com/repos/marco-c/socorro/branches{/branch}","tags_url":"https://api.github.com/repos/marco-c/socorro/tags","blobs_url":"https://api.github.com/repos/marco-c/socorro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marco-c/socorro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marco-c/socorro/git/refs{/sha}","trees_url":"https://api.github.com/repos/marco-c/socorro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marco-c/socorro/statuses/{sha}","languages_url":"https://api.github.com/repos/marco-c/socorro/languages","stargazers_url":"https://api.github.com/repos/marco-c/socorro/stargazers","contributors_url":"https://api.github.com/repos/marco-c/socorro/contributors","subscribers_url":"https://api.github.com/repos/marco-c/socorro/subscribers","subscription_url":"https://api.github.com/repos/marco-c/socorro/subscription","commits_url":"https://api.github.com/repos/marco-c/socorro/commits{/sha}","git_commits_url":"https://api.github.com/repos/marco-c/socorro/git/commits{/sha}","comments_url":"https://api.github.com/repos/marco-c/socorro/comments{/number}","issue_comment_url":"https://api.github.com/repos/marco-c/socorro/issues/comments{/number}","contents_url":"https://api.github.com/repos/marco-c/socorro/contents/{+path}","compare_url":"https://api.github.com/repos/marco-c/socorro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marco-c/socorro/merges","archive_url":"https://api.github.com/repos/marco-c/socorro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marco-c/socorro/downloads","issues_url":"https://api.github.com/repos/marco-c/socorro/issues{/number}","pulls_url":"https://api.github.com/repos/marco-c/socorro/pulls{/number}","milestones_url":"https://api.github.com/repos/marco-c/socorro/milestones{/number}","notifications_url":"https://api.github.com/repos/marco-c/socorro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marco-c/socorro/labels{/name}","releases_url":"https://api.github.com/repos/marco-c/socorro/releases{/id}","deployments_url":"https://api.github.com/repos/marco-c/socorro/deployments","created_at":"2016-09-02T13:27:42Z","updated_at":"2016-09-02T13:27:46Z","pushed_at":"2016-12-15T22:15:24Z","git_url":"git://github.com/marco-c/socorro.git","ssh_url":"git@github.com:marco-c/socorro.git","clone_url":"https://github.com/marco-c/socorro.git","svn_url":"https://github.com/marco-c/socorro","homepage":"https://wiki.mozilla.org/Socorro","size":169741,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla:master","ref":"master","sha":"ad09dbfc5f6ea3f7df0aa322ad0d142f4b883392","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":2263742,"name":"socorro","full_name":"mozilla/socorro","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/socorro","description":"Socorro is a server to accept and process Breakpad crash reports. ","fork":false,"url":"https://api.github.com/repos/mozilla/socorro","forks_url":"https://api.github.com/repos/mozilla/socorro/forks","keys_url":"https://api.github.com/repos/mozilla/socorro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/socorro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/socorro/teams","hooks_url":"https://api.github.com/repos/mozilla/socorro/hooks","issue_events_url":"https://api.github.com/repos/mozilla/socorro/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/socorro/events","assignees_url":"https://api.github.com/repos/mozilla/socorro/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/socorro/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/socorro/tags","blobs_url":"https://api.github.com/repos/mozilla/socorro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/socorro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/socorro/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/socorro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/socorro/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/socorro/languages","stargazers_url":"https://api.github.com/repos/mozilla/socorro/stargazers","contributors_url":"https://api.github.com/repos/mozilla/socorro/contributors","subscribers_url":"https://api.github.com/repos/mozilla/socorro/subscribers","subscription_url":"https://api.github.com/repos/mozilla/socorro/subscription","commits_url":"https://api.github.com/repos/mozilla/socorro/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/socorro/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/socorro/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/socorro/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/socorro/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/socorro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/socorro/merges","archive_url":"https://api.github.com/repos/mozilla/socorro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/socorro/downloads","issues_url":"https://api.github.com/repos/mozilla/socorro/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/socorro/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/socorro/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/socorro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/socorro/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/socorro/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/socorro/deployments","created_at":"2011-08-24T19:21:49Z","updated_at":"2016-12-19T13:06:33Z","pushed_at":"2016-12-21T16:07:28Z","git_url":"git://github.com/mozilla/socorro.git","ssh_url":"git@github.com:mozilla/socorro.git","clone_url":"https://github.com/mozilla/socorro.git","svn_url":"https://github.com/mozilla/socorro","homepage":"https://wiki.mozilla.org/Socorro","size":169386,"stargazers_count":334,"watchers_count":334,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":168,"mirror_url":null,"open_issues_count":12,"forks":168,"open_issues":12,"watchers":334,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3606"},"html":{"href":"https://github.com/mozilla/socorro/pull/3606"},"issue":{"href":"https://api.github.com/repos/mozilla/socorro/issues/3606"},"comments":{"href":"https://api.github.com/repos/mozilla/socorro/issues/3606/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3606/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3606/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/socorro/statuses/bd6ef98a790da82ff8c2a7168ade045ccfe05242"}}}}
{"actor":{"display_login":"luser"}}