Page MenuHomePhabricator

RedDocMD (Deep Majumder)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 24 2021, 12:52 AM (74 w, 3 d)

Recent Activity

Nov 7 2021

RedDocMD added a comment to D98726: [analyzer] Enabling MallocChecker to take up after SmartPtrModelling.

The issues highlighted here have been partially (one could argue mostly) solved by D105821. That patch hasn't been merged because it needs more tests and also needs to be split.

Nov 7 2021, 11:36 PM · Restricted Project

Sep 20 2021

RedDocMD committed rG5dee50111c13: [analyzer] Move docs of SmartPtr to correct subcategory (authored by RedDocMD).
[analyzer] Move docs of SmartPtr to correct subcategory
Sep 20 2021, 7:44 AM
RedDocMD closed D110032: [analyzer] Move docs of SmartPtr to correct subcategory.
Sep 20 2021, 7:43 AM · Restricted Project

Sep 19 2021

RedDocMD requested review of D110032: [analyzer] Move docs of SmartPtr to correct subcategory.
Sep 19 2021, 2:09 AM · Restricted Project

Sep 3 2021

RedDocMD added a comment to D108912: [release][analyzer] Add 13.0.0 release notes.

I suppose that the SmartPtrModelling patches from GSoC this year shouldn't be added since they only involve an alpha checker.

Actually, you also patched the enabled-by-default modeling part of smart pointers, haven't you? Those definitely deserve their mention!

Sep 3 2021, 6:31 AM · Restricted Project
RedDocMD added a comment to D108912: [release][analyzer] Add 13.0.0 release notes.

I suppose that the SmartPtrModelling patches from GSoC this year shouldn't be added since they only involve an alpha checker.

Sep 3 2021, 5:48 AM · Restricted Project

Aug 16 2021

RedDocMD committed rG198e6771e24f: [analyzer] Add option to SATest.py for extra checkers (authored by RedDocMD).
[analyzer] Add option to SATest.py for extra checkers
Aug 16 2021, 10:13 PM
RedDocMD closed D106739: [analyzer] Add option to SATest.py for extra checkers.
Aug 16 2021, 10:13 PM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Connecting to MallocChecker

Aug 16 2021, 12:08 AM · Restricted Project

Aug 8 2021

RedDocMD added inline comments to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.
Aug 8 2021, 9:39 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Further pointer escape

Aug 8 2021, 9:36 AM · Restricted Project

Aug 5 2021

RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Never gonna give you up.

Aug 5 2021, 8:18 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Bug fix in modelling

Aug 5 2021, 8:11 AM · Restricted Project

Aug 4 2021

RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

I have incorporated the bug-fixes suggested last meeting (except the pointer escape one). And it seems to have had dramatic results - now the only extra errors being reported are the pointer escape ones (5 of them, from 3 different projects). Some projects are actually reporting that bug reports have been removed due to this patch.

Aug 4 2021, 6:08 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Better modelling, bug fixes

Aug 4 2021, 5:49 AM · Restricted Project

Jul 30 2021

RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Well some of them are exactly the same type as the Lame class example above. Like: simbody/report-TestArray.cpp-testMoveConstructionAndAssignment-27-1.html#EndPath. (So the incomplete modelling of the destructor is at least one cause. The other reason that you suggested might as well be true).
Btw, the destructor1.txt file from my previous comment should be used to drill down the newly added reports. (Sorry for the inconvenience, sshfs is really slow and so it was more convenient to tar the whole folder and scp it).

Jul 30 2021, 11:57 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Invalidating using inner pointer destructor call

Jul 30 2021, 10:26 AM · Restricted Project
RedDocMD added a comment to D106739: [analyzer] Add option to SATest.py for extra checkers.

@RedDocMD Could you, please, explain the motivation and add at least one test to verify it works.

Jul 30 2021, 8:57 AM · Restricted Project

Jul 29 2021

RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

On running this patch on the projects directory, a bunch of projects emit false-positives: mostly of the form Potential memory leak. This points to the fact that without calling the destructor of the pointee type, we are going to have a lot of false positives (408 for one project is the worst I have seen). I have attached the result file.

Jul 29 2021, 10:10 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Put in a TODO

Jul 29 2021, 5:56 AM · Restricted Project
RedDocMD added inline comments to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.
Jul 29 2021, 5:55 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Bug fixes, some cleanup

Jul 29 2021, 5:50 AM · Restricted Project
RedDocMD added inline comments to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.
Jul 29 2021, 5:49 AM · Restricted Project
RedDocMD added inline comments to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.
Jul 29 2021, 5:45 AM · Restricted Project

Jul 28 2021

RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Ah I see.
As a side note, without the "redundant" invalidation that is being done, the analyzer crashes on shared_ptr. (Because the State essentially remains the same and that's what causes the crash).

Jul 28 2021, 9:39 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Invalidating via the CallEvent

Jul 28 2021, 2:37 AM · Restricted Project

Jul 25 2021

RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Removed a fatal bug

Jul 25 2021, 10:09 PM · Restricted Project
RedDocMD added a comment to D106739: [analyzer] Add option to SATest.py for extra checkers.

@vsavchenko is this okay?

Jul 25 2021, 10:03 PM · Restricted Project
RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

the following code doesn't emit any warnings

This code doesn't seem to have any unique_ptrs in it? It's not like you're modeling this custom class as well? Can you try the same with the actual unique_ptr?

Jul 25 2021, 10:00 PM · Restricted Project

Jul 23 2021

RedDocMD added a comment to D106739: [analyzer] Add option to SATest.py for extra checkers.

It turns out that there is already an option called extra-analyzer-config to pass analyzer configs, like setting ModelSmartPtrDereference to true

Jul 23 2021, 10:44 PM · Restricted Project
RedDocMD requested review of D106739: [analyzer] Add option to SATest.py for extra checkers.
Jul 23 2021, 10:41 PM · Restricted Project

Jul 22 2021

RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

But before we go there we should decide whether we want to actually go for inlining (or otherwise default-evaluating) these destructors. If we do, we should probably not spend too much time on improving invalidation in the checker, because default evaluation would do that properly for us anyway (well, it doesn't really dodge any problems such as the absence of the necessary AST so we'll probably have to solve all these problems anyway, just in a different setting). So it's great that we've fixed evalCall for destructors, this could definitely land as a separate patch (tested via debug.AnalysisOrder), but we really need to think what to do next here. So I recommend gathering some data to see if proper destructor evaluation is actually a real problem.

Jul 22 2021, 6:38 AM · Restricted Project

Jul 21 2021

RedDocMD added inline comments to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 21 2021, 5:57 AM · Restricted Project
RedDocMD committed rG80068ca6232b: [analyzer] Fix for faulty namespace test in SmartPtrModelling (authored by RedDocMD).
[analyzer] Fix for faulty namespace test in SmartPtrModelling
Jul 21 2021, 5:54 AM
RedDocMD closed D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 21 2021, 5:54 AM · Restricted Project

Jul 20 2021

RedDocMD added a comment to D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

This is a minimal model of destructors in smart-ptr.
Other than the need to probably model the destructor of the pointee, is there anything else to do?

Jul 20 2021, 11:22 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Minimal modelling of destructor

Jul 20 2021, 11:21 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Reformat

Jul 20 2021, 10:37 AM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Retrieving patch

Jul 20 2021, 10:33 AM · Restricted Project
RedDocMD updated the diff for D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

Removed unnecessary white space

Jul 20 2021, 2:56 AM · Restricted Project
RedDocMD added inline comments to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 20 2021, 2:54 AM · Restricted Project
RedDocMD added inline comments to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 20 2021, 2:48 AM · Restricted Project
RedDocMD updated the diff for D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

More refactor

Jul 20 2021, 2:48 AM · Restricted Project
RedDocMD updated the diff for D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

Refactored out check

Jul 20 2021, 1:42 AM · Restricted Project

Jul 19 2021

RedDocMD added a comment to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

Would this test do?

Jul 19 2021, 11:36 PM · Restricted Project
RedDocMD updated the diff for D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

Added a simple test

Jul 19 2021, 11:35 PM · Restricted Project
RedDocMD added inline comments to D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 19 2021, 11:21 PM · Restricted Project
RedDocMD retitled D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling from [analyer] Fix for faulty namespace test in SmartPtrModelling to [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 19 2021, 11:54 AM · Restricted Project
RedDocMD updated the diff for D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.

Reformatted patch

Jul 19 2021, 11:51 AM · Restricted Project
RedDocMD requested review of D106296: [analyzer] Fix for faulty namespace test in SmartPtrModelling.
Jul 19 2021, 11:49 AM · Restricted Project

Jul 18 2021

RedDocMD closed D105421: [analyzer] Handle << operator for std::unique_ptr.

For some reason this revision did not get automatically closed after commit, manually merging it.

Jul 18 2021, 7:28 AM · Restricted Project
RedDocMD committed rGd825309352b4: [analyzer] Handle std::make_unique (authored by RedDocMD).
[analyzer] Handle std::make_unique
Jul 18 2021, 7:25 AM
RedDocMD closed D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.
Jul 18 2021, 7:25 AM · Restricted Project
RedDocMD updated the diff for D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Marked test with FIXME notes

Jul 18 2021, 7:21 AM · Restricted Project
RedDocMD updated the diff for D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Fixed up tests

Jul 18 2021, 7:16 AM · Restricted Project
RedDocMD updated the diff for D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Post-rebase cleanup

Jul 18 2021, 2:23 AM · Restricted Project
RedDocMD committed rG0cd98bef1b6f: [analyzer] Handle std::swap for std::unique_ptr (authored by RedDocMD).
[analyzer] Handle std::swap for std::unique_ptr
Jul 18 2021, 2:10 AM
RedDocMD closed D104300: [analyzer] Handle std::swap for std::unique_ptr.
Jul 18 2021, 2:10 AM · Restricted Project
RedDocMD updated the diff for D104300: [analyzer] Handle std::swap for std::unique_ptr.

Post rebase cleanup

Jul 18 2021, 1:11 AM · Restricted Project

Jul 16 2021

RedDocMD committed rG13fe78212fe7: [analyzer] Handle << operator for std::unique_ptr (authored by RedDocMD).
[analyzer] Handle << operator for std::unique_ptr
Jul 16 2021, 12:05 AM

Jul 15 2021

RedDocMD updated the diff for D105421: [analyzer] Handle << operator for std::unique_ptr.

Post rebase cleanup

Jul 15 2021, 9:43 PM · Restricted Project
RedDocMD committed rG48688257c52d: [analyzer] Model comparision methods of std::unique_ptr (authored by RedDocMD).
[analyzer] Model comparision methods of std::unique_ptr
Jul 15 2021, 9:25 PM
RedDocMD closed D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jul 15 2021, 9:25 PM · Restricted Project
RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Removed one bug, many more to go

Jul 15 2021, 8:54 AM · Restricted Project

Jul 14 2021

RedDocMD updated the diff for D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.

Cleanup, still doesn't work

Jul 14 2021, 9:23 PM · Restricted Project

Jul 13 2021

RedDocMD added a comment to D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Is the syntax of specifying expected notes and warnings documented somewhere? I could not find the note-specific syntax.

Jul 13 2021, 8:01 AM · Restricted Project
RedDocMD updated the diff for D103750: [analyzer] Handle std::make_unique for SmartPtrModeling.

Fixing up tests

Jul 13 2021, 7:58 AM · Restricted Project
RedDocMD updated the diff for D105421: [analyzer] Handle << operator for std::unique_ptr.

Removed stupid mistakes

Jul 13 2021, 2:31 AM · Restricted Project

Jul 12 2021

RedDocMD requested review of D105821: [analyzer] [WIP] Model destructor for std::unique_ptr.
Jul 12 2021, 8:37 AM · Restricted Project

Jul 10 2021

RedDocMD updated the diff for D105421: [analyzer] Handle << operator for std::unique_ptr.

Little refactors, one more test

Jul 10 2021, 8:08 AM · Restricted Project
RedDocMD added inline comments to D105421: [analyzer] Handle << operator for std::unique_ptr.
Jul 10 2021, 7:50 AM · Restricted Project

Jul 9 2021

RedDocMD updated the diff for D105421: [analyzer] Handle << operator for std::unique_ptr.

Tests implemented

Jul 9 2021, 12:11 AM · Restricted Project

Jul 8 2021

RedDocMD added a comment to D105421: [analyzer] Handle << operator for std::unique_ptr.

I will be figuring out some tests tomorrow morning.

Jul 8 2021, 11:48 AM · Restricted Project
RedDocMD updated the diff for D105421: [analyzer] Handle << operator for std::unique_ptr.

Little refactors

Jul 8 2021, 11:43 AM · Restricted Project

Jul 7 2021

RedDocMD added inline comments to D105421: [analyzer] Handle << operator for std::unique_ptr.
Jul 7 2021, 11:50 AM · Restricted Project
RedDocMD updated the diff for D105421: [analyzer] Handle << operator for std::unique_ptr.

Invalidating regions

Jul 7 2021, 11:49 AM · Restricted Project

Jul 5 2021

RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Major bug fix

Jul 5 2021, 10:24 AM · Restricted Project
RedDocMD requested review of D105421: [analyzer] Handle << operator for std::unique_ptr.
Jul 5 2021, 1:50 AM · Restricted Project

Jul 4 2021

RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Little refactors

Jul 4 2021, 1:35 AM · Restricted Project
RedDocMD added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jul 4 2021, 1:32 AM · Restricted Project

Jul 2 2021

RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Simplify SVal on state split, other refactors

Jul 2 2021, 11:12 AM · Restricted Project
RedDocMD added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jul 2 2021, 11:08 AM · Restricted Project
RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Performing state split on normal comparision ops

Jul 2 2021, 1:29 AM · Restricted Project

Jun 30 2021

RedDocMD added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 30 2021, 12:32 AM · Restricted Project
RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Refactored out common block

Jun 30 2021, 12:24 AM · Restricted Project

Jun 29 2021

RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Fixed bug in enum conversion

Jun 29 2021, 10:16 PM · Restricted Project
RedDocMD added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

Sorry for not updating. Was down with fever.
This patch does *not* work now. operationKindFromOverloadedOperator is broken because the maps don't get populated. I am not entirely sure why this is happening.
Will try to fix tomorrow. @NoQ, @vsavchenko, @xazax.hun, @teemperor do you have a hunch as to why this may be happening?

Jun 29 2021, 10:35 AM · Restricted Project
RedDocMD retitled D104616: [analyzer] Model comparision methods of std::unique_ptr from [analyzer][WIP] Model comparision methods of std::unique_ptr to [analyzer] Model comparision methods of std::unique_ptr.
Jun 29 2021, 10:28 AM · Restricted Project

Jun 26 2021

RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

First try at implementing conversion function from OverloadedOperatorKind to BinaryOperatorKind

Jun 26 2021, 10:49 AM · Restricted Project
RedDocMD added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 26 2021, 2:27 AM · Restricted Project

Jun 25 2021

RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Removed dump statement

Jun 25 2021, 3:19 AM · Restricted Project
RedDocMD added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 25 2021, 3:19 AM · Restricted Project
RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Refactored code, removed duplications, fixed tests, added some more

Jun 25 2021, 3:16 AM · Restricted Project
RedDocMD added inline comments to D104616: [analyzer] Model comparision methods of std::unique_ptr.
Jun 25 2021, 2:42 AM · Restricted Project

Jun 24 2021

RedDocMD added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

We have a failing test here (test at line 473).
Which makes me wonder if the handleComparision function is at all called. This is something I need to check.

Jun 24 2021, 11:45 AM · Restricted Project
RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Removed re-invention, added tests

Jun 24 2021, 11:43 AM · Restricted Project
RedDocMD added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

Looks like I have wasted a good deal of effort. :(

Sorry about that! :( If we learned anything new in the process it was not wasted effort though.

Jun 24 2021, 6:42 AM · Restricted Project

Jun 22 2021

RedDocMD added a comment to D104616: [analyzer] Model comparision methods of std::unique_ptr.

Why not simply delegate this job to assume(evalBinOp(...)) over raw pointer values, which already has all this logic written down nicely?

This is what I had in mind, I just did not want to spoil it :)

Jun 22 2021, 8:08 PM · Restricted Project
RedDocMD updated the diff for D104616: [analyzer] Model comparision methods of std::unique_ptr.

Logic for handling special cases, when both are unique_ptr

Jun 22 2021, 10:50 AM · Restricted Project

Jun 20 2021

RedDocMD added a comment to D104616: [analyzer] 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.

Jun 20 2021, 11:24 PM · Restricted Project