You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with slither and trying to write an analysis module to do the following:
find all modifier implementations
in each modifier find each equivalence comparison and mark them
find all execution paths where a marked variable remains unchecked
modifier example {
bool intermediate = msg.sender == owner; // should not trigger here
require(intermediate);
}
However, the problem seems to be as follows:
Statement 1's IR statements roughly looks like this:
tmp_0 = comparison
intermediate = tmp_0
Unfortunately, I believe the available dataflow libraries do not allow me to then check whether the local variable in the require statement depends on the temporary variable in the IR expansion of the earlier statement.
Lmk if I'm missing something here 🙏 .
The text was updated successfully, but these errors were encountered:
This looks like a regression caused by #1984 which should be fixed by #2201. The SSA IR was not being created correctly (run slither --print slithir-ssa) due to the is_reachable property not being set (this affects the dominator calculation and thus SSA generation and data dependency analysis). We should have caught this in testing so I will make sure a data dependency and SSA IR for modifiers is running in CI
Describe the desired feature
I was playing around with slither and trying to write an analysis module to do the following:
However, the problem seems to be as follows:
Statement 1's IR statements roughly looks like this:
tmp_0 = comparison
intermediate = tmp_0
Unfortunately, I believe the available dataflow libraries do not allow me to then check whether the local variable in the require statement depends on the temporary variable in the IR expansion of the earlier statement.
Lmk if I'm missing something here 🙏 .
The text was updated successfully, but these errors were encountered: