| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 150556
|
|
|
|
|
|
| |
the passed in pointer on failure.
llvm-svn: 150533
|
|
|
|
|
|
| |
hardening.
llvm-svn: 150532
|
|
|
|
|
|
|
|
|
|
|
|
| |
(In response of Ted's review of r150112.)
This moves the logic which checked if a symbol escapes through a
parameter to invalidateRegionCallback (instead of post CallExpr visit.)
To accommodate the change, added a CallOrObjCMessage parameter to
checkRegionChanges callback.
llvm-svn: 150513
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
case when size is 0.
llvm-svn: 150412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
a pointer cannot escape through calls to system functions. Also, stop
after reporting the first use-after-free.
llvm-svn: 150315
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Resolves a common false positive, where we were reporting a leak inside
asserts
llvm-svn: 150312
|
|
|
|
|
|
| |
We use the same logic here as the RetainRelease checker.
llvm-svn: 150311
|
|
|
|
| |
llvm-svn: 150306
|
|
|
|
|
|
| |
(use of return instead of continue), wording.
llvm-svn: 150215
|
|
|
|
| |
llvm-svn: 150172
|
|
|
|
| |
llvm-svn: 150158
|
|
|
|
|
|
|
| |
Very simple so far - we just highlight every allocation and release
site.
llvm-svn: 150156
|
|
|
|
| |
llvm-svn: 150155
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
optimistic.
TODO: actually implement the pessimistic version of the checker. Ex: it
needs to assume that any function that takes a pointer might free it.
The optimistic version relies on annotations to tell us which functions
can free the pointer.
llvm-svn: 150111
|
|
|
|
|
|
|
|
|
| |
post visit of CallExpr.
In general, we should avoid using evalCall as it leads to interference
with other checkers.
llvm-svn: 150086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operator overloads out of line.
This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.
This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.
llvm-svn: 150006
|
|
|
|
| |
llvm-svn: 149982
|
|
|
|
|
|
| |
consistency with NamedDecls.
llvm-svn: 149981
|
|
|
|
|
|
| |
separately.
llvm-svn: 149947
|
|
|
|
| |
llvm-svn: 149939
|
|
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
|
|
|
| |
llvm-svn: 149798
|
|
|
|
|
|
|
|
| |
include.
Fix all the transitive include users.
llvm-svn: 149783
|
|
|
|
|
|
|
|
|
| |
of Diagnostic.h.
Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.
llvm-svn: 149781
|
|
|
|
|
|
| |
undefined arguments, when CF functions are called with wrong number of arguments.
llvm-svn: 149771
|
|
|
|
|
|
|
| |
- osx.coreFoundation.containers.IndexOutOfBounds
- osx.cocoa.SelfInit
llvm-svn: 149747
|
|
|
|
|
|
| |
(Also renames in other ObjC checkers to create one category of checks.)
llvm-svn: 149745
|
|
|
|
|
|
|
|
|
|
| |
the the code like this (due to x and &x being the same value but
different size):
void* x[] = { ptr1, ptr2, ptr3 };
CFArrayCreate(NULL, (const void **) &x, count, NULL);
llvm-svn: 149579
|
|
|
|
|
|
|
| |
Check if the triple OS is IOS instead of checking for arm/thumb architectures
and check that before calling isMacOSXVersionLT.
llvm-svn: 149454
|
|
|
|
|
|
|
| |
(Since this is syntax only, might be a good candidate for turning into a
compiler warning.)
llvm-svn: 149407
|
|
|
|
|
|
| |
replacements for 'starcat/strcpy' instead of 'strncat/strncpy'.
llvm-svn: 149406
|
|
|
|
| |
llvm-svn: 149319
|
|
|
|
|
|
| |
from the driver.
llvm-svn: 149276
|
|
|
|
| |
llvm-svn: 149258
|
|
|
|
| |
llvm-svn: 149228
|
|
|
|
|
|
| |
that don't care about the language don't have to pull in all the headers.
llvm-svn: 149178
|
|
|
|
|
|
|
|
| |
At this point this is largely cosmetic, but it opens the door to replace
ProgramStateRef with a smart pointer that more eagerly acts in the role
of reclaiming unused ProgramState objects.
llvm-svn: 149081
|
|
|
|
| |
llvm-svn: 149009
|
|
|
|
|
|
|
|
|
|
|
| |
using CFArrayCreate & family.
Specifically, CFArrayCreate's input should be:
'A C array of the pointer-sized values to be in the new array.'
(radar://10717339)
llvm-svn: 149008
|
|
|
|
| |
llvm-svn: 148844
|
|
|
|
|
|
| |
Loc value. When this happens, use the default type.
llvm-svn: 148631
|
|
|
|
|
|
| |
Also, slightly modify the diagnostic message in ArrayBound and DivZero (still use 'taint', which might not mean much to the user, but plan on changing it later).
llvm-svn: 148626
|
|
|
|
| |
llvm-svn: 148577
|
|
|
|
| |
llvm-svn: 148566
|
|
|
|
|
|
| |
IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>.
llvm-svn: 148533
|