Revert "Merge pull request #296 from norhh/branch/295"

This reverts commit 6428d9b8cf, reversing
changes made to 35ff192db1.
pull/299/head
Nikhil Parasaram 7 years ago
parent 6428d9b8cf
commit 8a3a74da10
  1. 4
      mythril/analysis/modules/integer.py
  2. 4
      tests/testdata/outputs_expected/ether_send.sol.json
  3. 4
      tests/testdata/outputs_expected/ether_send.sol.o.json
  4. 2
      tests/testdata/outputs_expected/ether_send.sol.o.markdown
  5. 2
      tests/testdata/outputs_expected/ether_send.sol.o.text
  6. 4
      tests/testdata/outputs_expected/metacoin.sol.o.json
  7. 2
      tests/testdata/outputs_expected/metacoin.sol.o.markdown
  8. 2
      tests/testdata/outputs_expected/metacoin.sol.o.text
  9. 4
      tests/testdata/outputs_expected/overflow.sol.json
  10. 2
      tests/testdata/outputs_expected/overflow.sol.markdown
  11. 4
      tests/testdata/outputs_expected/overflow.sol.o.json
  12. 2
      tests/testdata/outputs_expected/overflow.sol.o.markdown
  13. 2
      tests/testdata/outputs_expected/overflow.sol.o.text
  14. 2
      tests/testdata/outputs_expected/overflow.sol.text
  15. 4
      tests/testdata/outputs_expected/underflow.sol.json
  16. 2
      tests/testdata/outputs_expected/underflow.sol.markdown
  17. 4
      tests/testdata/outputs_expected/underflow.sol.o.json
  18. 2
      tests/testdata/outputs_expected/underflow.sol.o.markdown
  19. 2
      tests/testdata/outputs_expected/underflow.sol.o.text
  20. 2
      tests/testdata/outputs_expected/underflow.sol.text

@ -83,9 +83,9 @@ def _check_integer_overflow(statespace, state, node):
if not _verify_integer_overflow(statespace, node, expr, state, model, constraint, op0, op1): if not _verify_integer_overflow(statespace, node, expr, state, model, constraint, op0, op1):
return issues return issues
# Build issue # Build issue
issue = Issue(node.contract_name, node.function_name, instruction['address'], "Integer Overflow", "Warning") issue = Issue(node.contract_name, node.function_name, instruction['address'], "Integer Overflow ", "Warning")
issue.description = "A possible integer overflow exists in the function `{}`.\n" \ issue.description = "A possible integer overflow exists in the function `{}`.\n" \
"The addition or multiplication may result in a value higher than the maximum representable integer.".format( "The addition or multiplication may result in a value higher than the maximum representable integer.".format(

@ -14,7 +14,7 @@
"code": "msg.sender.transfer(this.balance)" "code": "msg.sender.transfer(this.balance)"
}, },
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `invest()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `invest()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "invest()", "function": "invest()",
"type": "Warning", "type": "Warning",
@ -25,4 +25,4 @@
"code": "balances[msg.sender] += msg.value" "code": "balances[msg.sender] += msg.value"
} }
] ]
} }

@ -11,7 +11,7 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
}, },
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `invest()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `invest()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "invest()", "function": "invest()",
"type": "Warning", "type": "Warning",
@ -19,4 +19,4 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
} }
] ]
} }

@ -13,7 +13,7 @@ In the function `withdrawfunds()` a non-zero amount of Ether is sent to msg.send
There is a check on storage index 1. This storage slot can be written to by calling the function `crowdfunding()`. There is a check on storage index 1. This storage slot can be written to by calling the function `crowdfunding()`.
## Integer Overflow ## Integer Overflow
- Type: Warning - Type: Warning
- Contract: Unknown - Contract: Unknown

@ -8,7 +8,7 @@ In the function `withdrawfunds()` a non-zero amount of Ether is sent to msg.send
There is a check on storage index 1. This storage slot can be written to by calling the function `crowdfunding()`. There is a check on storage index 1. This storage slot can be written to by calling the function `crowdfunding()`.
-------------------- --------------------
==== Integer Overflow ==== ==== Integer Overflow ====
Type: Warning Type: Warning
Contract: Unknown Contract: Unknown
Function name: invest() Function name: invest()

@ -3,7 +3,7 @@
"error": null, "error": null,
"issues": [ "issues": [
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendToken(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `sendToken(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendToken(address,uint256)", "function": "sendToken(address,uint256)",
"type": "Warning", "type": "Warning",
@ -11,4 +11,4 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
} }
] ]
} }

@ -1,6 +1,6 @@
# Analysis results for test-filename.sol # Analysis results for test-filename.sol
## Integer Overflow ## Integer Overflow
- Type: Warning - Type: Warning
- Contract: Unknown - Contract: Unknown

@ -1,4 +1,4 @@
==== Integer Overflow ==== ==== Integer Overflow ====
Type: Warning Type: Warning
Contract: Unknown Contract: Unknown
Function name: sendToken(address,uint256) Function name: sendToken(address,uint256)

@ -14,7 +14,7 @@
"code": "balances[msg.sender] -= _value" "code": "balances[msg.sender] -= _value"
}, },
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)", "function": "sendeth(address,uint256)",
"type": "Warning", "type": "Warning",
@ -36,4 +36,4 @@
"code": "balances[msg.sender] - _value" "code": "balances[msg.sender] - _value"
} }
] ]
} }

@ -17,7 +17,7 @@ In *<TESTDATA>/inputs/overflow.sol:12*
balances[msg.sender] -= _value balances[msg.sender] -= _value
``` ```
## Integer Overflow ## Integer Overflow
- Type: Warning - Type: Warning
- Contract: Over - Contract: Over

@ -11,7 +11,7 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
}, },
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)", "function": "sendeth(address,uint256)",
"type": "Warning", "type": "Warning",
@ -27,4 +27,4 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
} }
] ]
} }

@ -24,7 +24,7 @@ The subtraction may result in a value < 0.
A possible integer underflow exists in the function `sendeth(address,uint256)`. A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0. The subtraction may result in a value < 0.
## Integer Overflow ## Integer Overflow
- Type: Warning - Type: Warning
- Contract: Unknown - Contract: Unknown

@ -16,7 +16,7 @@ A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0. The subtraction may result in a value < 0.
-------------------- --------------------
==== Integer Overflow ==== ==== Integer Overflow ====
Type: Warning Type: Warning
Contract: Unknown Contract: Unknown
Function name: sendeth(address,uint256) Function name: sendeth(address,uint256)

@ -12,7 +12,7 @@ balances[msg.sender] -= _value
-------------------- --------------------
==== Integer Overflow ==== ==== Integer Overflow ====
Type: Warning Type: Warning
Contract: Over Contract: Over
Function name: sendeth(address,uint256) Function name: sendeth(address,uint256)

@ -14,7 +14,7 @@
"code": "balances[msg.sender] -= _value" "code": "balances[msg.sender] -= _value"
}, },
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)", "function": "sendeth(address,uint256)",
"type": "Warning", "type": "Warning",
@ -36,4 +36,4 @@
"code": "balances[msg.sender] - _value" "code": "balances[msg.sender] - _value"
} }
] ]
} }

@ -17,7 +17,7 @@ In *<TESTDATA>/inputs/underflow.sol:12*
balances[msg.sender] -= _value balances[msg.sender] -= _value
``` ```
## Integer Overflow ## Integer Overflow
- Type: Warning - Type: Warning
- Contract: Under - Contract: Under

@ -11,7 +11,7 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
}, },
{ {
"title": "Integer Overflow", "title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", "description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)", "function": "sendeth(address,uint256)",
"type": "Warning", "type": "Warning",
@ -27,4 +27,4 @@
"debug": "<DEBUG-DATA>" "debug": "<DEBUG-DATA>"
} }
] ]
} }

@ -24,7 +24,7 @@ The subtraction may result in a value < 0.
A possible integer underflow exists in the function `sendeth(address,uint256)`. A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0. The subtraction may result in a value < 0.
## Integer Overflow ## Integer Overflow
- Type: Warning - Type: Warning
- Contract: Unknown - Contract: Unknown

@ -16,7 +16,7 @@ A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0. The subtraction may result in a value < 0.
-------------------- --------------------
==== Integer Overflow ==== ==== Integer Overflow ====
Type: Warning Type: Warning
Contract: Unknown Contract: Unknown
Function name: sendeth(address,uint256) Function name: sendeth(address,uint256)

@ -12,7 +12,7 @@ balances[msg.sender] -= _value
-------------------- --------------------
==== Integer Overflow ==== ==== Integer Overflow ====
Type: Warning Type: Warning
Contract: Under Contract: Under
Function name: sendeth(address,uint256) Function name: sendeth(address,uint256)

Loading…
Cancel
Save