This revision was automatically updated to reflect the committed changes.
Closed by commit rL311935: [analyzer] Fix crash in modeling arithmetic
(authored by alexshap).
Changed prior to commit:
https://reviews.llvm.org/D37120?vs=112784&id=112967#toc
Repository:
rL LLVM
https://reviews.llvm.
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Thanks, LGTM!
Repository:
rL LLVM
https://reviews.llvm.org/D37120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-
alexshap added a comment.
updated the patch per suggestion by @NoQ
Repository:
rL LLVM
https://reviews.llvm.org/D37120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexshap updated this revision to Diff 112784.
alexshap added a comment.
Return UnknownVal for non-comparison operations.
Add FIXME (improve modeling of "pointers as integers").
Repository:
rL LLVM
https://reviews.llvm.org/D37120
Files:
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/
NoQ added a comment.
Yeah, `LocAsInteger` is supported very poorly in most places. We can only get
away with it because people rarely cast pointers to integers.
Your reasoning about how `LocAsInteger` works poorly with eg. multiplication or
bitwise operations (consider some sanitizer computing
alexshap added inline comments.
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:363
case nonloc::LocAsIntegerKind:
return evalBinOpLL(state, op, lhsL,
rhs.castAs().getLoc(),
@NoQ , @dcoughlin
while we a
alexshap added inline comments.
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:371-373
+return makeSymExprValNN(
+state, op, lhs.castAs(),
+rhs.castAs(), resultTy);
NoQ wrote:
> For now this code would return
NoQ added a comment.
I guess we'd need more assertions to catch invalid symbols, will have a look.
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:371-373
+return makeSymExprValNN(
+state, op, lhs.castAs(),
+rhs.castAs(), re
alexfh added a comment.
Thank you for the prompt fix!
Repository:
rL LLVM
https://reviews.llvm.org/D37120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexshap created this revision.
Herald added a subscriber: xazax.hun.
This diff attempts to fix modeling of arithmetic expressions
where pointers are treated as integers (i.e. via C-style / reinterpret casts).
In particular, it resolves https://bugs.llvm.org/show_bug.cgi?id=34309
Test plan: make
10 matches
Mail list logo