Page MenuHomePhabricator

vsavchenko (Valeriy Savchenko)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 6 2020, 5:32 AM (63 w, 16 h)

Recent Activity

Today

vsavchenko added inline comments to D104550: [analyzer] Implement getType for SVal.
Mon, Jun 21, 8:57 AM · Restricted Project
vsavchenko added a comment to D104647: [analyzer] Support SVal::getType for pointer-to-member values.

This one is a bit more invasive, so I decided to put it into a separate patch.

Mon, Jun 21, 7:57 AM · Restricted Project
vsavchenko requested review of D104647: [analyzer] Support SVal::getType for pointer-to-member values.
Mon, Jun 21, 7:55 AM · Restricted Project
vsavchenko updated the diff for D104550: [analyzer] Implement getType for SVal.

Support ConcreteInt, LocAsInteger, and GotoLabel

Mon, Jun 21, 7:45 AM · Restricted Project
vsavchenko updated the diff for D104550: [analyzer] Implement getType for SVal.

Support GotoLabel

Mon, Jun 21, 5:13 AM · Restricted Project
vsavchenko added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Mon, Jun 21, 4:24 AM · Restricted Project
vsavchenko added a comment to D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr.

The only method that I think can be realistically modelled is == (and thus !=). If both the operands refer to the same unique_ptr, we know == returns true. If they are not the same, the only way == can return true if the two smart pointers were initialized from the same raw pointer. This is of course a fatal bug in itself. So perhaps we can ignore this case and only consider the first case.
The ordering operators I guess can't be handled because there is no way to statically tell in general the address of some value. We have the following deductions, nevertheless, mathematically:
Let ptr1 and ptr2 be two std::unique_ptr objects.
If (ptr1 == ptr2) is true:

  • ptr1 < ptr2 is false
  • ptr1 > ptr2 is false
  • ptr1 <= ptr2 is true
  • ptr1 >= ptr2 is true

If (ptr1 == ptr2) is false, we can't say anything really.

Mon, Jun 21, 1:28 AM · Restricted Project
vsavchenko added a comment to D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added.

Hi,

I'm seeing a failed assertion with this patch.
Reproduce with

clang --analyze bbi-57338.c

Result:

clang: /repo/uabelho/master-github/llvm/include/llvm/ADT/APSInt.h:148: bool llvm::APSInt::operator<(const llvm::APSInt &) const: Assertion `IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"' failed.

Mon, Jun 21, 1:25 AM · Restricted Project
vsavchenko added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Mon, Jun 21, 1:22 AM · Restricted Project

Fri, Jun 18

vsavchenko added a comment to D104550: [analyzer] Implement getType for SVal.

Hey folks!

Fri, Jun 18, 10:02 AM · Restricted Project
vsavchenko requested review of D104550: [analyzer] Implement getType for SVal.
Fri, Jun 18, 9:55 AM · Restricted Project
vsavchenko added a comment to D103025: [analyzer] Handle NTTP invocation in CallContext.getCalleeDecl() .

Thanks for fixing this!

Fri, Jun 18, 6:47 AM · Restricted Project
vsavchenko committed rGcc2ef1955609: [analyzer] Handle NTTP invocation in CallContext.getCalleeDecl() (authored by tomasz-kaminski-sonarsource).
[analyzer] Handle NTTP invocation in CallContext.getCalleeDecl()
Fri, Jun 18, 6:46 AM
vsavchenko closed D103025: [analyzer] Handle NTTP invocation in CallContext.getCalleeDecl() .
Fri, Jun 18, 6:46 AM · Restricted Project
vsavchenko added a comment to D103025: [analyzer] Handle NTTP invocation in CallContext.getCalleeDecl() .

Would it be possible to merge it for me, as I do not have a commit right?

Fri, Jun 18, 5:19 AM · Restricted Project
vsavchenko accepted D103025: [analyzer] Handle NTTP invocation in CallContext.getCalleeDecl() .

Looks good to me!
Sorry it took forever!

Fri, Jun 18, 2:15 AM · Restricted Project

Thu, Jun 17

vsavchenko added inline comments to D104136: [analyzer] Add better tracking for RetainCountChecker leak warnings.
Thu, Jun 17, 6:15 AM · Restricted Project
vsavchenko added inline comments to D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions..
Thu, Jun 17, 6:06 AM · Restricted Project
vsavchenko added inline comments to D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions..
Thu, Jun 17, 5:55 AM · Restricted Project
vsavchenko added a comment to D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions..

OK, about the quadratic algorithm. I can think of one solution that is actually linear asymptotically, but because of the constant factor can be worse in practice (we usually have extremely small range sets). So, while I don't like it, it's probably fine.

Thu, Jun 17, 4:11 AM · Restricted Project
vsavchenko added a comment to D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

I think this iteration is much better, it requires way more description as it has now. You didn't actually describe anywhere how this algorithm actually works.

Thu, Jun 17, 3:39 AM · Restricted Project
vsavchenko updated the diff for D104136: [analyzer] Add better tracking for RetainCountChecker leak warnings.

Move IdentityHandler into the anonymous namespace

Thu, Jun 17, 2:40 AM · Restricted Project
vsavchenko added a comment to D104300: [analyzer] Handle std::swap for std::unique_ptr.

I agree with @NoQ that notes are pretty much straightforward and we shouldn't abandon them altogether. Refinements about what is null or non-null pointer are purely cosmetic and we definitely can tweak this messaging.

Thu, Jun 17, 1:38 AM · Restricted Project
vsavchenko added inline comments to D103096: [analyzer] Implement cast for ranges of symbolic integers..
Thu, Jun 17, 1:23 AM · Restricted Project
vsavchenko added a comment to D104136: [analyzer] Add better tracking for RetainCountChecker leak warnings.

Aha, alright! So the tracker tracked back to where the tracked expression got computed in node N, which is the return value of some identity function. Unless its explicitly told that there is a link in between the return value and the parameter, the tracker can't figure this out that it could track further (why would it, right?). So it asks its handlers whether they want to do anything with N, which IdentityHandler does -- it digs out the node where the parameter was evaluated, and tells the tracker to go on with that. Awesome!

Thu, Jun 17, 1:04 AM · Restricted Project

Wed, Jun 16

vsavchenko added a comment to D103096: [analyzer] Implement cast for ranges of symbolic integers..

Hey, great work! I think that casts are extremely important, but it looks like you mixed so many things into this patch. Let's make one step at a time a split it into (at least) a couple of patches.

Honestly, I don't know what part could be cut to keep this mechanism holistic and self-sufficient. But I'll see what i can do.

Wed, Jun 16, 11:42 PM · Restricted Project
vsavchenko added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Wed, Jun 16, 6:20 AM · Restricted Project
vsavchenko added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Wed, Jun 16, 5:39 AM · Restricted Project
vsavchenko requested changes to D103096: [analyzer] Implement cast for ranges of symbolic integers..

Hey, great work! I think that casts are extremely important, but it looks like you mixed so many things into this patch. Let's make one step at a time a split it into (at least) a couple of patches.

Wed, Jun 16, 5:34 AM · Restricted Project
vsavchenko added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Wed, Jun 16, 2:36 AM · Restricted Project
vsavchenko added inline comments to D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator.
Wed, Jun 16, 1:29 AM · Restricted Project

Tue, Jun 15

vsavchenko added a comment to D104300: [analyzer] Handle std::swap for std::unique_ptr.

It looks like new functionality is VERY much like handleSwap, and we should definitely merge common parts.

Tue, Jun 15, 8:21 AM · Restricted Project
vsavchenko added inline comments to D104300: [analyzer] Handle std::swap for std::unique_ptr.
Tue, Jun 15, 8:18 AM · Restricted Project
vsavchenko added inline comments to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.
Tue, Jun 15, 7:20 AM · Restricted Project
vsavchenko added inline comments to D104136: [analyzer] Add better tracking for RetainCountChecker leak warnings.
Tue, Jun 15, 2:20 AM · Restricted Project
vsavchenko updated the diff for D104136: [analyzer] Add better tracking for RetainCountChecker leak warnings.

Rebase

Tue, Jun 15, 2:20 AM · Restricted Project
vsavchenko added inline comments to D104135: [analyzer] Decouple NoteTag from its Factory.
Tue, Jun 15, 2:08 AM · Restricted Project
vsavchenko committed rGeadd54f2741f: [analyzer] Decouple NoteTag from its Factory (authored by vsavchenko).
[analyzer] Decouple NoteTag from its Factory
Tue, Jun 15, 1:59 AM
vsavchenko closed D104135: [analyzer] Decouple NoteTag from its Factory.
Tue, Jun 15, 1:59 AM · Restricted Project
vsavchenko committed rG16f7a952ec3e: [analyzer] Simplify the process of producing notes for stores (authored by vsavchenko).
[analyzer] Simplify the process of producing notes for stores
Tue, Jun 15, 1:38 AM
vsavchenko committed rG6e6a26b8f0ea: [analyzer] Extract InlinedFunctionCallHandler (authored by vsavchenko).
[analyzer] Extract InlinedFunctionCallHandler
Tue, Jun 15, 1:38 AM
vsavchenko committed rG2e490676ea2e: [analyzer] Extract InterestingLValueHandler (authored by vsavchenko).
[analyzer] Extract InterestingLValueHandler
Tue, Jun 15, 1:38 AM
vsavchenko committed rG40cb73bd2073: [analyzer] Extract ArrayIndexHandler (authored by vsavchenko).
[analyzer] Extract ArrayIndexHandler
Tue, Jun 15, 1:38 AM
vsavchenko committed rG1639dcb27984: [analyzer] Extract NilReceiverHandler (authored by vsavchenko).
[analyzer] Extract NilReceiverHandler
Tue, Jun 15, 1:38 AM
vsavchenko closed D104046: [analyzer] Simplify the process of producing notes for stores.
Tue, Jun 15, 1:38 AM · Restricted Project
vsavchenko committed rG85f475c979aa: [analyzer] Extract ControlDependencyHandler (authored by vsavchenko).
[analyzer] Extract ControlDependencyHandler
Tue, Jun 15, 1:38 AM
vsavchenko closed D103961: [analyzer] Extract InlinedFunctionCallHandler.
Tue, Jun 15, 1:38 AM · Restricted Project
vsavchenko closed D103917: [analyzer] Extract InterestingLValueHandler.
Tue, Jun 15, 1:38 AM · Restricted Project
vsavchenko closed D103914: [analyzer] Extract ArrayIndexHandler.
Tue, Jun 15, 1:38 AM · Restricted Project
vsavchenko committed rGbbebf38b736a: [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler (authored by vsavchenko).
[analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler
Tue, Jun 15, 1:38 AM
vsavchenko closed D103902: [analyzer] Extract NilReceiverHandler.
Tue, Jun 15, 1:38 AM · Restricted Project
vsavchenko closed D103677: [analyzer] Extract ControlDependencyHandler.
Tue, Jun 15, 1:38 AM · Restricted Project
vsavchenko closed D103644: [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler.
Tue, Jun 15, 1:37 AM · Restricted Project

Mon, Jun 14

vsavchenko added a comment to D103605: [analyzer] Introduce a new interface for tracking.

Sorry for the absence, took my time to catch up with this series! Really interesting insight into how a new interface is being designed! I need some time to digest things, but can't wait to help on the remaining patches.

Mon, Jun 14, 8:32 AM · Restricted Project
vsavchenko added inline comments to D103630: [analyzer] Refactor trackRValueExpression into ExpressionHandler.
Mon, Jun 14, 6:02 AM · Restricted Project
vsavchenko added inline comments to D103618: [analyzer] Change FindLastStoreBRVisitor to use Tracker.
Mon, Jun 14, 4:48 AM · Restricted Project

Sun, Jun 13

vsavchenko accepted D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added.
Sun, Jun 13, 2:26 AM · Restricted Project
vsavchenko added a comment to D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added.

I have the first measurements results in the attached zip file. The file contains the html file generated by csa-testbench. It's name contains CTU but actually it was a regular non-CTU analysis. The most interesting is probably the run-times, where we can notice a small increase:


Other than that, the number of the warnings seems to be unchanged. The most notable change in the statistics is in the number of paths explored by the analyzer: in some cases (e.g. twin) it increased with 2-3 %.

Sun, Jun 13, 2:24 AM · Restricted Project

Fri, Jun 11

vsavchenko added a comment to D104135: [analyzer] Decouple NoteTag from its Factory.

P.S. I like this design!

I'm trying to remember why we needed a factory in the first place.

Who's gonna carry your callbacks for ya, huh?

Fri, Jun 11, 12:55 PM · Restricted Project
vsavchenko updated the diff for D104046: [analyzer] Simplify the process of producing notes for stores.

Rebase

Fri, Jun 11, 11:34 AM · Restricted Project
vsavchenko updated the diff for D103644: [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler.

Fix review remarks

Fri, Jun 11, 11:29 AM · Restricted Project
vsavchenko requested review of D104136: [analyzer] Add better tracking for RetainCountChecker leak warnings.
Fri, Jun 11, 11:08 AM · Restricted Project
vsavchenko requested review of D104135: [analyzer] Decouple NoteTag from its Factory.
Fri, Jun 11, 11:04 AM · Restricted Project
vsavchenko committed rG57006d2f6d96: [analyzer] Refactor trackExpressionValue to accept TrackingOptions (authored by vsavchenko).
[analyzer] Refactor trackExpressionValue to accept TrackingOptions
Fri, Jun 11, 2:52 AM
vsavchenko committed rG51d4704d5ec9: [analyzer] Turn TrackControlDependencyCond into a tracking visitor (authored by vsavchenko).
[analyzer] Turn TrackControlDependencyCond into a tracking visitor
Fri, Jun 11, 2:52 AM
vsavchenko committed rG3fc8d943c360: [analyzer] Refactor trackRValueExpression into ExpressionHandler (authored by vsavchenko).
[analyzer] Refactor trackRValueExpression into ExpressionHandler
Fri, Jun 11, 2:52 AM
vsavchenko committed rGf853d2601abd: [analyzer] Turn ReturnVisitor into a tracking visitor (authored by vsavchenko).
[analyzer] Turn ReturnVisitor into a tracking visitor
Fri, Jun 11, 2:52 AM
vsavchenko committed rG87a5c4d3745a: [analyzer] Hide and rename FindLastStoreBRVisitor (authored by vsavchenko).
[analyzer] Hide and rename FindLastStoreBRVisitor
Fri, Jun 11, 2:52 AM
vsavchenko closed D103633: [analyzer] Refactor trackExpressionValue to accept TrackingOptions.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko committed rGb6bcf953220d: [analyzer] Change FindLastStoreBRVisitor to use Tracker (authored by vsavchenko).
[analyzer] Change FindLastStoreBRVisitor to use Tracker
Fri, Jun 11, 2:52 AM
vsavchenko closed D103631: [analyzer] Turn TrackControlDependencyCond into a tracking visitor.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko committed rG967c06b3e95b: [analyzer] Reimplement trackExpressionValue as ExpressionHandler (authored by vsavchenko).
[analyzer] Reimplement trackExpressionValue as ExpressionHandler
Fri, Jun 11, 2:52 AM
vsavchenko closed D103630: [analyzer] Refactor trackRValueExpression into ExpressionHandler.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko closed D103628: [analyzer] Turn ReturnVisitor into a tracking visitor.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko committed rG0cc3100bf8d1: [analyzer] Introduce a new interface for tracking (authored by vsavchenko).
[analyzer] Introduce a new interface for tracking
Fri, Jun 11, 2:52 AM
vsavchenko closed D103624: [analyzer] Hide and rename FindLastStoreBRVisitor.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko closed D103618: [analyzer] Change FindLastStoreBRVisitor to use Tracker.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko closed D103616: [analyzer] Reimplement trackExpressionValue as ExpressionHandler.
Fri, Jun 11, 2:52 AM · Restricted Project
vsavchenko closed D103605: [analyzer] Introduce a new interface for tracking.
Fri, Jun 11, 2:51 AM · Restricted Project
vsavchenko updated the diff for D103677: [analyzer] Extract ControlDependencyHandler.

Add comment

Fri, Jun 11, 2:34 AM · Restricted Project
vsavchenko added inline comments to D103644: [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler.
Fri, Jun 11, 1:35 AM · Restricted Project

Thu, Jun 10

vsavchenko requested review of D104046: [analyzer] Simplify the process of producing notes for stores.
Thu, Jun 10, 10:19 AM · Restricted Project
vsavchenko updated the diff for D103644: [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler.

Rebase

Thu, Jun 10, 5:58 AM · Restricted Project
vsavchenko updated the diff for D103633: [analyzer] Refactor trackExpressionValue to accept TrackingOptions.

Remove unintnentionally merged changes from the next commit

Thu, Jun 10, 5:44 AM · Restricted Project
vsavchenko updated the diff for D103618: [analyzer] Change FindLastStoreBRVisitor to use Tracker.

Rebase

Thu, Jun 10, 4:08 AM · Restricted Project
vsavchenko updated the diff for D103616: [analyzer] Reimplement trackExpressionValue as ExpressionHandler.

Remove parts from the next commit

Thu, Jun 10, 3:56 AM · Restricted Project
vsavchenko added a comment to D103633: [analyzer] Refactor trackExpressionValue to accept TrackingOptions.

Oof, I also screwed up rebasing this commit as well.

Thu, Jun 10, 3:53 AM · Restricted Project
vsavchenko added a comment to D103616: [analyzer] Reimplement trackExpressionValue as ExpressionHandler.

Oh boy! I screwed up with interactive rebases 🥲

Thu, Jun 10, 3:40 AM · Restricted Project
vsavchenko updated the diff for D103961: [analyzer] Extract InlinedFunctionCallHandler.

Rebase

Thu, Jun 10, 3:36 AM · Restricted Project
vsavchenko updated the diff for D103914: [analyzer] Extract ArrayIndexHandler.

Rebase

Thu, Jun 10, 3:28 AM · Restricted Project
vsavchenko updated the diff for D103902: [analyzer] Extract NilReceiverHandler.

Rebase

Thu, Jun 10, 3:26 AM · Restricted Project
vsavchenko updated the diff for D103677: [analyzer] Extract ControlDependencyHandler.

Rebase

Thu, Jun 10, 3:26 AM · Restricted Project
vsavchenko updated the diff for D103633: [analyzer] Refactor trackExpressionValue to accept TrackingOptions.

Rebase

Thu, Jun 10, 3:25 AM · Restricted Project
vsavchenko updated the diff for D103633: [analyzer] Refactor trackExpressionValue to accept TrackingOptions.

Rebase

Thu, Jun 10, 3:20 AM · Restricted Project
vsavchenko updated the diff for D103631: [analyzer] Turn TrackControlDependencyCond into a tracking visitor.

Rebase

Thu, Jun 10, 3:18 AM · Restricted Project
vsavchenko updated the diff for D103630: [analyzer] Refactor trackRValueExpression into ExpressionHandler.

Rebase

Thu, Jun 10, 3:17 AM · Restricted Project
vsavchenko updated the diff for D103628: [analyzer] Turn ReturnVisitor into a tracking visitor.

Rebase

Thu, Jun 10, 3:14 AM · Restricted Project
vsavchenko updated the diff for D103616: [analyzer] Reimplement trackExpressionValue as ExpressionHandler.

Rebase and change KnownSVal to SVal in trackStoredValue

Thu, Jun 10, 3:06 AM · Restricted Project
vsavchenko updated the diff for D103616: [analyzer] Reimplement trackExpressionValue as ExpressionHandler.

Rebase and change how we call track for values

Thu, Jun 10, 2:57 AM · Restricted Project
vsavchenko updated the diff for D103605: [analyzer] Introduce a new interface for tracking.

Fix review remarks

Thu, Jun 10, 2:49 AM · Restricted Project