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/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol.0.8.0...

1070 lines
53 KiB

[
[
{
"elements": [
{
"type": "variable",
"name": "state",
"source_mapping": {
"start": 20,
"length": 10,
"filename_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#3) is written in both\n\tstate = 10 (tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#10)\n\tstate = 20 (tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#11)\n",
"markdown": "[Test.state](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L3) is written in both\n\t[state = 10](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L10)\n\t[state = 20](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L11)\n",
"first_markdown_element": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L3",
"id": "ac5839f78b0995be85eede2862996d38a3a50c70e92668462f31fadce02f081e",
"check": "write-after-write",
"impact": "Medium",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "local",
"source_mapping": {
"start": 894,
"length": 10,
"filename_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#52) is written in both\n\tlocal = 10 (tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#53)\n\tlocal = 11 (tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#56)\n",
"markdown": "[Test.bugy_external_local().local](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L52) is written in both\n\t[local = 10](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L53)\n\t[local = 11](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L56)\n",
"first_markdown_element": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L52",
"id": "bbb2aea426252f6fa0c1bb26bc05cdadfa245207b59273fcd3a5afcdaff675ce",
"check": "write-after-write",
"impact": "Medium",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "a",
"source_mapping": {
"start": 351,
"length": 6,
"filename_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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_relative": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/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/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#21) is written in both\n\ta = 10 (tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#22)\n\ta = 20 (tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#23)\n",
"markdown": "[Test.buggy_local().a](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L21) is written in both\n\t[a = 10](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L22)\n\t[a = 20](tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L23)\n",
"first_markdown_element": "tests/e2e/detectors/test_data/write-after-write/0.8.0/write-after-write.sol#L21",
"id": "f676e1dedd369680cb4b83867fa0f2bc5ff5e9d7f9e089fcbb31a824c77e2bb8",
"check": "write-after-write",
"impact": "Medium",
"confidence": "High"
}
]
]