Update expected test files

pull/127/head
Bernhard Mueller 7 years ago
parent 53a78aab97
commit 393e8c3fa7
  1. 11
      tests/testdata/outputs_expected/calls.sol.json
  2. 21
      tests/testdata/outputs_expected/calls.sol.markdown
  3. 14
      tests/testdata/outputs_expected/calls.sol.text
  4. 13
      tests/testdata/outputs_expected/ether_send.sol.json
  5. 23
      tests/testdata/outputs_expected/ether_send.sol.markdown
  6. 16
      tests/testdata/outputs_expected/ether_send.sol.text
  7. 2
      tests/testdata/outputs_expected/metacoin.sol.json
  8. 2
      tests/testdata/outputs_expected/metacoin.sol.markdown
  9. 2
      tests/testdata/outputs_expected/metacoin.sol.text
  10. 11
      tests/testdata/outputs_expected/origin.sol.json
  11. 21
      tests/testdata/outputs_expected/origin.sol.markdown
  12. 14
      tests/testdata/outputs_expected/origin.sol.text
  13. 2
      tests/testdata/outputs_expected/overflow.sol.json
  14. 2
      tests/testdata/outputs_expected/overflow.sol.markdown
  15. 2
      tests/testdata/outputs_expected/overflow.sol.text
  16. 25
      tests/testdata/outputs_expected/rubixi.sol.json
  17. 37
      tests/testdata/outputs_expected/rubixi.sol.markdown
  18. 30
      tests/testdata/outputs_expected/rubixi.sol.text
  19. 2
      tests/testdata/outputs_expected/suicide.sol.text
  20. 2
      tests/testdata/outputs_expected/underflow.sol.json
  21. 2
      tests/testdata/outputs_expected/underflow.sol.markdown
  22. 2
      tests/testdata/outputs_expected/underflow.sol.text
  23. 15
      tests/testdata/outputs_expected/weak_random.sol.json
  24. 25
      tests/testdata/outputs_expected/weak_random.sol.markdown
  25. 18
      tests/testdata/outputs_expected/weak_random.sol.text

@ -57,6 +57,17 @@
"lineno": 25,
"code": "addr.call()"
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0x2776b163`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0x2776b163",
"type": "Warning",
"address": 517,
"debug": "<DEBUG-DATA>",
"filename": "<TESTDATA>/inputs/calls.sol",
"lineno": 33,
"code": "stored_address = addr"
},
{
"title": "Unchecked CALL return value",
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.",

@ -100,6 +100,27 @@ addr.call()
```
## Integer Overflow
- Type: Warning
- Contract: Caller
- Function name: `_function_0x2776b163`
- PC address: 517
### Description
A possible integer overflow exists in the function `_function_0x2776b163`.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/calls.sol:33*
```
stored_address = addr
```
## Unchecked CALL return value
- Type: Informational

@ -63,6 +63,20 @@ addr.call()
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Caller
Function name: _function_0x2776b163
PC address: 517
A possible integer overflow exists in the function `_function_0x2776b163`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/calls.sol:33
stored_address = addr
--------------------
==== Unchecked CALL return value ====
Type: Informational
Contract: Caller

@ -15,7 +15,7 @@
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `invest()`.\nThe addition 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()",
"type": "Warning",
"address": 483,
@ -23,6 +23,17 @@
"filename": "<TESTDATA>/inputs/ether_send.sol",
"lineno": 24,
"code": "balances[msg.sender] += msg.value"
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `crowdfunding()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "crowdfunding()",
"type": "Warning",
"address": 620,
"debug": "<DEBUG-DATA>",
"filename": "<TESTDATA>/inputs/ether_send.sol",
"lineno": 14,
"code": "owner = msg.sender"
}
]
}

@ -34,10 +34,31 @@ msg.sender.transfer(this.balance)
### Description
A possible integer overflow exists in the function `invest()`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/ether_send.sol:24*
```
balances[msg.sender] += msg.value
```
## Integer Overflow
- Type: Warning
- Contract: Crowdfunding
- Function name: `crowdfunding()`
- PC address: 620
### Description
A possible integer overflow exists in the function `crowdfunding()`.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/ether_send.sol:14*
```
owner = msg.sender
```

@ -19,7 +19,7 @@ Contract: Crowdfunding
Function name: invest()
PC address: 483
A possible integer overflow exists in the function `invest()`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/ether_send.sol:24
@ -27,3 +27,17 @@ balances[msg.sender] += msg.value
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Crowdfunding
Function name: crowdfunding()
PC address: 620
A possible integer overflow exists in the function `crowdfunding()`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/ether_send.sol:14
owner = msg.sender
--------------------

@ -4,7 +4,7 @@
"issues": [
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendToken(address,uint256)`.\nThe addition 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)",
"type": "Warning",
"address": 498,

@ -12,7 +12,7 @@
### Description
A possible integer overflow exists in the function `sendToken(address,uint256)`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/metacoin.sol:12*

@ -4,7 +4,7 @@ Contract: metaCoin
Function name: sendToken(address,uint256)
PC address: 498
A possible integer overflow exists in the function `sendToken(address,uint256)`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/metacoin.sol:12

@ -12,6 +12,17 @@
"filename": "<TESTDATA>/inputs/origin.sol",
"lineno": 18,
"code": "tx.origin"
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `transferOwnership(address)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "transferOwnership(address)",
"type": "Warning",
"address": 438,
"debug": "<DEBUG-DATA>",
"filename": "<TESTDATA>/inputs/origin.sol",
"lineno": 31,
"code": "owner = newOwner"
}
]
}

@ -19,3 +19,24 @@ In *<TESTDATA>/inputs/origin.sol:18*
```
tx.origin
```
## Integer Overflow
- Type: Warning
- Contract: Origin
- Function name: `transferOwnership(address)`
- PC address: 438
### Description
A possible integer overflow exists in the function `transferOwnership(address)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/origin.sol:31*
```
owner = newOwner
```

@ -12,3 +12,17 @@ tx.origin
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Origin
Function name: transferOwnership(address)
PC address: 438
A possible integer overflow exists in the function `transferOwnership(address)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/origin.sol:31
owner = newOwner
--------------------

@ -15,7 +15,7 @@
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition 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)",
"type": "Warning",
"address": 725,

@ -33,7 +33,7 @@ balances[msg.sender] -= _value
### Description
A possible integer overflow exists in the function `sendeth(address,uint256)`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/overflow.sol:13*

@ -18,7 +18,7 @@ Contract: Over
Function name: sendeth(address,uint256)
PC address: 725
A possible integer overflow exists in the function `sendeth(address,uint256)`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/overflow.sol:13

@ -48,7 +48,7 @@
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0xfae14192`.\nThe addition may result in a value higher than the maximum representable integer.",
"description": "A possible integer overflow exists in the function `_function_0xfae14192`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0xfae14192",
"type": "Warning",
"address": 1223,
@ -58,15 +58,26 @@
"code": "collectedFees += msg.value"
},
{
"title": "Integer Underflow",
"description": "A possible integer underflow exists in the function `_function_0xd11f13df`.\nThe subtraction may result in a value < 0.",
"function": "_function_0xd11f13df",
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0x67f809e9`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0x67f809e9",
"type": "Warning",
"address": 1721,
"debug": "<DEBUG-DATA>",
"filename": "<TESTDATA>/inputs/rubixi.sol",
"lineno": 14,
"code": "creator = msg.sender"
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0xa6f9dae1`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0xa6f9dae1",
"type": "Warning",
"address": 2743,
"address": 2331,
"debug": "<DEBUG-DATA>",
"filename": "<TESTDATA>/inputs/rubixi.sol",
"lineno": 143,
"code": "participants.length - payoutOrder"
"lineno": 99,
"code": "creator = _owner"
},
{
"title": "Unchecked CALL return value",

@ -100,7 +100,7 @@ participants[orderInPyramid]
### Description
A possible integer overflow exists in the function `_function_0xfae14192`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/rubixi.sol:37*
@ -109,24 +109,45 @@ collectedFees += msg.value
```
## Integer Underflow
## Integer Overflow
- Type: Warning
- Contract: Rubixi
- Function name: `_function_0x67f809e9`
- PC address: 1721
### Description
A possible integer overflow exists in the function `_function_0x67f809e9`.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/rubixi.sol:14*
```
creator = msg.sender
```
## Integer Overflow
- Type: Warning
- Contract: Rubixi
- Function name: `_function_0xd11f13df`
- PC address: 2743
- Function name: `_function_0xa6f9dae1`
- PC address: 2331
### Description
A possible integer underflow exists in the function `_function_0xd11f13df`.
The subtraction may result in a value < 0.
A possible integer overflow exists in the function `_function_0xa6f9dae1`.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/rubixi.sol:143*
In *<TESTDATA>/inputs/rubixi.sol:99*
```
participants.length - payoutOrder
creator = _owner
```

@ -64,7 +64,7 @@ Contract: Rubixi
Function name: _function_0xfae14192
PC address: 1223
A possible integer overflow exists in the function `_function_0xfae14192`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/rubixi.sol:37
@ -72,17 +72,31 @@ collectedFees += msg.value
--------------------
==== Integer Underflow ====
==== Integer Overflow ====
Type: Warning
Contract: Rubixi
Function name: _function_0x67f809e9
PC address: 1721
A possible integer overflow exists in the function `_function_0x67f809e9`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/rubixi.sol:14
creator = msg.sender
--------------------
==== Integer Overflow ====
Type: Warning
Contract: Rubixi
Function name: _function_0xd11f13df
PC address: 2743
A possible integer underflow exists in the function `_function_0xd11f13df`.
The subtraction may result in a value < 0.
Function name: _function_0xa6f9dae1
PC address: 2331
A possible integer overflow exists in the function `_function_0xa6f9dae1`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/rubixi.sol:143
In file: <TESTDATA>/inputs/rubixi.sol:99
participants.length - payoutOrder
creator = _owner
--------------------

@ -3,7 +3,7 @@ Type: Warning
Contract: Suicide
Function name: _function_0xcbf0b0c0
PC address: 146
The function _function_0xcbf0b0c0 executes the SUICIDE instruction. The remaining Ether is sent to an address provided as a function argument.
The function `_function_0xcbf0b0c0` executes the SUICIDE instruction. The remaining Ether is sent to an address provided as a function argument.
It seems that this function can be called without restrictions.
--------------------

@ -15,7 +15,7 @@
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition 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)",
"type": "Warning",
"address": 725,

@ -33,7 +33,7 @@ balances[msg.sender] -= _value
### Description
A possible integer overflow exists in the function `sendeth(address,uint256)`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/underflow.sol:13*

@ -18,7 +18,7 @@ Contract: Under
Function name: sendeth(address,uint256)
PC address: 725
A possible integer overflow exists in the function `sendeth(address,uint256)`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/underflow.sol:13

@ -48,7 +48,7 @@
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition may result in a value higher than the maximum representable integer.",
"description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0xe9874106",
"type": "Warning",
"address": 1216,
@ -59,7 +59,7 @@
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition may result in a value higher than the maximum representable integer.",
"description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0xe9874106",
"type": "Warning",
"address": 262,
@ -67,6 +67,17 @@
"filename": "<TESTDATA>/inputs/weak_random.sol",
"lineno": 22,
"code": "contestants[currTicket] = Contestant(msg.sender, gameId)"
},
{
"title": "Integer Overflow ",
"description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "_function_0xe9874106",
"type": "Warning",
"address": 293,
"debug": "<DEBUG-DATA>",
"filename": "<TESTDATA>/inputs/weak_random.sol",
"lineno": 22,
"code": "contestants[currTicket] = Contestant(msg.sender, gameId)"
}
]
}

@ -98,7 +98,7 @@ prize / totalTickets
### Description
A possible integer overflow exists in the function `_function_0xe9874106`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/weak_random.sol:45*
@ -119,7 +119,28 @@ gameId++
### Description
A possible integer overflow exists in the function `_function_0xe9874106`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/weak_random.sol:22*
```
contestants[currTicket] = Contestant(msg.sender, gameId)
```
## Integer Overflow
- Type: Warning
- Contract: WeakRandom
- Function name: `_function_0xe9874106`
- PC address: 293
### Description
A possible integer overflow exists in the function `_function_0xe9874106`.
The addition or multiplication may result in a value higher than the maximum representable integer.
In *<TESTDATA>/inputs/weak_random.sol:22*

@ -62,7 +62,7 @@ Contract: WeakRandom
Function name: _function_0xe9874106
PC address: 1216
A possible integer overflow exists in the function `_function_0xe9874106`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/weak_random.sol:45
@ -76,7 +76,21 @@ Contract: WeakRandom
Function name: _function_0xe9874106
PC address: 262
A possible integer overflow exists in the function `_function_0xe9874106`.
The addition may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/weak_random.sol:22
contestants[currTicket] = Contestant(msg.sender, gameId)
--------------------
==== Integer Overflow ====
Type: Warning
Contract: WeakRandom
Function name: _function_0xe9874106
PC address: 293
A possible integer overflow exists in the function `_function_0xe9874106`.
The addition or multiplication may result in a value higher than the maximum representable integer.
--------------------
In file: <TESTDATA>/inputs/weak_random.sol:22

Loading…
Cancel
Save