{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/solidity/issues/796","repository_url":"https://api.github.com/repos/ethereum/solidity","labels_url":"https://api.github.com/repos/ethereum/solidity/issues/796/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/796/comments","events_url":"https://api.github.com/repos/ethereum/solidity/issues/796/events","html_url":"https://github.com/ethereum/solidity/issues/796","id":168829728,"number":796,"title":"Exception on overflow","user":{"login":"phiferd","id":25631,"avatar_url":"https://avatars.githubusercontent.com/u/25631?v=3","gravatar_id":"","url":"https://api.github.com/users/phiferd","html_url":"https://github.com/phiferd","followers_url":"https://api.github.com/users/phiferd/followers","following_url":"https://api.github.com/users/phiferd/following{/other_user}","gists_url":"https://api.github.com/users/phiferd/gists{/gist_id}","starred_url":"https://api.github.com/users/phiferd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phiferd/subscriptions","organizations_url":"https://api.github.com/users/phiferd/orgs","repos_url":"https://api.github.com/users/phiferd/repos","events_url":"https://api.github.com/users/phiferd/events{/privacy}","received_events_url":"https://api.github.com/users/phiferd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ethereum/solidity/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ethereum/solidity/labels/planned","name":"planned","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ethereum/solidity/milestones/25","html_url":"https://github.com/ethereum/solidity/milestones/2-breaking-safety-changes","labels_url":"https://api.github.com/repos/ethereum/solidity/milestones/25/labels","id":1925733,"number":25,"title":"2-breaking-safety-changes","description":null,"creator":{"login":"chriseth","id":9073706,"avatar_url":"https://avatars.githubusercontent.com/u/9073706?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":4,"state":"open","created_at":"2016-08-05T15:31:30Z","updated_at":"2016-08-26T17:56:09Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-08-02T08:40:16Z","updated_at":"2016-08-30T17:42:47Z","closed_at":null,"body":"It would be nice if Solidity, by default, threw an exception for arithmetic overflow, rather than allowing it.\r\n\r\nJustification:\r\n1. Overflow is rarely desired behavior and is commonly cited as a security vulnerability.  \r\n2: Even in cases where overflow is desired behavior, throwing an exception is a far safer failure mode and easier to detect/correct.\r\n3: The goal of solidity, as I understand it, is to enable the creation of secure and reliable smart contacts.  Therefore, although it is of course possible for the developer to include their own checks, including this as a feature of the language will make the common case both simple and more secure.  \r\n\r\nIf this is not achievable, I welcome alternatives that do not require each and every developer to remember these corner cases for each and every arithmetic operation.  A solution that states \"everybody should do XYZ\" will inevitably lead to failures.\r\n\r\nI'm am not familiar enough with the code to propose a detailed solution. However, a compiler switch that is on by default and can be disabled for backward compatibility is the sort of approach I was imagining."},"comment":{"url":"https://api.github.com/repos/ethereum/solidity/issues/comments/243520222","html_url":"https://github.com/ethereum/solidity/issues/796#issuecomment-243520222","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/796","id":243520222,"user":{"login":"chriseth","id":9073706,"avatar_url":"https://avatars.githubusercontent.com/u/9073706?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T17:42:46Z","updated_at":"2016-08-30T17:42:46Z","body":"@rainbeam This is too involved for 0.4.0. Arithmetics is almost for free when compared to storage writes or even a transaction, so I think it is fine to do it. I do not really agree that this belongs to the EVM. Something like an overflow flag might be added to the EVM, but not a \"force-stop\" on overflow."}}
{"actor":{"display_login":"chriseth"}}