diff options
author | Mikhail R. Gadelha <mikhail.ramalho@gmail.com> | 2018-07-16 13:14:46 +0000 |
---|---|---|
committer | Mikhail R. Gadelha <mikhail.ramalho@gmail.com> | 2018-07-16 13:14:46 +0000 |
commit | e254b0f8c7564e40841fa1b50957e18739af82ce (patch) | |
tree | e774bdddbd45903f287ea6046e3380855099e21f /clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | |
parent | de506632aaf9722b270d4ff29b323da893a92800 (diff) | |
download | bcm5719-llvm-e254b0f8c7564e40841fa1b50957e18739af82ce.tar.gz bcm5719-llvm-e254b0f8c7564e40841fa1b50957e18739af82ce.zip |
[analyzer] Fix constraint being dropped when analyzing a program without taint tracking enabled
Summary:
This patch removes the constraint dropping when taint tracking is disabled.
It also voids the crash reported in D28953 by treating a SymSymExpr with non pointer symbols as an opaque expression.
Updated the regressions and verifying the big projects now; I'll update here when they're done.
Based on the discussion on the mailing list and the patches by @ddcc.
Reviewers: george.karpenkov, NoQ, ddcc, baloghadamsoftware
Reviewed By: george.karpenkov
Subscribers: delcypher, llvm-commits, rnkovacs, xazax.hun, szepet, a.sidorin, ddcc
Differential Revision: https://reviews.llvm.org/D48650
llvm-svn: 337167
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SValBuilder.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp index febe7cdb83c..f292dca8e99 100644 --- a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp +++ b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp @@ -379,11 +379,9 @@ SVal SValBuilder::makeSymExprValNN(ProgramStateRef State, BinaryOperator::Opcode Op, NonLoc LHS, NonLoc RHS, QualType ResultTy) { - if (!State->isTainted(RHS) && !State->isTainted(LHS)) - return UnknownVal(); - const SymExpr *symLHS = LHS.getAsSymExpr(); const SymExpr *symRHS = RHS.getAsSymExpr(); + // TODO: When the Max Complexity is reached, we should conjure a symbol // instead of generating an Unknown value and propagate the taint info to it. const unsigned MaxComp = StateMgr.getOwningEngine() |