-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linter: Warn about strict balance equality (#1914)
* feat(linter): strict balance equality lint The current implementation works only with intraprocedural MIR and does not support taint propagation across function calls. Closes #1811 * feat(lint): Handle temporary values resulted after Rvalue::Use * fix(lint): spans to emit diagnostics Previously, diagnostics did not work, since `terminator.span` is resulted after macro expansion * feat(tests): more tests * feat(lint): Manually traverse functions in user-defined code This is required to implement interprocedural analysis * feat(lint): interprocedural analysis that finds tainted returns * fix(lint): recursive calls in interprocedural analysis * fix(lint): false negative on `CheckedBinaryOp` * feat(lint): propagation through references * feat(lint): Propagate tainted values through `&mut` arguments * chore(lint): docstring, comments * feat(lint): handle comparison of references in functions * chore(tests): comments * feat(lint+tests): updated `pass` test, fixed binop conditions * feat(tests): test for lint suppressions * chore(tests): fmt * chore(tests): fmt * chore: Add changelog entry * chore(lint): Reuse utility functions introduced in #1932 * chore: Fix changelog * chore: Fix comments
- Loading branch information
Showing
10 changed files
with
876 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.