{"action":"reopened","issue":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/972","repository_url":"https://api.github.com/repos/arvidn/libtorrent","labels_url":"https://api.github.com/repos/arvidn/libtorrent/issues/972/labels{/name}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/972/comments","events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/972/events","html_url":"https://github.com/arvidn/libtorrent/issues/972","id":168541111,"number":972,"title":"Questions in piece_picker::priority_range","user":{"login":"aldenml","id":143813,"avatar_url":"https://avatars.githubusercontent.com/u/143813?v=3","gravatar_id":"","url":"https://api.github.com/users/aldenml","html_url":"https://github.com/aldenml","followers_url":"https://api.github.com/users/aldenml/followers","following_url":"https://api.github.com/users/aldenml/following{/other_user}","gists_url":"https://api.github.com/users/aldenml/gists{/gist_id}","starred_url":"https://api.github.com/users/aldenml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldenml/subscriptions","organizations_url":"https://api.github.com/users/aldenml/orgs","repos_url":"https://api.github.com/users/aldenml/repos","events_url":"https://api.github.com/users/aldenml/events{/privacy}","received_events_url":"https://api.github.com/users/aldenml/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-31T22:12:01Z","updated_at":"2016-08-05T02:24:31Z","closed_at":null,"body":"libtorrent :  master\r\n\r\nI recently saw a crash `signal 8 (SIGFPE)` in `piece_picker::add` and I think it's due to this line\r\n```\r\nelse new_index = random() % (range_end - range_start + 1) + range_start;\r\n```\r\nI see `priority_range` has an `ASSERT` but that assert does not exist in release, my questions are:\r\n\r\n1 - do you think `m_priority_boundries` could be mutated in the middle of `priority_range`?\r\n2 - if 1) can happens, what can I do to avoid the crash?\r\n3 - Is it really `boundries` or `boundaries`?\r\n"}}
{"actor":{"display_login":"aldenml"}}