Tracking: imprecision of data dependencies on structures and arrays
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
```bash
echo "pragma solidity ^0.5.3;
contract C {
struct S { uint x; }
function x() external pure returns (address) {
S memory s;
s.x = 1;
}
}" > a.sol && slither a.sol
INFO:Detectors:
s in C.x() (a.sol#7) is a local variable never initialiazed
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables
INFO:Slither:a.sol analyzed (1 contracts with 38 detectors), 1 result(s) found
```
Returns that `s` is never initialized, when in fact we populate all of its fields in the following line
Related to https://github.com/crytic/slither/issues/270 and https://github.com/crytic/slither/issues/112 probably
Contributor guide
Assessment
This issue has not been assessed yet.