{"action":"created","issue":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/11314","repository_url":"https://api.github.com/repos/MarlinFirmware/Marlin","labels_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/11314/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/11314/comments","events_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/11314/events","html_url":"https://github.com/MarlinFirmware/Marlin/issues/11314","id":342878980,"node_id":"MDU6SXNzdWUzNDI4Nzg5ODA=","number":11314,"title":"get_period_inverse divide-by-zero on non-AVR","user":{"login":"eyal0","id":109809,"node_id":"MDQ6VXNlcjEwOTgwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/109809?v=4","gravatar_id":"","url":"https://api.github.com/users/eyal0","html_url":"https://github.com/eyal0","followers_url":"https://api.github.com/users/eyal0/followers","following_url":"https://api.github.com/users/eyal0/following{/other_user}","gists_url":"https://api.github.com/users/eyal0/gists{/gist_id}","starred_url":"https://api.github.com/users/eyal0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyal0/subscriptions","organizations_url":"https://api.github.com/users/eyal0/orgs","repos_url":"https://api.github.com/users/eyal0/repos","events_url":"https://api.github.com/users/eyal0/events{/privacy}","received_events_url":"https://api.github.com/users/eyal0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-19T20:33:22Z","updated_at":"2018-07-19T20:53:27Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n\r\nThis line can divide by zero: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/module/planner.cpp#L697\r\n\r\n### Steps to Reproduce\r\n\r\nClone: https://github.com/eyal0/Marlin/tree/estimate-bugfix-2.0.x\r\n\r\nIt's already fixed in that branch so undo the fix.\r\n\r\n```\r\nRun:\r\nmake -f Makefile.calc\r\n./calc SOME_GCODE_FILE.gco\r\n```\r\n\r\n**Expected behavior:** No crash.\r\n\r\n**Actual behavior:** Crash.\r\n\r\n#### Additional Information\r\n\r\nThe get_period_inverse code for AVR returns the same value for input 0 and input 1, so maybe the non-AVR can do the same?\r\n\r\nAlso, I don't understand why AVR is computing 0x1000000/d and non-AVR is computing 0xFFFFFFFF/d.  The difference is nearly a factor of 16!"},"comment":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/comments/406410904","html_url":"https://github.com/MarlinFirmware/Marlin/issues/11314#issuecomment-406410904","issue_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/11314","id":406410904,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjQxMDkwNA==","user":{"login":"p3p","id":24342,"node_id":"MDQ6VXNlcjI0MzQy","avatar_url":"https://avatars1.githubusercontent.com/u/24342?v=4","gravatar_id":"","url":"https://api.github.com/users/p3p","html_url":"https://github.com/p3p","followers_url":"https://api.github.com/users/p3p/followers","following_url":"https://api.github.com/users/p3p/following{/other_user}","gists_url":"https://api.github.com/users/p3p/gists{/gist_id}","starred_url":"https://api.github.com/users/p3p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p3p/subscriptions","organizations_url":"https://api.github.com/users/p3p/orgs","repos_url":"https://api.github.com/users/p3p/repos","events_url":"https://api.github.com/users/p3p/events{/privacy}","received_events_url":"https://api.github.com/users/p3p/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T20:53:27Z","updated_at":"2018-07-19T20:53:27Z","author_association":"MEMBER","body":"Interesting I had hit a divide by zero issue on my Linux port, hadn't got round to looking into the root cause."}}
{"actor":{"display_login":"p3p"}}