- Feb 22, 2012
-
-
Anna Zaks authored
, when we return a symbol reachable to the malloced one via pointer arithmetic. llvm-svn: 151121
-
- Feb 20, 2012
-
-
Anna Zaks authored
checks: - unix.Malloc - Checks for memory leaks, double free, use-after-free. - unix.cstring.NullArg - Checks for null pointers passed as arguments to CString functions + evaluates CString functions. - unix.cstring.BadSizeArg - Checks for common anti-patterns in strncat size argument. llvm-svn: 150988
-
- Feb 17, 2012
-
-
Anna Zaks authored
llvm-svn: 150847
-
Anna Zaks authored
it aware of CString APIs that return the input parameter. Malloc Checker needs to know how the 'strcpy' function is evaluated. Introduce the dependency on CStringChecker for that. CStringChecker knows all about these APIs. Addresses radar://10864450 llvm-svn: 150846
-
- Feb 16, 2012
-
-
Anna Zaks authored
llvm-svn: 150734
-
Anna Zaks authored
- Rename the category "Logic Error" -> "Memory Error". - Shorten all the messages. llvm-svn: 150733
-
Anna Zaks authored
We are not properly handling the memory regions that escape into struct fields, which led to a bunch of false positives. Be conservative here and give up when a pointer escapes into a struct. llvm-svn: 150658
-
- Feb 15, 2012
- Feb 14, 2012
-
-
Anna Zaks authored
in realloc map. If there is no dependency, the reallocated ptr will get garbage collected before we know that realloc failed, which would lead us to missing a memory leak warning. Also added new test cases, which we can handle now. Plus minor cleanups. llvm-svn: 150446
-
- Feb 13, 2012
-
-
Anna Zaks authored
case when size is 0. llvm-svn: 150412
-
Anna Zaks authored
1) Support the case when realloc fails to reduce False Positives. (We essentially need to restore the state of the pointer being reallocated.) 2) Realloc behaves differently under special conditions (from pointer is null, size is 0). When detecting these cases, we should consider under-constrained states (size might or might not be 0). The old version handled this in a very hacky way. The code did not differentiate between definite and possible (no consideration for under-constrained states). Further, after processing each special case, the realloc processing function did not return but chained to the next special case processing. So you could end up in an execution in which you first see the states in which size is 0 and realloc ~ free(), followed by the states corresponding to size is not 0 followed by the evaluation of the regular realloc behavior. llvm-svn: 150402
-
- Feb 12, 2012
-
-
Anna Zaks authored
a pointer cannot escape through calls to system functions. Also, stop after reporting the first use-after-free. llvm-svn: 150315
-
- Feb 11, 2012
-
-
Anna Zaks authored
memory. (As per one test case, the existing checker thought that this could cause a lot of false positives - not sure if that's valid, to be verified.) llvm-svn: 150313
-
Anna Zaks authored
Resolves a common false positive, where we were reporting a leak inside asserts llvm-svn: 150312
-
Anna Zaks authored
We use the same logic here as the RetainRelease checker. llvm-svn: 150311
-
- Feb 10, 2012
- Feb 09, 2012
-
-
Anna Zaks authored
Very simple so far - we just highlight every allocation and release site. llvm-svn: 150156
-
Anna Zaks authored
llvm-svn: 150155
-
Anna Zaks authored
which allows values to escape through unknown calls. Assumes all calls but the malloc family are unknown. Also, catch a use-after-free when a pointer is passed to a function after a call to free (previously, you had to explicitly dereference the pointer value). llvm-svn: 150112
-
- Sep 01, 2011
-
-
Zhongxing Xu authored
free() is returned by realloc(). Most code expect NULL. And we only need to transfer one final ProgramState. llvm-svn: 138937
-
- Aug 04, 2011
-
-
Ted Kremenek authored
[analyzer] rename all experimental checker packages to have 'experimental' be the common root package. llvm-svn: 136835
-
- Apr 27, 2011
-
-
Lenny Maiorani authored
More accurately model realloc() when the size argument is 0. realloc() with a size of 0 is equivalent to free(). The memory region should be marked as free and not used again. Unit tests f2_realloc_0(), f6_realloc(), and f7_realloc() contributed by Marshall Clow <mclow.lists@gmail.com>. Thanks! llvm-svn: 130303
-
- Mar 24, 2011
-
-
Ted Kremenek authored
llvm-svn: 128187
-
- Feb 28, 2011
-
-
Argyrios Kyrtzidis authored
llvm-svn: 126676
-
Argyrios Kyrtzidis authored
llvm-svn: 126617
-
Argyrios Kyrtzidis authored
llvm-svn: 126607
-
Argyrios Kyrtzidis authored
llvm-svn: 126606
-
- Feb 24, 2011
-
-
Argyrios Kyrtzidis authored
[analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore. llvm-svn: 126440
-
Argyrios Kyrtzidis authored
llvm-svn: 126438
-
- Feb 15, 2011
-
-
Argyrios Kyrtzidis authored
CStringChecker ChrootChecker MallocChecker PthreadLockChecker StreamChecker UnreachableCodeChecker MallocChecker creates implicit dependencies between checkers and needs to be handled differently. llvm-svn: 125598
-
- Jul 31, 2010
-
-
Ted Kremenek authored
After a lengthy design discussion, add support for "ownership attributes" for malloc/free checking. Patch by Andrew McGregor! llvm-svn: 109939
-
- Jul 24, 2010
-
-
Tom Care authored
- Created a new class to do post-analysis - Updated several test cases with unreachable code to expect a warning - Added some general tests llvm-svn: 109286
-
- Jun 20, 2010
-
-
Jordy Rose authored
Casting to void* or any other pointer-to-sizeless type (e.g. function pointers) causes a divide-by-zero error. Simple fix: check if the pointee type size is 0 and bail out early if it is. llvm-svn: 106401
-
- Jun 01, 2010
-
-
Zhongxing Xu authored
modification. llvm-svn: 105264
-
- May 25, 2010
-
-
Zhongxing Xu authored
whether the size of the symbolic region is a multiple of the size of T. Fixes PR6123 and PR7217. llvm-svn: 104584
-
- Mar 10, 2010
-
-
Zhongxing Xu authored
llvm-svn: 98136
-
- Feb 14, 2010
-
-
Zhongxing Xu authored
llvm-svn: 96154
-