- Aug 06, 2009
-
-
Ted Kremenek authored
llvm-svn: 78284
-
Ted Kremenek authored
llvm-svn: 78280
-
Ted Kremenek authored
already been uniqued. llvm-svn: 78279
-
Zhongxing Xu authored
llvm-svn: 78273
-
Zhongxing Xu authored
and their impl base classes. This can greatly simply some code of the core analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode. llvm-svn: 78270
-
Ted Kremenek authored
RegionStore already lazily abstracted the contents of arrays and structs, when doing an assignment from one array/struct to another we did an explicit element-wise copy, which resulted in a loss of laziness and huge performance problem when analyzing many code bases. Now RegionStoreManager handles such assignments using a new SVal could 'LazyCompoundSVal', which basically means the value of a given struct or array (a MemRegion*) in a specific state (GRState). When we do a load from a field whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field lookup in the original structure. This means we have essentially zero copying of data for structs/arrays and everything stays lazy. llvm-svn: 78268
-
- Aug 05, 2009
-
-
Eli Friedman authored
llvm-svn: 78230
-
Ted Kremenek authored
region to the worklist used to create the subregion map. llvm-svn: 78228
-
Ted Kremenek authored
Fix a bug in RegionStoreSubRegionManager::add() where multiple subregions wouldn't correctly get registered in the SubRegion map. llvm-svn: 78162
-
Zhongxing Xu authored
constant value. If the UnaryOperator has location type, create the constant with int type and pointer width. This fixes the bug that all pointer increments 'p++' evaluated to Unknown. llvm-svn: 78147
-
- Aug 03, 2009
-
-
Ted Kremenek authored
llvm-svn: 78000
-
Zhongxing Xu authored
llvm-svn: 77961
-
- Aug 02, 2009
-
-
Ted Kremenek authored
llvm-svn: 77876
-
Ted Kremenek authored
llvm-svn: 77875
-
Ted Kremenek authored
Generalize the interface of 'StoreManager::RemoveDeadBindings()' to manipulate the entire GRState, not just the Store. llvm-svn: 77870
-
Ted Kremenek authored
'void*' (or 'const void*') as an identity transformation. llvm-svn: 77860
-
- Aug 01, 2009
-
-
Ted Kremenek authored
made to RegionStore (and related classes) in order to handle some analyzer failures involving casts and manipulation of symbolic memory. The root of the change is in StoreManager::CastRegion(). Instead of using ad hoc heuristics to decide when to layer an ElementRegion on a casted MemRegion, we now always layer an ElementRegion when the cast type is different than the original type of the region. This carries the current cast information associated with a region around without resorting to the error prone recording of "casted types" in GRState. Along with this new policy of layering ElementRegions, I added a new algorithm to strip away existing ElementRegions when they simply represented casts of a base memory object. This algorithm computes the raw "byte offset" that an ElementRegion represents from the base region, and allows the new ElementRegion to be based off that offset. The added benefit is that this naturally handles a series of casts of a MemRegion without building up a set of redundant ElementRegions (thus canonicalizing the region view). Other related changes that cascaded from this one (as tests were failing in RegionStore): - Revamped RegionStoreManager::InvalidateRegion() to completely remove all bindings and default values from a region and all subregions. Now invalidated fields are not bound directly to new symbolic values; instead the base region has a "default" symbol value from which "derived symbols" can be created. The main advantage of this approach is that it allows us to invalidate a region hierarchy and then lazily instantiate new values no matter how deep the hierarchy went (i.e., regardless of the number of field accesses, e.g. x->f->y->z->...). The previous approach did not do this. - Slightly reworked RegionStoreManager::RemoveDeadBindings() to also incorporate live symbols and live regions that do not have direct bindings but also have "default values" used for lazy instantiation. The changes to 'InvalidateRegion' revealed that these were necessary in order to achieve lazy instantiation of values in the region store with those bindings being removed too early. - The changes to InvalidateRegion() and RemoveDeadBindings() revealed a serious bug in 'getSubRegionMap()' where not all region -> subregion relationships involved in actually bindings (explicit and implicit) were being recorded. This has been fixed by using a worklist algorithm to iteratively fill in the region map. - Added special support to RegionStoreManager::Bind()/Retrieve() to handle OSAtomicCompareAndSwap in light of the new 'CastRegion' changes and the layering of ElementRegions. - Fixed a bug in SymbolReaper::isLive() where derived symbols were not being marked live if the symbol they were derived from was also live. This fix was critical for getting lazy instantiation in RegionStore to work. - Tidied up the implementation of ValueManager::getXXXSymbolVal() methods to use SymbolManager::canSymbolicate() to decide whether or not a symbol should be symbolicated. - 'test/Analysis/misc-ps-xfail.m' now passes; that test case has been moved to 'test/Analysis/misc-ps.m'. - Tweaked some pretty-printing of MemRegions, and implemented 'ElementRegion::getRawOffset()' for use with the CastRegion changes. llvm-svn: 77782
-
Ted Kremenek authored
Temporarily disable out-of-bounds checking. The current checking logic will not work quite right with the changes I'm about to commit. llvm-svn: 77779
-
- Jul 31, 2009
-
-
Mike Stump authored
llvm-svn: 77651
-
- Jul 30, 2009
-
-
Benjamin Kramer authored
llvm-svn: 77589
-
Zhongxing Xu authored
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions(). llvm-svn: 77585
-
Daniel Dunbar authored
llvm-svn: 77577
-
Zhongxing Xu authored
AnalysisContext. llvm-svn: 77563
-
- Jul 29, 2009
-
-
Ted Kremenek authored
Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
-
Ted Kremenek authored
OldCastRegion used), and the associated command line option '-analyzer-store=old-basic-cast'. llvm-svn: 77509
-
Ted Kremenek authored
we don't care about ElementRegions layered on top of a base region. llvm-svn: 77484
-
Ted Kremenek authored
in StoreManager to RegionStoreManager, and create a special, highly reduced version in BasicStoreManager. These changes are in preparation for future RegionStore-specific changes to InvalidateRegion. llvm-svn: 77483
-
Ted Kremenek authored
index 0. This will be used for refinements to InvalidateRegion and CastRegion. llvm-svn: 77481
-
Ted Kremenek authored
llvm-svn: 77479
-
Zhongxing Xu authored
llvm-svn: 77447
-
- Jul 28, 2009
-
-
Ted Kremenek authored
could cause false positives if any the subexpressions had side-effects. These initializers weren't evaluated because the StoreManager would need to handle them, but that's an orthogonal problem of whether or not the StoreManager can handle the binding. llvm-svn: 77361
-
Ted Kremenek authored
was created but not added to the destination NodeSet. This fixes PR 4630. llvm-svn: 77353
-
Ted Kremenek authored
valid SourceLocation. llvm-svn: 77280
-
- Jul 25, 2009
-
-
Mike Stump authored
calls to noreturn function pointers when CFG building. llvm-svn: 77089
-
Owen Anderson authored
llvm-svn: 77012
-
- Jul 24, 2009
-
-
Ted Kremenek authored
if the DeclRefExpr is a float, not just either argument. llvm-svn: 76998
-
Ted Kremenek authored
llvm-svn: 76955
-
Ted Kremenek authored
TryEvaluateBool instead of using a raw 'int'. This avoids any confusion of how 'int' converts to bool, and makes the resultant code easier to read. Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the ternary operator instead. llvm-svn: 76947
-
Zhongxing Xu authored
llvm-svn: 76940
-
Ted Kremenek authored
llvm-svn: 76924
-