https://bugs.llvm.org/show_bug.cgi?id=51541
Bug ID: 51541
Summary: [Analyzer][solver] Reachable infeasible state
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: martongab...@gmail.com
CC: dcough...@apple.com, llvm-bugs@lists.llvm.org
Created attachment 25172
--> https://bugs.llvm.org/attachment.cgi?id=25172&action=edit
lit test file
We reach an infeasible state in the below case. I'm attaching also the lit test
file (solver-x.c) that fails/crashes. My guess is that the solver probably
handles `-=` wrongly.
```
int a, b, c, d, e;
void f() {
if (a == 0)
return;
if (e != c)
return;
d = e - c;
b = d;
a -= d;
if (a != 0)
return;
clang_analyzer_warnIfReached(); // no-warning
// Crashes with expensive checks.
if (b > 0)
return;
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs