{"action":"closed","number":3802,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/3802","id":189195700,"html_url":"https://github.com/micropython/micropython/pull/3802","diff_url":"https://github.com/micropython/micropython/pull/3802.diff","patch_url":"https://github.com/micropython/micropython/pull/3802.patch","issue_url":"https://api.github.com/repos/micropython/micropython/issues/3802","number":3802,"state":"closed","locked":false,"title":"mpz_hash: avoid undefined behavior at integer overflow","user":{"login":"jepler","id":1517291,"avatar_url":"https://avatars0.githubusercontent.com/u/1517291?v=4","gravatar_id":"","url":"https://api.github.com/users/jepler","html_url":"https://github.com/jepler","followers_url":"https://api.github.com/users/jepler/followers","following_url":"https://api.github.com/users/jepler/following{/other_user}","gists_url":"https://api.github.com/users/jepler/gists{/gist_id}","starred_url":"https://api.github.com/users/jepler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jepler/subscriptions","organizations_url":"https://api.github.com/users/jepler/orgs","repos_url":"https://api.github.com/users/jepler/repos","events_url":"https://api.github.com/users/jepler/events{/privacy}","received_events_url":"https://api.github.com/users/jepler/received_events","type":"User","site_admin":false},"body":"Before this, ubsan would detect a problem when executing\r\n`hash(006699999999999999999999999999999999999999999999999999999999999999999999)`:\r\n```\r\n../../py/mpz.c:1539:20: runtime error: left shift of 1067371580458 by 32 places cannot be represented in type 'mp_int_t' (aka 'long')\r\n```\r\n\r\nWhen the overflow does occur, it now happens as defined by the rules of\r\nunsigned arithmetic.","created_at":"2018-05-19T16:31:42Z","updated_at":"2018-05-21T03:10:10Z","closed_at":"2018-05-21T03:10:10Z","merged_at":null,"merge_commit_sha":"6a6027eda8ec999e1a05615db8b82169f7912e4a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/micropython/micropython/pulls/3802/commits","review_comments_url":"https://api.github.com/repos/micropython/micropython/pulls/3802/comments","review_comment_url":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/3802/comments","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/df93466364ad81ee249cda098d25bfafcc40e6b6","head":{"label":"jepler:long-hash-undefined-behavior","ref":"long-hash-undefined-behavior","sha":"df93466364ad81ee249cda098d25bfafcc40e6b6","user":{"login":"jepler","id":1517291,"avatar_url":"https://avatars0.githubusercontent.com/u/1517291?v=4","gravatar_id":"","url":"https://api.github.com/users/jepler","html_url":"https://github.com/jepler","followers_url":"https://api.github.com/users/jepler/followers","following_url":"https://api.github.com/users/jepler/following{/other_user}","gists_url":"https://api.github.com/users/jepler/gists{/gist_id}","starred_url":"https://api.github.com/users/jepler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jepler/subscriptions","organizations_url":"https://api.github.com/users/jepler/orgs","repos_url":"https://api.github.com/users/jepler/repos","events_url":"https://api.github.com/users/jepler/events{/privacy}","received_events_url":"https://api.github.com/users/jepler/received_events","type":"User","site_admin":false},"repo":{"id":125944772,"name":"circuitpython","full_name":"jepler/circuitpython","owner":{"login":"jepler","id":1517291,"avatar_url":"https://avatars0.githubusercontent.com/u/1517291?v=4","gravatar_id":"","url":"https://api.github.com/users/jepler","html_url":"https://github.com/jepler","followers_url":"https://api.github.com/users/jepler/followers","following_url":"https://api.github.com/users/jepler/following{/other_user}","gists_url":"https://api.github.com/users/jepler/gists{/gist_id}","starred_url":"https://api.github.com/users/jepler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jepler/subscriptions","organizations_url":"https://api.github.com/users/jepler/orgs","repos_url":"https://api.github.com/users/jepler/repos","events_url":"https://api.github.com/users/jepler/events{/privacy}","received_events_url":"https://api.github.com/users/jepler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jepler/circuitpython","description":"CircuitPython - a Python implementation for teaching coding with microcontrollers","fork":true,"url":"https://api.github.com/repos/jepler/circuitpython","forks_url":"https://api.github.com/repos/jepler/circuitpython/forks","keys_url":"https://api.github.com/repos/jepler/circuitpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jepler/circuitpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jepler/circuitpython/teams","hooks_url":"https://api.github.com/repos/jepler/circuitpython/hooks","issue_events_url":"https://api.github.com/repos/jepler/circuitpython/issues/events{/number}","events_url":"https://api.github.com/repos/jepler/circuitpython/events","assignees_url":"https://api.github.com/repos/jepler/circuitpython/assignees{/user}","branches_url":"https://api.github.com/repos/jepler/circuitpython/branches{/branch}","tags_url":"https://api.github.com/repos/jepler/circuitpython/tags","blobs_url":"https://api.github.com/repos/jepler/circuitpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jepler/circuitpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jepler/circuitpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/jepler/circuitpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jepler/circuitpython/statuses/{sha}","languages_url":"https://api.github.com/repos/jepler/circuitpython/languages","stargazers_url":"https://api.github.com/repos/jepler/circuitpython/stargazers","contributors_url":"https://api.github.com/repos/jepler/circuitpython/contributors","subscribers_url":"https://api.github.com/repos/jepler/circuitpython/subscribers","subscription_url":"https://api.github.com/repos/jepler/circuitpython/subscription","commits_url":"https://api.github.com/repos/jepler/circuitpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/jepler/circuitpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/jepler/circuitpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/jepler/circuitpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/jepler/circuitpython/contents/{+path}","compare_url":"https://api.github.com/repos/jepler/circuitpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jepler/circuitpython/merges","archive_url":"https://api.github.com/repos/jepler/circuitpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jepler/circuitpython/downloads","issues_url":"https://api.github.com/repos/jepler/circuitpython/issues{/number}","pulls_url":"https://api.github.com/repos/jepler/circuitpython/pulls{/number}","milestones_url":"https://api.github.com/repos/jepler/circuitpython/milestones{/number}","notifications_url":"https://api.github.com/repos/jepler/circuitpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jepler/circuitpython/labels{/name}","releases_url":"https://api.github.com/repos/jepler/circuitpython/releases{/id}","deployments_url":"https://api.github.com/repos/jepler/circuitpython/deployments","created_at":"2018-03-20T01:46:48Z","updated_at":"2018-03-31T16:56:05Z","pushed_at":"2018-05-19T18:16:22Z","git_url":"git://github.com/jepler/circuitpython.git","ssh_url":"git@github.com:jepler/circuitpython.git","clone_url":"https://github.com/jepler/circuitpython.git","svn_url":"https://github.com/jepler/circuitpython","homepage":"","size":43593,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"micropython:master","ref":"master","sha":"3ea0862a6e3c97f6224548c41a225f270df4d205","user":{"login":"micropython","id":6298560,"avatar_url":"https://avatars1.githubusercontent.com/u/6298560?v=4","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"repo":{"id":15337142,"name":"micropython","full_name":"micropython/micropython","owner":{"login":"micropython","id":6298560,"avatar_url":"https://avatars1.githubusercontent.com/u/6298560?v=4","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micropython/micropython","description":"MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems","fork":false,"url":"https://api.github.com/repos/micropython/micropython","forks_url":"https://api.github.com/repos/micropython/micropython/forks","keys_url":"https://api.github.com/repos/micropython/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micropython/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micropython/micropython/teams","hooks_url":"https://api.github.com/repos/micropython/micropython/hooks","issue_events_url":"https://api.github.com/repos/micropython/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/micropython/micropython/events","assignees_url":"https://api.github.com/repos/micropython/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/micropython/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/micropython/micropython/tags","blobs_url":"https://api.github.com/repos/micropython/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micropython/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micropython/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/micropython/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/micropython/micropython/languages","stargazers_url":"https://api.github.com/repos/micropython/micropython/stargazers","contributors_url":"https://api.github.com/repos/micropython/micropython/contributors","subscribers_url":"https://api.github.com/repos/micropython/micropython/subscribers","subscription_url":"https://api.github.com/repos/micropython/micropython/subscription","commits_url":"https://api.github.com/repos/micropython/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/micropython/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/micropython/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/micropython/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/micropython/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/micropython/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micropython/micropython/merges","archive_url":"https://api.github.com/repos/micropython/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micropython/micropython/downloads","issues_url":"https://api.github.com/repos/micropython/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/micropython/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/micropython/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/micropython/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micropython/micropython/labels{/name}","releases_url":"https://api.github.com/repos/micropython/micropython/releases{/id}","deployments_url":"https://api.github.com/repos/micropython/micropython/deployments","created_at":"2013-12-20T11:47:07Z","updated_at":"2018-05-21T03:07:48Z","pushed_at":"2018-05-21T03:07:25Z","git_url":"git://github.com/micropython/micropython.git","ssh_url":"git@github.com:micropython/micropython.git","clone_url":"https://github.com/micropython/micropython.git","svn_url":"https://github.com/micropython/micropython","homepage":"https://micropython.org","size":34098,"stargazers_count":6541,"watchers_count":6541,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1725,"mirror_url":null,"archived":false,"open_issues_count":514,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1725,"open_issues":514,"watchers":6541,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/3802"},"html":{"href":"https://github.com/micropython/micropython/pull/3802"},"issue":{"href":"https://api.github.com/repos/micropython/micropython/issues/3802"},"comments":{"href":"https://api.github.com/repos/micropython/micropython/issues/3802/comments"},"review_comments":{"href":"https://api.github.com/repos/micropython/micropython/pulls/3802/comments"},"review_comment":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micropython/micropython/pulls/3802/commits"},"statuses":{"href":"https://api.github.com/repos/micropython/micropython/statuses/df93466364ad81ee249cda098d25bfafcc40e6b6"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"dpgeorge"}}