steakhal added a comment.

New assertion failure:

  llvm-project/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:72: 
bool isLeftShiftResultUnrepresentable(const clang::BinaryOperator *, 
clang::ento::CheckerContext &): Assertion `LHS && RHS && "Values unknown, 
inconsistent state"' failed.

Reproduction:

  cat > extent.c <<EOF
  void crashing(long a, _Bool b) {
    a & 1 && 0;
    b = a & 1;
    b << 1;
  }
  EOF
  build/release/bin/clang --analyze -Xclang -analyzer-checker=core extent.c

The important part of the stack trace:

  isLeftShiftResultUnrepresentable(clang::BinaryOperator const*, 
clang::ento::CheckerContext&) 
llvm-project/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:73:20
  UndefResultChecker::checkPostStmt(clang::BinaryOperator const*, 
clang::ento::CheckerContext&) const 
llvm-project/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:154:18

Please @martong have a look at this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126560/new/

https://reviews.llvm.org/D126560

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D126560: [analyzer]... Balázs Benics via Phabricator via cfe-commits

Reply via email to