1. Oct 07, 2021
    • Gabor Marton's avatar
      [analyzer][solver] Fix CmpOpTable handling bug · 792be5df
      Gabor Marton authored
      There is an error in the implementation of the logic of reaching the `Unknonw` tristate in CmpOpTable.
      
      ```
      void cmp_op_table_unknownX2(int x, int y, int z) {
        if (x >= y) {
                          // x >= y    [1, 1]
          if (x + z < y)
            return;
                          // x + z < y [0, 0]
          if (z != 0)
            return;
                          // x < y     [0, 0]
          clang_analyzer_eval(x > y);  // expected-warning{{TRUE}} expected-warning{{FALSE}}
        }
      }
      ```
      We miss the `FALSE` warning because the false branch is infeasible.
      
      We have to exploit simplification to discover the bug. If we had `x < y`
      as the second condition then the analyzer would return the parent state
      on the false path and the new constraint would not be part of the State.
      But adding `z` to the condition makes both paths feasible.
      
      The root cause of the bug is that we reach the `Unknown` tristate
      twice, but in both occasions we reach the same `Op` that is `>=` in the
      test case. So, we reached `>=` twice, but we never reached `!=`, thus
      querying the `Unknonw2x` column with `getCmpOpStateForUnknownX2` is
      wrong.
      
      The solution is to ensure that we reached both **different** `Op`s once.
      
      Differential Revision: https://reviews.llvm.org/D110910
      792be5df
    • Michael Forster's avatar
      Revert "[lldb] Remove "dwarf dynamic register size expressions" from RegisterInfo" · b2c906da
      Michael Forster authored
      This reverts commit 00e704bf.
      
      This commit should should have updated
      llvm/llvm-project/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp like the other
      architectures.
      b2c906da
  2. Oct 06, 2021