Anna Zaks
|
e172e8b9e7
Remove EnhancedBugReport and RangedBugReport - pull all the extra functionality they provided into their parent BugReport. The only functional changes are: made getRanges() non const - it adds default range to Ranges if none are supplied, made getStmt() private, which was another FIXME.
|
14 éve |
Ted Kremenek
|
18c66fdc3c
Rename GRState to ProgramState, and cleanup some code formatting along the way.
|
14 éve |
Ted Kremenek
|
9c378f7054
Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.
|
14 éve |
Jordy Rose
|
096aef9597
[analyzer] Nitpicks on Olaf's patch, which I meant to e-mail but then didn't in
|
14 éve |
Ted Kremenek
|
9697934650
[analyzer] Introduce new MemRegion, "TypedValueRegion", so that we can separate TypedRegions that implement getValueType() from those that don't.
|
14 éve |
Chris Lattner
|
5f9e272e63
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
|
14 éve |
Jordy Rose
|
8912aaedb4
[analyzer] Finish size argument checking for strncat (and strncpy).
|
14 éve |
Jordy Rose
|
8cc2491239
[analyzer] Replace stream-built error message with constant string. No functionality change.
|
14 éve |
Jordy Rose
|
5e5f15062b
[analyzer] Re-enable checking for strncpy, along with a new validation of the size argument. strncat is not yet up-to-date, but I'm leaving it enabled for now (there shouldn't be any false positives, at least...)
|
14 éve |
Jordy Rose
|
9e49d9fbdc
[analyzer] Eliminate "byte string function" from CStringChecker's diagnostics, and make it easier to provide custom messages for overflow checking, in preparation for re-enabling strncpy checking.
|
14 éve |
Jordy Rose
|
adc42d412d
[analyzer] Clean up modeling of strcmp, including cases where a string literal has an embedded null character, and where both arguments are the same buffer. Also use nested ifs rather than early returns; in this case early returns will lose any assumptions we've made earlier in the function.
|
14 éve |
Jordy Rose
|
ee2fde1293
[analyzer] Fix trivial errors in previous commit.
|
14 éve |
Jordy Rose
|
1e022415b9
[analyzer] Cleanup: mainly 80-char violations and preferring SValBuilder::getComparisonType() to just referencing IntTy.
|
14 éve |
Jordy Rose
|
d5af0e17b0
[analyzer] Revise CStringChecker's modelling of strcpy() and strcat():
|
14 éve |
Jordy Rose
|
210c05b103
[analyzer] If a C string length is UnknownVal, clear any existing length binding. No tests yet because the only thing that sets string length is strcpy(), and that needs some work anyway.
|
14 éve |
Jordy Rose
|
bd32beee8a
[analyzer] Change large if body to early return. No functionality change.
|
14 éve |
Jordy Rose
|
793bff3fb7
[analyzer] Fix modeling of strnlen to be more conservative. Move tests we can't properly model (yet?) to string-fail.c.
|
14 éve |
Jordy Rose
|
7182b9652f
[analyzer] Change an indent-if to an early return. No functionality change.
|
14 éve |
Jordy Rose
|
3f8bb2fa28
[analyzer] Don't crash when copying an unknown number of bytes with memcpy(). Also handle all memcpy-family return values in evalCopyCommon(), rather than having some outside and some inside.
|
14 éve |
Jordy Rose
|
7eb83caea1
[analyzer] Remove extra assignment that actually lost a few of the assumptions.
|
14 éve |
Jordy Rose
|
c152586baf
[analyzer] Fix comment for (still-disabled) evalStrncpy
|
14 éve |
Jordy Rose
|
22d27178bf
[analyzer] Fix handling of "copy zero bytes" for memcpy and friends.
|
14 éve |
Jordy Rose
|
be460d8e53
[analyzer] __mempcpy_chk is the same as mempcpy (at least to CStringChecker)
|
14 éve |
Lenny Maiorani
|
094ea0afcf
Removing strncpy() checking in CString checker for now. Some significant changes need to be made to properly support modeling of it since it potentially leaves strings non-null terminated.
|
14 éve |
Ted Kremenek
|
35bdbf4062
Augment retain/release checker to not warn about tracked objects passed as arguments to C++ constructors. This is a stop-gap measure for Objective-C++ code that uses smart pointers to manage reference counts.
|
14 éve |
Lenny Maiorani
|
454fd2d3a1
Implements strncasecmp() checker and simplifies some of the logic around creating substrings if necessary and calling the appropriate StringRef::compare/compare_lower().
|
14 éve |
Lenny Maiorani
|
401549d71f
Use StringRef::substr() and unbounded StringRef::compare() instead of bounded version of StringRef::compare() because bounded version of StringRef::compare() is going to be removed.
|
14 éve |
Lenny Maiorani
|
508c627db6
Eliminates an assert in the strncpy/strncat checker caused by not validating a cast was successful. If the value of an argument was unknown, the cast would result in a NULL pointer which was later being dereferenced.
|
14 éve |
Lenny Maiorani
|
bd1d16a179
Implements strcasecmp() checker in Static Analyzer.
|
14 éve |
Lenny Maiorani
|
357f6ee9f1
Implements the strncmp() checker just like the strcmp() checker, but with bounds. Requires LLVM svn r129582.
|
14 éve |