{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/4077","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/4077/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/4077/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/4077/events","html_url":"https://github.com/micropython/micropython/issues/4077","id":354166219,"node_id":"MDU6SXNzdWUzNTQxNjYyMTk=","number":4077,"title":"Crash stm32 with multiplication in loop","user":{"login":"ryannathans","id":1307375,"node_id":"MDQ6VXNlcjEzMDczNzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1307375?v=4","gravatar_id":"","url":"https://api.github.com/users/ryannathans","html_url":"https://github.com/ryannathans","followers_url":"https://api.github.com/users/ryannathans/followers","following_url":"https://api.github.com/users/ryannathans/following{/other_user}","gists_url":"https://api.github.com/users/ryannathans/gists{/gist_id}","starred_url":"https://api.github.com/users/ryannathans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryannathans/subscriptions","organizations_url":"https://api.github.com/users/ryannathans/orgs","repos_url":"https://api.github.com/users/ryannathans/repos","events_url":"https://api.github.com/users/ryannathans/events{/privacy}","received_events_url":"https://api.github.com/users/ryannathans/received_events","type":"User","site_admin":false},"labels":[{"id":375181564,"node_id":"MDU6TGFiZWwzNzUxODE1NjQ=","url":"https://api.github.com/repos/micropython/micropython/labels/stm32","name":"stm32","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-08-27T03:19:48Z","updated_at":"2018-09-03T03:44:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```\r\na = 1\r\nwhile True:\r\n\ta *= 1.1\r\n```\r\n\r\nrunning 1.9.4 with double precision\r\nstm32 appears to reset when executed\r\n\r\nmy understanding is that after a relatively small number of iterations the value of 'a' will become 'inf' and any further multiplication should result in 'inf' - as occurs manually e.g.\r\n\r\n```\r\n>>> a = 1\r\n>>> a *= 1e+50\r\n>>> a *= 1e+50\r\n>>> a *= 1e+50\r\n>>> a *= 1e+50\r\n>>> a *= 1e+50\r\n>>> a *= 1e+50\r\n>>> a *= 1e+50\r\n>>> a\r\ninf\r\n```"},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/417992739","html_url":"https://github.com/micropython/micropython/issues/4077#issuecomment-417992739","issue_url":"https://api.github.com/repos/micropython/micropython/issues/4077","id":417992739,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzk5MjczOQ==","user":{"login":"dpgeorge","id":6187689,"node_id":"MDQ6VXNlcjYxODc2ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/6187689?v=4","gravatar_id":"","url":"https://api.github.com/users/dpgeorge","html_url":"https://github.com/dpgeorge","followers_url":"https://api.github.com/users/dpgeorge/followers","following_url":"https://api.github.com/users/dpgeorge/following{/other_user}","gists_url":"https://api.github.com/users/dpgeorge/gists{/gist_id}","starred_url":"https://api.github.com/users/dpgeorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpgeorge/subscriptions","organizations_url":"https://api.github.com/users/dpgeorge/orgs","repos_url":"https://api.github.com/users/dpgeorge/repos","events_url":"https://api.github.com/users/dpgeorge/events{/privacy}","received_events_url":"https://api.github.com/users/dpgeorge/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T03:44:38Z","updated_at":"2018-09-03T03:44:38Z","author_association":"CONTRIBUTOR","body":"> Why would it be a memory issue?\r\n...\r\n> And why does it work fine when I run my main.py\r\n\r\nIt's just my suspicion that it's a memory issue, based on the fact that the loop crashes before it gets to \"inf\", and that the same arithmetic operation outside the loop succeeds.  When main.py is/isn't loaded then the heap profile will be different when the loop runs, hence different outcome."}}
{"actor":{"display_login":"dpgeorge"}}