[PATCH] D115149: [analyzer][solver] Fix assertion on (NonLoc, Op, Loc) expressions
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 7 00:10:04 PST 2021
martong added a comment.
In D115149#3175068 <https://reviews.llvm.org/D115149#3175068>, @NoQ wrote:
>> It can happen if the `Loc` was perfectly constrained to a concrete
>> value (`nonloc::ConcreteInt`)
>
> This shouldn't happen. It should be `loc::ConcreteInt` which is, well, a `Loc`.
I see your point and thank you for taking a look. Perhaps there is a problem in `SimpleSValBuilder::simplifySVal` which is responsible to use the constraint and build up the `ConcreteInt`. Especially, `VisitSymbolData` and `getConst` is worth to continue with the investigation, we might have the wrong type associated to the symbol:
if (Const)
return Loc::isLocType(Sym->getType()) ? (SVal)SVB.makeIntLocVal(*Const)
: (SVal)SVB.makeIntVal(*Const);
We are going to further investigate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115149/new/
https://reviews.llvm.org/D115149
More information about the cfe-commits
mailing list