Skip to content
  1. Dec 13, 2011
  2. Dec 12, 2011
  3. Dec 11, 2011
    • Anna Zaks's avatar
      [analyzer] CStringChecker should not rely on the analyzer generating... · 7c96b7db
      Anna Zaks authored
      [analyzer] CStringChecker should not rely on the analyzer generating UndefOrUnknown value when it cannot reason about the expression.
      
      We are now often generating expressions even if the solver is not known to be able to simplify it. This is another cleanup of the existing code, where the rest of the analyzer and checkers should not base their logic on knowing ahead of the time what the solver can reason about. 
      
      In this case, CStringChecker is performing a check for overflow of 'left+right' operation. The overflow can be checked with either 'maxVal-left' or 'maxVal-right'. Previously, the decision was based on whether the expresion evaluated to undef or not. With this patch, we check if one of the arguments is a constant, in which case we know that 'maxVal-const' is easily simplified. (Another option is to use canReasonAbout() method of the solver here, however, it's currently is protected.)
      
      This patch also contains 2 small bug fixes:
       - swap the order of operators inside SValBuilder::makeGenericVal.
       - handle a case when AddeVal is unknown in GenericTaintChecker::getPointedToSymbol.
      
      llvm-svn: 146343
      7c96b7db
    • Benjamin Kramer's avatar
      Reuse forAddr to create ignored AggValueSlots. · 4257ab3f
      Benjamin Kramer authored
      Silences valgrind warnings about uninitalized alignment values.
      
      llvm-svn: 146342
      4257ab3f
    • Anna Zaks's avatar
      [analyzer]Fixup r146336. · 170fdf1b
      Anna Zaks authored
      Forgot to commit the Header files. 
      Rename generateUnknownVal -> makeGenericVal.
      
      llvm-svn: 146337
      170fdf1b
    • Anna Zaks's avatar
      [analyzer] Introduce IntSymExpr, where the integer is on the lhs. · ecd73008
      Anna Zaks authored
      Fix a bug in SimpleSValBuilder, where we should swap lhs and rhs when calling generateUnknownVal(), - the function which creates symbolic expressions when data is tainted. The issue is not visible when we only create the expressions for taint since all expressions are commutative from taint perspective.
      
      Refactor SymExpr::symbol_iterator::expand() to use a switch instead of a chain of ifs.
      
      llvm-svn: 146336
      ecd73008
  4. Dec 10, 2011
Loading