[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

Bal√°zs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 03:12:53 PST 2022


steakhal added a comment.

In D112621#4004372 <https://reviews.llvm.org/D112621#4004372>, @uabelho wrote:

> Hi,
>
> The following starts crashing with this patch:
>
>   clang -cc1 -analyze -analyzer-checker=core bbi-77010.c
>
> It crashes with
>
>   bbi-77010.c:6:1: warning: non-void function does not return a value [-Wreturn-type]
>   }
>   ^
>   clang: ../../clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1622: clang::ento::RangeSet (anonymous namespace)::SymbolicRangeInferrer::VisitBinaryOperator(clang::ento::RangeSet, clang::ento::RangeSet, clang::QualType): Assertion `!LHS.isEmpty() && !RHS.isEmpty() && "Both ranges should be non-empty"' failed.
>   PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
>   Abort (core dumped)
>
> F25730184: bbi-77010.c <https://reviews.llvm.org/F25730184>

Thanks for the report. I'll fix it ASAP.
I think I'll replace the assertion with an early return.

BTW, was this uncovered by fuzzing? @uabelho


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112621



More information about the cfe-commits mailing list