[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-09-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. We came up with a quick fix, let us know what you think: https://reviews.llvm.org/D88019 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-09-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D82445#2284680 , @martong wrote: > Hi Valery, > > Together with @steakhal we have found a serious issue. > The below code crashes if you compile with `-DEXPENSIVE_CHECKS`. > The analyzer goes on an unfeasible path, the State

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-09-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a subscriber: steakhal. martong added a comment. Hi Valery, Together with @steakhal we have found a serious issue. The below code crashes if you compile with `-DEXPENSIVE_CHECKS`. The analyzer goes on an unfeasible path, the State has a contradiction. We think that `getRange(Sym("a

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-22 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb13d9878b8dc: [analyzer][solver] Track symbol equivalence (authored by vsavchenko). Changed prior to commit: https://reviews.llvm.org/D82445?vs=275981&id=279746#toc Repository: rG LLVM Github Monorep

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Thanks, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445 ___ cfe-commits mailing list cfe-comm

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 275981. vsavchenko added a comment. Get rid of 'isZero' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked 8 inline comments as done. vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:506 + APSIntType Type(Int); + return Int == Type.getZeroValue(); +} xazax.hun wrote: > Does the semantics if this

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1254 +// sufficient. +return S1->get() == S2->get() && + S1->get() == S2->get(); xazax.hun wrote: > Sorry, but I am a bit confused here.

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:506 + APSIntType Type(Int); + return Int == Type.getZeroValue(); +} Does the semantics if this differ from ` llvm::APInt::isNullValue`? Comm

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 275956. vsavchenko added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVi

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-07 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 275949. vsavchenko added a comment. Fix comments and add a test for downcasts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445 Files: clang/include/clang/StaticAnal

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. 🎉! I vaguely remember that we talked offline about a few nasty test cases that with casts and overflows, would it make sense to add them? Like, even if they don't pass yet, they may prove valuable.

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-07-06 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 275608. vsavchenko added a comment. Fix review remarks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/B

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:537 + // true for equality and false for disequality. + bool IsEquality = true; + vsavchenko wrote: > NoQ wrote: > > Do i understand correctly that this isn't used y

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-25 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked 4 inline comments as done. vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:452 + EquivalenceClass(const EquivalenceClass &) = default; + EquivalenceClass &operator=(const EquivalenceClass &) = default; +

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:452 + EquivalenceClass(const EquivalenceClass &) = default; + EquivalenceClass &operator=(const EquivalenceClass &) = default; + EquivalenceClass(EquivalenceClass &&) = default; ---

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked an inline comment as done. vsavchenko added a comment. > I really hope that the performance will be ok :) I had a test run for one of the earlier implementations of this and it looks like it adds 1-2% to the execution time. And of course I will attach more info on that late

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I only checked the test cases and the comments so far and it looks very useful and promising. I really hope that the performance will be ok :) I'll look at the actual code changes later. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManag

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 272954. vsavchenko added a comment. Fix incorrect comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82445/new/ https://reviews.llvm.org/D82445 Files: clang/include/clang/StaticAnalyzer/Core/BugReporte

[PATCH] D82445: [analyzer][solver] Track symbol equivalence

2020-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, dcoughlin, ASDenysPetrov, xazax.hun, Szelethus. Herald added subscribers: cfe-commits, martong, Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. Herald added a project: clang. vsavchen