{"action":"created","issue":{"url":"https://api.github.com/repos/miloyip/dtoa-benchmark/issues/7","repository_url":"https://api.github.com/repos/miloyip/dtoa-benchmark","labels_url":"https://api.github.com/repos/miloyip/dtoa-benchmark/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/miloyip/dtoa-benchmark/issues/7/comments","events_url":"https://api.github.com/repos/miloyip/dtoa-benchmark/issues/7/events","html_url":"https://github.com/miloyip/dtoa-benchmark/issues/7","id":156878676,"number":7,"title":"milo: some numbers cause overflow in DigitGen","user":{"login":"rdb","id":194842,"avatar_url":"https://avatars.githubusercontent.com/u/194842?v=3","gravatar_id":"","url":"https://api.github.com/users/rdb","html_url":"https://github.com/rdb","followers_url":"https://api.github.com/users/rdb/followers","following_url":"https://api.github.com/users/rdb/following{/other_user}","gists_url":"https://api.github.com/users/rdb/gists{/gist_id}","starred_url":"https://api.github.com/users/rdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdb/subscriptions","organizations_url":"https://api.github.com/users/rdb/orgs","repos_url":"https://api.github.com/users/rdb/repos","events_url":"https://api.github.com/users/rdb/events{/privacy}","received_events_url":"https://api.github.com/users/rdb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-05-26T00:23:43Z","updated_at":"2016-07-20T18:13:51Z","closed_at":null,"body":"Clang's address sanitizer traps on the milo algorithm when using this number:\r\n\r\n```\r\n0.020000000000000005 (hex 0x3f947ae147ae147c)\r\n```\r\n\r\nIn the DigitGen function, it tries to access the kPow10 array with an overflowing index.  This is the offending line:\r\n```cpp\r\nGrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-kappa]);\r\n```\r\nThe kappa value in question is -14 when it traps.  Padding the kPow10 with five extra zeroes at the end seems to work around the issue, but I don't understand the code well enough to comment on whether that is an good solution."},"comment":{"url":"https://api.github.com/repos/miloyip/dtoa-benchmark/issues/comments/234033901","html_url":"https://github.com/miloyip/dtoa-benchmark/issues/7#issuecomment-234033901","issue_url":"https://api.github.com/repos/miloyip/dtoa-benchmark/issues/7","id":234033901,"user":{"login":"dtolnay","id":1940490,"avatar_url":"https://avatars.githubusercontent.com/u/1940490?v=3","gravatar_id":"","url":"https://api.github.com/users/dtolnay","html_url":"https://github.com/dtolnay","followers_url":"https://api.github.com/users/dtolnay/followers","following_url":"https://api.github.com/users/dtolnay/following{/other_user}","gists_url":"https://api.github.com/users/dtolnay/gists{/gist_id}","starred_url":"https://api.github.com/users/dtolnay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtolnay/subscriptions","organizations_url":"https://api.github.com/users/dtolnay/orgs","repos_url":"https://api.github.com/users/dtolnay/repos","events_url":"https://api.github.com/users/dtolnay/events{/privacy}","received_events_url":"https://api.github.com/users/dtolnay/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T18:13:51Z","updated_at":"2016-07-20T18:13:51Z","body":"This was fixed in https://github.com/miloyip/rapidjson/commit/fe550f38669fe0f488926c1ef0feb6c101f586d6."}}
{"actor":{"display_login":"dtolnay"}}