-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug in test and added test for opcode
- Loading branch information
1 parent
afdb6f3
commit 5a00323
Showing
6 changed files
with
56 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ PUSH1 0x10 | |
ADDMOD | ||
ORIGIN | ||
MSTORE8 | ||
PUSH! 0x20 | ||
PUSH1 0x20 | ||
SSTORE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
320 changes: 1 addition & 319 deletions
320
...tcases/taint/example08/untyped_program.evm-testcases_taint_example08_example08.sol().json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,319 +1 @@ | ||
{ | ||
"name": "untyped program::evm-testcases/taint/example08/example08.sol()", | ||
"description": null, | ||
"nodes": [ | ||
{ | ||
"id": 0, | ||
"subNodes": [ | ||
1 | ||
], | ||
"text": "PUSH1 0x20" | ||
}, | ||
{ | ||
"id": 1, | ||
"text": "0x20" | ||
}, | ||
{ | ||
"id": 2, | ||
"subNodes": [ | ||
3 | ||
], | ||
"text": "PUSH1 0x10" | ||
}, | ||
{ | ||
"id": 3, | ||
"text": "0x10" | ||
}, | ||
{ | ||
"id": 4, | ||
"text": "GAS" | ||
}, | ||
{ | ||
"id": 5, | ||
"text": "NOT" | ||
}, | ||
{ | ||
"id": 6, | ||
"subNodes": [ | ||
7 | ||
], | ||
"text": "PUSH1 0x30" | ||
}, | ||
{ | ||
"id": 7, | ||
"text": "0x30" | ||
}, | ||
{ | ||
"id": 8, | ||
"subNodes": [ | ||
9 | ||
], | ||
"text": "PUSH1 0x10" | ||
}, | ||
{ | ||
"id": 9, | ||
"text": "0x10" | ||
}, | ||
{ | ||
"id": 10, | ||
"text": "ADDMOD" | ||
}, | ||
{ | ||
"id": 11, | ||
"text": "ORIGIN" | ||
}, | ||
{ | ||
"id": 12, | ||
"text": "MSTORE8" | ||
}, | ||
{ | ||
"id": 13, | ||
"text": "SSTORE" | ||
}, | ||
{ | ||
"id": 14, | ||
"text": "ret" | ||
} | ||
], | ||
"edges": [ | ||
{ | ||
"sourceId": 0, | ||
"destId": 2, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 2, | ||
"destId": 4, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 4, | ||
"destId": 5, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 5, | ||
"destId": 6, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 6, | ||
"destId": 8, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 8, | ||
"destId": 10, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 10, | ||
"destId": 11, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 11, | ||
"destId": 12, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 12, | ||
"destId": 13, | ||
"kind": "SequentialEdge" | ||
}, | ||
{ | ||
"sourceId": 13, | ||
"destId": 14, | ||
"kind": "SequentialEdge" | ||
} | ||
], | ||
"descriptions": [ | ||
{ | ||
"nodeId": 0, | ||
"description": { | ||
"expressions": [ | ||
"push \"0x20\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 1, | ||
"description": { | ||
"expressions": [ | ||
"\"0x20\"" | ||
], | ||
"state": "#TOP#" | ||
} | ||
}, | ||
{ | ||
"nodeId": 2, | ||
"description": { | ||
"expressions": [ | ||
"push \"0x10\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 3, | ||
"description": { | ||
"expressions": [ | ||
"\"0x10\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 4, | ||
"description": { | ||
"expressions": [ | ||
"gas 1" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 5, | ||
"description": { | ||
"expressions": [ | ||
"not 1" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 6, | ||
"description": { | ||
"expressions": [ | ||
"push \"0x30\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 7, | ||
"description": { | ||
"expressions": [ | ||
"\"0x30\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 8, | ||
"description": { | ||
"expressions": [ | ||
"push \"0x10\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 9, | ||
"description": { | ||
"expressions": [ | ||
"\"0x10\"" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 10, | ||
"description": { | ||
"expressions": [ | ||
"addmod 1" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 11, | ||
"description": { | ||
"expressions": [ | ||
"origin 1" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, T]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 12, | ||
"description": { | ||
"expressions": [ | ||
"mstore8 1" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 13, | ||
"description": { | ||
"expressions": [ | ||
"sstore 1" | ||
], | ||
"state": { | ||
"heap": "monolith", | ||
"type": "#TOP#", | ||
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_]" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": 14, | ||
"description": { | ||
"expressions": [ | ||
"skip" | ||
], | ||
"state": "#TOP#" | ||
} | ||
} | ||
] | ||
} | ||
{"name":"untyped program::evm-testcases/taint/example08/example08.sol()","description":null,"nodes":[{"id":0,"subNodes":[1],"text":"PUSH1 0x20"},{"id":1,"text":"0x20"},{"id":2,"subNodes":[3],"text":"PUSH1 0x10"},{"id":3,"text":"0x10"},{"id":4,"text":"GAS"},{"id":5,"text":"NOT"},{"id":6,"subNodes":[7],"text":"PUSH1 0x30"},{"id":7,"text":"0x30"},{"id":8,"subNodes":[9],"text":"PUSH1 0x10"},{"id":9,"text":"0x10"},{"id":10,"text":"ADDMOD"},{"id":11,"text":"ORIGIN"},{"id":12,"text":"MSTORE8"},{"id":13,"subNodes":[14],"text":"PUSH1 0x20"},{"id":14,"text":"0x20"},{"id":15,"text":"SSTORE"},{"id":16,"text":"ret"}],"edges":[{"sourceId":0,"destId":2,"kind":"SequentialEdge"},{"sourceId":2,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"SequentialEdge"},{"sourceId":6,"destId":8,"kind":"SequentialEdge"},{"sourceId":8,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":11,"kind":"SequentialEdge"},{"sourceId":11,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":15,"kind":"SequentialEdge"},{"sourceId":15,"destId":16,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["push \"0x20\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]"}}},{"nodeId":1,"description":{"expressions":["\"0x20\""],"state":"#TOP#"}},{"nodeId":2,"description":{"expressions":["push \"0x10\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]"}}},{"nodeId":3,"description":{"expressions":["\"0x10\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]"}}},{"nodeId":4,"description":{"expressions":["gas 1"],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"}}},{"nodeId":5,"description":{"expressions":["not 1"],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"}}},{"nodeId":6,"description":{"expressions":["push \"0x30\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C]"}}},{"nodeId":7,"description":{"expressions":["\"0x30\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"}}},{"nodeId":8,"description":{"expressions":["push \"0x10\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C, C]"}}},{"nodeId":9,"description":{"expressions":["\"0x10\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C]"}}},{"nodeId":10,"description":{"expressions":["addmod 1"],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"}}},{"nodeId":11,"description":{"expressions":["origin 1"],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, T]"}}},{"nodeId":12,"description":{"expressions":["mstore8 1"],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]"}}},{"nodeId":13,"description":{"expressions":["push \"0x20\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"}}},{"nodeId":14,"description":{"expressions":["\"0x20\""],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]"}}},{"nodeId":15,"description":{"expressions":["sstore 1"],"state":{"heap":"monolith","type":"#TOP#","value":"[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]"}}},{"nodeId":16,"description":{"expressions":["skip"],"state":"#TOP#"}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
TIMESTAMP | ||
PUSH1 0x20 | ||
BLOCKHASH | ||
PUSH1 0x10 | ||
PUSH1 0x30 | ||
PC | ||
PUSH1 0x20 | ||
CODECOPY | ||
DUP1 | ||
DUP3 |
Oops, something went wrong.