Skip to content

Commit 5a00323

Browse files
committed
Fixed bug in test and added test for opcode
1 parent afdb6f3 commit 5a00323

File tree

6 files changed

+56
-325
lines changed

6 files changed

+56
-325
lines changed

evm-testcases/taint/example08/example08.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ PUSH1 0x10
77
ADDMOD
88
ORIGIN
99
MSTORE8
10-
PUSH! 0x20
10+
PUSH1 0x20
1111
SSTORE

evm-testcases/taint/example08/report.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"files" : [ "report.json", "untyped_program.evm-testcases_taint_example08_example08.sol().json" ],
44
"info" : {
55
"cfgs" : "1",
6-
"duration" : "350ms",
7-
"end" : "2024-12-17T12:09:41.339+01:00",
8-
"expressions" : "4",
6+
"duration" : "107ms",
7+
"end" : "2024-12-29T10:31:09.534+01:00",
8+
"expressions" : "5",
99
"files" : "1",
1010
"globals" : "0",
1111
"members" : "1",
1212
"programs" : "1",
13-
"start" : "2024-12-17T12:09:40.989+01:00",
14-
"statements" : "11",
13+
"start" : "2024-12-29T10:31:09.427+01:00",
14+
"statements" : "12",
1515
"units" : "0",
1616
"version" : "0.1",
1717
"warnings" : "0"
Lines changed: 1 addition & 319 deletions
Original file line numberDiff line numberDiff line change
@@ -1,319 +1 @@
1-
{
2-
"name": "untyped program::evm-testcases/taint/example08/example08.sol()",
3-
"description": null,
4-
"nodes": [
5-
{
6-
"id": 0,
7-
"subNodes": [
8-
1
9-
],
10-
"text": "PUSH1 0x20"
11-
},
12-
{
13-
"id": 1,
14-
"text": "0x20"
15-
},
16-
{
17-
"id": 2,
18-
"subNodes": [
19-
3
20-
],
21-
"text": "PUSH1 0x10"
22-
},
23-
{
24-
"id": 3,
25-
"text": "0x10"
26-
},
27-
{
28-
"id": 4,
29-
"text": "GAS"
30-
},
31-
{
32-
"id": 5,
33-
"text": "NOT"
34-
},
35-
{
36-
"id": 6,
37-
"subNodes": [
38-
7
39-
],
40-
"text": "PUSH1 0x30"
41-
},
42-
{
43-
"id": 7,
44-
"text": "0x30"
45-
},
46-
{
47-
"id": 8,
48-
"subNodes": [
49-
9
50-
],
51-
"text": "PUSH1 0x10"
52-
},
53-
{
54-
"id": 9,
55-
"text": "0x10"
56-
},
57-
{
58-
"id": 10,
59-
"text": "ADDMOD"
60-
},
61-
{
62-
"id": 11,
63-
"text": "ORIGIN"
64-
},
65-
{
66-
"id": 12,
67-
"text": "MSTORE8"
68-
},
69-
{
70-
"id": 13,
71-
"text": "SSTORE"
72-
},
73-
{
74-
"id": 14,
75-
"text": "ret"
76-
}
77-
],
78-
"edges": [
79-
{
80-
"sourceId": 0,
81-
"destId": 2,
82-
"kind": "SequentialEdge"
83-
},
84-
{
85-
"sourceId": 2,
86-
"destId": 4,
87-
"kind": "SequentialEdge"
88-
},
89-
{
90-
"sourceId": 4,
91-
"destId": 5,
92-
"kind": "SequentialEdge"
93-
},
94-
{
95-
"sourceId": 5,
96-
"destId": 6,
97-
"kind": "SequentialEdge"
98-
},
99-
{
100-
"sourceId": 6,
101-
"destId": 8,
102-
"kind": "SequentialEdge"
103-
},
104-
{
105-
"sourceId": 8,
106-
"destId": 10,
107-
"kind": "SequentialEdge"
108-
},
109-
{
110-
"sourceId": 10,
111-
"destId": 11,
112-
"kind": "SequentialEdge"
113-
},
114-
{
115-
"sourceId": 11,
116-
"destId": 12,
117-
"kind": "SequentialEdge"
118-
},
119-
{
120-
"sourceId": 12,
121-
"destId": 13,
122-
"kind": "SequentialEdge"
123-
},
124-
{
125-
"sourceId": 13,
126-
"destId": 14,
127-
"kind": "SequentialEdge"
128-
}
129-
],
130-
"descriptions": [
131-
{
132-
"nodeId": 0,
133-
"description": {
134-
"expressions": [
135-
"push \"0x20\""
136-
],
137-
"state": {
138-
"heap": "monolith",
139-
"type": "#TOP#",
140-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]"
141-
}
142-
}
143-
},
144-
{
145-
"nodeId": 1,
146-
"description": {
147-
"expressions": [
148-
"\"0x20\""
149-
],
150-
"state": "#TOP#"
151-
}
152-
},
153-
{
154-
"nodeId": 2,
155-
"description": {
156-
"expressions": [
157-
"push \"0x10\""
158-
],
159-
"state": {
160-
"heap": "monolith",
161-
"type": "#TOP#",
162-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]"
163-
}
164-
}
165-
},
166-
{
167-
"nodeId": 3,
168-
"description": {
169-
"expressions": [
170-
"\"0x10\""
171-
],
172-
"state": {
173-
"heap": "monolith",
174-
"type": "#TOP#",
175-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C]"
176-
}
177-
}
178-
},
179-
{
180-
"nodeId": 4,
181-
"description": {
182-
"expressions": [
183-
"gas 1"
184-
],
185-
"state": {
186-
"heap": "monolith",
187-
"type": "#TOP#",
188-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"
189-
}
190-
}
191-
},
192-
{
193-
"nodeId": 5,
194-
"description": {
195-
"expressions": [
196-
"not 1"
197-
],
198-
"state": {
199-
"heap": "monolith",
200-
"type": "#TOP#",
201-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"
202-
}
203-
}
204-
},
205-
{
206-
"nodeId": 6,
207-
"description": {
208-
"expressions": [
209-
"push \"0x30\""
210-
],
211-
"state": {
212-
"heap": "monolith",
213-
"type": "#TOP#",
214-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C]"
215-
}
216-
}
217-
},
218-
{
219-
"nodeId": 7,
220-
"description": {
221-
"expressions": [
222-
"\"0x30\""
223-
],
224-
"state": {
225-
"heap": "monolith",
226-
"type": "#TOP#",
227-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"
228-
}
229-
}
230-
},
231-
{
232-
"nodeId": 8,
233-
"description": {
234-
"expressions": [
235-
"push \"0x10\""
236-
],
237-
"state": {
238-
"heap": "monolith",
239-
"type": "#TOP#",
240-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C, C]"
241-
}
242-
}
243-
},
244-
{
245-
"nodeId": 9,
246-
"description": {
247-
"expressions": [
248-
"\"0x10\""
249-
],
250-
"state": {
251-
"heap": "monolith",
252-
"type": "#TOP#",
253-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, C]"
254-
}
255-
}
256-
},
257-
{
258-
"nodeId": 10,
259-
"description": {
260-
"expressions": [
261-
"addmod 1"
262-
],
263-
"state": {
264-
"heap": "monolith",
265-
"type": "#TOP#",
266-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C]"
267-
}
268-
}
269-
},
270-
{
271-
"nodeId": 11,
272-
"description": {
273-
"expressions": [
274-
"origin 1"
275-
],
276-
"state": {
277-
"heap": "monolith",
278-
"type": "#TOP#",
279-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C, C, T]"
280-
}
281-
}
282-
},
283-
{
284-
"nodeId": 12,
285-
"description": {
286-
"expressions": [
287-
"mstore8 1"
288-
],
289-
"state": {
290-
"heap": "monolith",
291-
"type": "#TOP#",
292-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, C, C]"
293-
}
294-
}
295-
},
296-
{
297-
"nodeId": 13,
298-
"description": {
299-
"expressions": [
300-
"sstore 1"
301-
],
302-
"state": {
303-
"heap": "monolith",
304-
"type": "#TOP#",
305-
"value": "[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_]"
306-
}
307-
}
308-
},
309-
{
310-
"nodeId": 14,
311-
"description": {
312-
"expressions": [
313-
"skip"
314-
],
315-
"state": "#TOP#"
316-
}
317-
}
318-
]
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,"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#"}}]}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TIMESTAMP
2+
PUSH1 0x20
3+
BLOCKHASH
4+
PUSH1 0x10
5+
PUSH1 0x30
6+
PC
7+
PUSH1 0x20
8+
CODECOPY
9+
DUP1
10+
DUP3

0 commit comments

Comments
 (0)