diff options
author | Anna Zaks <ganna@apple.com> | 2012-11-26 19:11:46 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-11-26 19:11:46 +0000 |
commit | e3beeaa5e7de3f2ba2ec548fc84e9c81216fbd9a (patch) | |
tree | db386661b29f5b5021de09337855c4a8376833c4 /clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp | |
parent | c5a7f92854c4eb12651d82817f7c2a7a87fa0541 (diff) | |
download | llvm-e3beeaa5e7de3f2ba2ec548fc84e9c81216fbd9a.zip llvm-e3beeaa5e7de3f2ba2ec548fc84e9c81216fbd9a.tar.gz llvm-e3beeaa5e7de3f2ba2ec548fc84e9c81216fbd9a.tar.bz2 |
[analyzer] Fix a crash reported in PR 14400.
The AllocaRegion did not have the superRegion (based on LocationContext)
as part of it's hash. As a consequence, the AllocaRegions from
different frames were uniqued to be the same region.
llvm-svn: 168599
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp index 6ef022b..24f8cdd 100644 --- a/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp @@ -68,6 +68,7 @@ bool BuiltinFunctionChecker::evalCall(const CallExpr *CE, DefinedOrUnknownSVal extentMatchesSizeArg = svalBuilder.evalEQ(state, Extent, Size); state = state->assume(extentMatchesSizeArg, true); + assert(state && "The region should not have any previous constraints"); C.addTransition(state->BindExpr(CE, LCtx, loc::MemRegionVal(R))); return true; |