Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
slither/tests/detectors/write-after-write/0.8.0/write-after-write.sol.0.8.0...

1096 lines
54 KiB

[
[
{
"elements": [
{
"type": "variable",
"name": "state",
"source_mapping": {
"start": 20,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
3
],
"starting_column": 5,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "node",
"name": "state = 10",
"source_mapping": {
"start": 157,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
10
],
"starting_column": 9,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "buggy_state",
"source_mapping": {
"start": 116,
"length": 78,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "buggy_state()"
}
}
}
},
{
"type": "node",
"name": "state = 20",
"source_mapping": {
"start": 177,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
11
],
"starting_column": 9,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "buggy_state",
"source_mapping": {
"start": 116,
"length": 78,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "buggy_state()"
}
}
}
}
],
"description": "Test.state (tests/detectors/write-after-write/0.8.0/write-after-write.sol#3) is written in both\n\tstate = 10 (tests/detectors/write-after-write/0.8.0/write-after-write.sol#10)\n\tstate = 20 (tests/detectors/write-after-write/0.8.0/write-after-write.sol#11)\n",
"markdown": "[Test.state](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L3) is written in both\n\t[state = 10](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L10)\n\t[state = 20](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L11)\n",
"first_markdown_element": "tests/detectors/write-after-write/0.8.0/write-after-write.sol#L3",
"id": "64790630557e580454dbeb00f1d35e07d162ed1ab46201e66fd4e686f3806402",
"check": "write-after-write",
"impact": "Medium",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "a",
"source_mapping": {
"start": 351,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
21
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "buggy_local",
"source_mapping": {
"start": 310,
"length": 86,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
20,
21,
22,
23,
24
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "buggy_local()"
}
}
}
},
{
"type": "node",
"name": "a = 10",
"source_mapping": {
"start": 367,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
22
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "buggy_local",
"source_mapping": {
"start": 310,
"length": 86,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
20,
21,
22,
23,
24
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "buggy_local()"
}
}
}
},
{
"type": "node",
"name": "a = 20",
"source_mapping": {
"start": 383,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
23
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "buggy_local",
"source_mapping": {
"start": 310,
"length": 86,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
20,
21,
22,
23,
24
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "buggy_local()"
}
}
}
}
],
"description": "Test.buggy_local().a (tests/detectors/write-after-write/0.8.0/write-after-write.sol#21) is written in both\n\ta = 10 (tests/detectors/write-after-write/0.8.0/write-after-write.sol#22)\n\ta = 20 (tests/detectors/write-after-write/0.8.0/write-after-write.sol#23)\n",
"markdown": "[Test.buggy_local().a](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L21) is written in both\n\t[a = 10](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L22)\n\t[a = 20](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L23)\n",
"first_markdown_element": "tests/detectors/write-after-write/0.8.0/write-after-write.sol#L21",
"id": "db1316a3aebb9fb6df78eecf60236950d2aff43986dd01ca362739b8b582e848",
"check": "write-after-write",
"impact": "Medium",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "local",
"source_mapping": {
"start": 894,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
52
],
"starting_column": 9,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bugy_external_local",
"source_mapping": {
"start": 845,
"length": 145,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
51,
52,
53,
54,
55,
56,
57
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bugy_external_local()"
}
}
}
},
{
"type": "node",
"name": "local = 10",
"source_mapping": {
"start": 914,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
53
],
"starting_column": 9,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bugy_external_local",
"source_mapping": {
"start": 845,
"length": 145,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
51,
52,
53,
54,
55,
56,
57
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bugy_external_local()"
}
}
}
},
{
"type": "node",
"name": "local = 11",
"source_mapping": {
"start": 973,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
56
],
"starting_column": 9,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bugy_external_local",
"source_mapping": {
"start": 845,
"length": 145,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
51,
52,
53,
54,
55,
56,
57
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 992,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/write-after-write/0.8.0/write-after-write.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bugy_external_local()"
}
}
}
}
],
"description": "Test.bugy_external_local().local (tests/detectors/write-after-write/0.8.0/write-after-write.sol#52) is written in both\n\tlocal = 10 (tests/detectors/write-after-write/0.8.0/write-after-write.sol#53)\n\tlocal = 11 (tests/detectors/write-after-write/0.8.0/write-after-write.sol#56)\n",
"markdown": "[Test.bugy_external_local().local](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L52) is written in both\n\t[local = 10](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L53)\n\t[local = 11](tests/detectors/write-after-write/0.8.0/write-after-write.sol#L56)\n",
"first_markdown_element": "tests/detectors/write-after-write/0.8.0/write-after-write.sol#L52",
"id": "e6a01bd710ad6a82ab7c53e035a1fa150b8606aa6149e4d370fadd49f5128904",
"check": "write-after-write",
"impact": "Medium",
"confidence": "High"
}
]
]