[Bug-Candidate]: Slither seems to report erroneous error for bits shifts opcodes in assembly/Yul (shl(...)
)
#1254
Labels
bug-candidate
Bugs reports that are not yet confirmed
Milestone
Describe the issue:
I have the following contract code below, that use bit shifts to create a mask that can be used to compare if part of a
byte32
value given as input matches with the same part of abytes32
state variable retrieved from the contract storage.See contract example below to reproduce the exact behaviour.
As you can see below, I use assembly to do the bitshift for efficiency and save gas.
When testing the function, it works fine and work as expected.
However, Slither reports me the following error: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-shift-in-assembly
What I do not understand is that according to the Yul specification in the Solidity docs, the order of parameters is correct.
Code example to reproduce the issue:
Version:
0.8.3 (latest)
Relevant log output:
This is the actual error that seems to be reported incorrectly
There are also these informational warnings
The text was updated successfully, but these errors were encountered: