[all-commits] [llvm/llvm-project] 328113: [clang][dataflow] Fix SAT solver crashes on `X ^ X...

Dmitri Gribenko via All-commits all-commits at lists.llvm.org
Tue Jul 26 01:26:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3281138aad80fcefc7f266c7e3b2e359d5dbc8da
      https://github.com/llvm/llvm-project/commit/3281138aad80fcefc7f266c7e3b2e359d5dbc8da
  Author: Dmitri Gribenko <gribozavr at gmail.com>
  Date:   2022-07-26 (Tue, 26 Jul 2022)

  Changed paths:
    M clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp
    M clang/unittests/Analysis/FlowSensitive/SolverTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Fix SAT solver crashes on `X ^ X` and `X v X`

BooleanFormula::addClause has an invariant that a clause has no duplicated
literals. When the solver was desugaring a formula into CNF clauses, it
could construct a clause with such duplicated literals in two cases.

Reviewed By: sgatev, ymandel, xazax.hun

Differential Revision: https://reviews.llvm.org/D130522




More information about the All-commits mailing list