[Bug-Candidate]: Slither-mutate; ROR mutator doesn't respect whether the integer is signed
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the issue:
slither-mutate generates some mutations that are semantically equivalent in code that performs equality checks between unsigned integers and zero.
Example ROR mutation:
`INFO:Slither-Mutate:[ROR] Line 162: 'amount == 0' ==> 'amount <= 0' --> UNCAUGHT`
amount is an unsigned integer, so comparing <=0 instead of ==0 is semantically equivalent
### Code example to reproduce the issue:
```
contract Test{
function deposit( uint256 amount) external {
if (amount == 0) {
revert();
}
}
```
### Version:
Slither 0.11.0
### Relevant log output:
```shell
```
Contributor guide
Research direction
The issue provides no repository file, test, or entry point; start by locating the Slither-Mutate ROR mutator and run the Solidity reproduction shown in the report. Done means unsigned integer equality checks no longer produce semantically equivalent ROR mutations such as <= 0, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, solidity
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100