manticore/tests/binaries/int_overflow.sol
Mark Mossberg 6b794fecaa
eth int overflow: tests, mul support (#656)
* Move algorithm into ManticoreEVM

* Rm buggy unused line

* Initial eth testing setup

* Check for overflow in mul also

* clarifying comment

* Install solc for travis

* Add sudo

* x

* Rm travis_retry, since we rarely actually use it, and it's not available in this script for some reason

* Check for specific findings

* Fix test

* Clean up transaction firing logic

* Use less strict check, better for floating point
2017-12-21 12:54:24 -05:00

13 lines
275 B
Solidity

contract IntOverflowUnderflow {
function intoverflow_add(uint input) {
uint local = input + 1;
}
function intoverflow_mul(uint input) {
uint local = input * 2;
}
function intunderflow(uint input) {
uint local = input - 1;
}
}