[PATCH] D122277: [analyzer] Fix crash in RangedConstraintManager.cpp

Vince Bridgers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 17:38:48 PDT 2022


vabridgers created this revision.
vabridgers added reviewers: martong, NoQ.
Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: All.
vabridgers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This change fixes a crash in RangedConstraintManager.cpp:assumeSym due to an
unhandled BO_Div case.

clang: <root>clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:51:

  virtual clang::ento::ProgramStateRef
  clang::ento::RangedConstraintManager::assumeSym(clang::ento::ProgramStateRef,
    clang::ento::SymbolRef, bool):
  Assertion `BinaryOperator::isComparisonOp(Op)' failed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122277

Files:
  clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
  clang/test/Analysis/symbol-simplification-bo-div.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122277.417449.patch
Type: text/x-patch
Size: 4441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220323/e02375e3/attachment.bin>


More information about the cfe-commits mailing list