History log of /external/clang/test/Analysis/outofbound.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/test/Analysis/outofbound.c
cdc3a89d5de90b2299c56f4a46c3de590c5184d1 24-Aug-2012 Ted Kremenek <kremenek@apple.com> Fix analyzer tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
72b74aab5191cb103bce90e62b824e4baacc6950 12-May-2012 Anna Zaks <ganna@apple.com> [analyzer] Add buffer overflow test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
540dda6f2e4982b3eab0300c804345f5b6104c11 23-Aug-2011 Ted Kremenek <kremenek@apple.com> Fix regression in -Wuninitialized involving VLAs. It turns out that we were modeling sizeof(VLAs)
incorrectly in the CFG, and also the static analyzer. This patch regresses the analyzer a bit, but
that needs to be followed up with a better solution.

Fixes <rdar://problem/10008112>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
7d11c3f691674177bc7308c0fc6c82cb745bed0b 06-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] add more buffer overflow tests to show we handle sizeof(VLA) in obstruse ways...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
033a07e5fca459ed184369cfee7c90d82367a93a 04-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] rename all experimental checker packages to have 'experimental' be the common root package.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
5188507b9a1b09ec95c14ffadf0e832f2b47aa8a 24-Mar-2011 Ted Kremenek <kremenek@apple.com> Rework checker "packages" and groups to be more hierarchical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
c4d2c9074be6eb2091086eddd6c8f052f3b245c8 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
103487088211c13ff3ae66f265130c56fb6be025 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate BuiltinFunctionChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
6dd4dffe1090e820e9b5b25eee8ad3907a1aa679 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-checks' flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
65d39251ff57b8e33cf6d3a7fcc6aa1c6f8cdc68 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
8be5b3aced37e1c7728741c60d47011f11649a58 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate ArrayBoundChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
35001ca261f895817916b468379b696d6d45959d 17-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the array bounds checking to work for several other constructs,
especially C++ code, and generally expand the test coverage.

Logic adapted from a patch by Kaelyn Uhrain <rikka@google.com> and
another Googler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
e701117b21356d3c60133315b5bdd50232ec6cca 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> - Allow making ElementRegions with complex offsets (expressions or symbols) for the purpose of bounds-checking.
- Rewrite GRState::AssumeInBound to actually do that checking, and to use the normal constraint path.
- Remove ConstraintManager::AssumeInBound.
- Teach RegionStore and FlatStore to ignore those regions for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
8556cc44af71f6147e1a821489b56f35acadea3f 14-Aug-2010 Jordy Rose <jediknil@belkadan.com> Add a test for alloca region extents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
b7e3aabf8f0fe4210d6a0aaec8a2b5770cab9186 05-Jul-2010 Jordy Rose <jediknil@belkadan.com> Support sizeof for VLA expressions (sizeof(someVLA)). sizeof(int[n]) still unimplemented. A VLA region's sizeof value matches its extent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
52e04c537633377fb14cfa4fa3c95e3e510fc942 05-Jul-2010 Jordy Rose <jediknil@belkadan.com> Track extents for VLAs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
32f2656b90900ac04c4b50e87c16749d0ceb9ef2 04-Jul-2010 Jordy Rose <jediknil@belkadan.com> Add a new symbol type, SymbolExtent, to represent the extents of memory regions that may not be known at compile-time (such as those created by malloc). This replaces the old setExtent/getExtent API on Store, which used the GRState's GDM to store SVals.

Also adds a getKnownValue() method to SValuator, which gets the integer value of an SVal if it is known to only have one possible value. There are more places in the code that could be using this, but in general we want to be dealing entirely in SVals, so its usefulness is limited.

The only visible functionality change is that extents are now honored for any DeclRegion, such as fields and Objective-C ivars, rather than just variables. This shows up in bounds-checking and cast-size-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
4d912b24b393fe6b7422e5502f3a330cbdc5c6b7 26-Jun-2010 Jordy Rose <jediknil@belkadan.com> When a constant size array is casted to another type, its length should be scaled as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
a5ce966d1a23d84aa5e849cf0ed62494e736ea6a 01-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for calloc() in MallocChecker. Patch by Jordy Rose, with my
modification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
9618b858e2b4f79aa2b8b0291e9c833cee0435f8 01-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Use the element type to compute the array size when the base region is a VarRegion.
Patch by Jordy Rose.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
565e465c6d0093f1bf8414b2cabdc842022385a9 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
3ed04d37573c566205d965d2e91d54ccae898d0a 18-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for computing size in elements for symbolic regions obtained from
malloc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
ef74f4c6dcd59b3af1de9d8f613c1caf3e6cb63d 14-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Replace clang-cc with clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
8382cf57b722f130f1a6b45380639871c07271c1 13-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
58e689fead1490611bcd114fb707bfc08a12049e 11-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Reimplement out-of-bound array access checker with the new checker interface.
Now only one test case is XFAIL'ed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
d73902121a93c3135cf53e2d724361cec1037d7e 03-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch XFAIL format to match LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
39abcdf1c7dfc4fd2bda57416812672830400c9e 01-Aug-2009 Ted Kremenek <kremenek@apple.com> Temporarily disable out-of-bounds checking. The current checking logic will not work quite right with the changes I'm about to commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
6c07bdba93b095b66e2c8c82dd5ed458fa8285ea 26-Jun-2009 Ted Kremenek <kremenek@apple.com> Introduce a new concept to the static analyzer: SValuator.

GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.

We now have one implementation of SValuator: SimpleSValuator.

SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.

As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
be1fe1eb12a1cb91c8e3a9fcc2db4dfe989def6c 17-Feb-2009 Ted Kremenek <kremenek@apple.com> Static Analyzer driver/options (partial) cleanup:
- Move all analyzer options logic to AnalysisConsumer.cpp.
- Unified specification of stores/constraints/output to be:
-analyzer-output=...
-analyzer-store=...
-analyzer-constraints=...
instead of -analyzer-range-constraints, -analyzer-store-basic, etc.
- Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new
interface
- Updated test cases to conform to new driver options


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
f9e96843e8a0afd0d5f58ba224fb8d57cba8effa 22-Jan-2009 Ted Kremenek <kremenek@apple.com> Test more array logic in outofbound.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
a7ac9444b4b82de868fac9710a56807898a90b02 22-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix RegionStore::getLValueElement() to handle the case when the base region is not an ElementRegion (also do some cleanups of its core logic).
This gets array-struct.c to work with RegionStore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
d427023c334fe03105d9359711a3df4d6f23b344 21-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add -analyze action to run static analyzer, instead of inferring from
individual checker options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
e3a46b08f879771b9445c2a3cb717bf843f48f07 13-Jan-2009 Ted Kremenek <kremenek@apple.com> This test now passes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
cfec1db63f9d4a1cda3f970d2cebeba8333a69ea 13-Dec-2008 Ted Kremenek <kremenek@apple.com> Temporarily XFAIL these tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
4b89e034a7778669c4f0888d66afef4cc03fb064 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Strings are NULL terminated. So the region size should plus one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c
20f0178a232029bea7f34adecb6e5bdd6fada483 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add test case for out-of-bound memory access checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/outofbound.c