Skip to content

Commit 79e4325

Browse files
Add test for MSTORE
1 parent 33a0b64 commit 79e4325

File tree

4 files changed

+154
-0
lines changed

4 files changed

+154
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PUSH32 0x000000000000000000000000be286431454714f511008713973d3b053a2d38f3
2+
PUSH1 0xA0
3+
MSTORE
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"warnings" : [ ],
3+
"files" : [ "report.json", "untyped_program.evm-testcases_cfs_mstore2_mstore_eth.sol().json" ],
4+
"info" : {
5+
"cfgs" : "1",
6+
"duration" : "297ms",
7+
"end" : "2025-05-10T16:34:19.426+02:00",
8+
"expressions" : "2",
9+
"files" : "1",
10+
"globals" : "0",
11+
"members" : "1",
12+
"programs" : "1",
13+
"start" : "2025-05-10T16:34:19.129+02:00",
14+
"statements" : "3",
15+
"units" : "0",
16+
"version" : "0.1",
17+
"warnings" : "0"
18+
},
19+
"configuration" : {
20+
"analysisGraphs" : "NONE",
21+
"descendingPhaseType" : "NONE",
22+
"dumpForcesUnwinding" : "false",
23+
"fixpointWorkingSet" : "DuplicateFreeFIFOWorkingSet",
24+
"glbThreshold" : "5",
25+
"hotspots" : "unset",
26+
"jsonOutput" : "true",
27+
"openCallPolicy" : "WorstCasePolicy",
28+
"optimize" : "false",
29+
"recursionWideningThreshold" : "5",
30+
"semanticChecks" : "JumpSolver",
31+
"serializeInputs" : "false",
32+
"serializeResults" : "true",
33+
"syntacticChecks" : "",
34+
"useWideningPoints" : "false",
35+
"wideningThreshold" : "5",
36+
"workdir" : "evm-outputs/cfs/mstore2"
37+
}
38+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"name": "untyped program::evm-testcases/cfs/mstore2/mstore_eth.sol()",
3+
"description": null,
4+
"nodes": [
5+
{
6+
"id": 0,
7+
"subNodes": [
8+
1
9+
],
10+
"text": "PUSH32 0x000000000000000000000000be286431454714f511008713973d3b053a2d38f3"
11+
},
12+
{
13+
"id": 1,
14+
"text": "0x000000000000000000000000be286431454714f511008713973d3b053a2d38f3"
15+
},
16+
{
17+
"id": 2,
18+
"subNodes": [
19+
3
20+
],
21+
"text": "PUSH1 0xA0"
22+
},
23+
{
24+
"id": 3,
25+
"text": "0xA0"
26+
},
27+
{
28+
"id": 4,
29+
"text": "MSTORE"
30+
}
31+
],
32+
"edges": [
33+
{
34+
"sourceId": 0,
35+
"destId": 2,
36+
"kind": "SequentialEdge"
37+
},
38+
{
39+
"sourceId": 2,
40+
"destId": 4,
41+
"kind": "SequentialEdge"
42+
}
43+
],
44+
"descriptions": [
45+
{
46+
"nodeId": 0,
47+
"description": {
48+
"expressions": [
49+
"push \"0x000000000000000000000000be286431454714f511008713973d3b053a2d38f3\""
50+
],
51+
"state": {
52+
"heap": "monolith",
53+
"type": "#TOP#",
54+
"value": "{ stacks: [[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, 1085609004258985699531077077675811919833844234483]], memory: EMPTY, storage: #TOP# }"
55+
}
56+
}
57+
},
58+
{
59+
"nodeId": 1,
60+
"description": {
61+
"expressions": [
62+
"\"0x000000000000000000000000be286431454714f511008713973d3b053a2d38f3\""
63+
],
64+
"state": "#TOP#"
65+
}
66+
},
67+
{
68+
"nodeId": 2,
69+
"description": {
70+
"expressions": [
71+
"push \"0xA0\""
72+
],
73+
"state": {
74+
"heap": "monolith",
75+
"type": "#TOP#",
76+
"value": "{ stacks: [[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, 1085609004258985699531077077675811919833844234483, 160]], memory: EMPTY, storage: #TOP# }"
77+
}
78+
}
79+
},
80+
{
81+
"nodeId": 3,
82+
"description": {
83+
"expressions": [
84+
"\"0xA0\""
85+
],
86+
"state": {
87+
"heap": "monolith",
88+
"type": "#TOP#",
89+
"value": "{ stacks: [[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, 1085609004258985699531077077675811919833844234483]], memory: EMPTY, storage: #TOP# }"
90+
}
91+
}
92+
},
93+
{
94+
"nodeId": 4,
95+
"description": {
96+
"expressions": [
97+
"mstore 1"
98+
],
99+
"state": {
100+
"heap": "monolith",
101+
"type": "#TOP#",
102+
"value": "{ stacks: [[_|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_, _|_]], memory: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BE286431454714F511008713973D3B053A2D38F3, storage: #TOP# }"
103+
}
104+
}
105+
}
106+
]
107+
}

src/test/java/it/unipr/analysis/cron/semantics/EVMAbstractSemanticsTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ public void testMstore() throws AnalysisSetupException, IOException {
9797
CronConfiguration conf = createConfiguration("cfs", "mstore", "mstore_eth.sol", false);
9898
perform(conf);
9999
}
100+
101+
@Test
102+
public void testMstore2() throws AnalysisSetupException, IOException {
103+
CronConfiguration conf = createConfiguration("cfs", "mstore2", "mstore_eth.sol", false);
104+
perform(conf);
105+
}
100106

101107
@Test
102108
public void testMstore8() throws AnalysisSetupException, IOException {

0 commit comments

Comments
 (0)