balazske planned changes to this revision.
balazske added a comment.
Herald added subscribers: martong, Charusso.
This patch is here for code reference only. Although the whole checker does not
work safe in this way the idea behind this approach can be useful.
Repository:
rG LLVM Github
balazske added a comment.
Smaller diff with first part:
https://reviews.llvm.org/D72705
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
___
cfe-commits mailing
balazske added a comment.
I wanted to implement the rules described here:
https://wiki.sei.cmu.edu/confluence/display/c/ERR33-C.+Detect+and+handle+standard+library+errors
This lists the functions to check so this knowledge has to be built into the
checker and there are examples of this in other
balazske added a comment.
The checker was implemented in smaller parts that are visible in the commit
list. I can split the patch at the commits (and figure out how to use git
history manipulations and phabricator in a better way?).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
NoQ added a comment.
Uh-oh, what happened here?
Please don't post huge patches. 600 lines of code is huge. You could start off
by implementing a single check (eg., `NullErrorResultChecker`) with a single
library function and then add more checks and more functions in follow-up
patches; this
balazske updated this revision to Diff 237680.
balazske added a comment.
- Improved function list format in documentation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
Files:
balazske added a reviewer: NoQ.
balazske added a comment.
Checker was tested with tmux, no problems found (there are false positives but
not easy to fix).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
balazske updated this revision to Diff 237061.
balazske added a comment.
- More fixes in test files.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
Files:
clang/docs/analyzer/checkers.rst
balazske updated this revision to Diff 237053.
balazske added a comment.
- Prevent warning if call is in a return statement.
- Prevent warning if call is casted to void.
- Added documentation.
- Fixed the tests.
- Some other fixes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
balazske marked 3 inline comments as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/ErrorReturnChecker.cpp:77
+// This should work with any type of null value.
+// FIXME: Is this different from the ValueErrorResultChecker with 0 as value?
gamesh411 added a comment.
Great job, this seems to be progressing nicely! please see my comments inline.
Comment at: clang/lib/StaticAnalyzer/Checkers/ErrorReturnChecker.cpp:38
+ // See if the result value from the system function (to check) is checked for
+ // error after
balazske updated this revision to Diff 236349.
balazske added a comment.
- Added variadic functions, improved comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
Files:
balazske added a comment.
Works relatively good now but not perfect. The tests are sometimes too strict
so there are some false positives, for example this case:
unsigned long X = strtoul("345", NULL, 10);
if (X > 100) {
// handle error
}
The result is not checked for `ULONG_MAX` but
balazske updated this revision to Diff 236070.
balazske added a comment.
- Implemented all (now possible) functions.
- Moved ParmVal value to own state map.
- Improved state data and bug reporting.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
balazske updated this revision to Diff 234730.
balazske added a comment.
Adding a new diff over the previous one.
(The commit was amended accidentally.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
balazske added a comment.
Code is to be reformatted later.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71510/new/
https://reviews.llvm.org/D71510
___
cfe-commits mailing list
balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, mgorny.
Herald added a project: clang.
Currently work-in-progress.
This should check if the return values from certain C API functions
are checked for error. The list of functions is included.
A
17 matches
Mail list logo