[clang] [llvm] Fix 167586 (PR #177449)

Balázs Benics via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 07:24:46 PST 2026


steakhal wrote:

So, according to the AI, the FP is caused by an assumption that shouldn't be possible.
Namely, `foos.stqh_first == fi` should never hold.

In terms of code, this translates to `assert(foos.stqh_first != fi);`

What happens if you put this assert into your test code, would the FP go away? If so, is that a viable solution to your problem instead of patching the analyzer engine?

My argument is that in symbolic execution we should not make assumptions of the code without hints/indications. So we are technically not permitted to assume that this link list is not circular. In fact, if anything, we should assume the opposite because why would the code check `foos.stqh_first == fi` if it's known to be false all the time? It would make no sense.

https://github.com/llvm/llvm-project/pull/177449


More information about the llvm-commits mailing list