Page MenuHomePhabricator

wangxindsb (wangxin)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 7 2017, 4:39 AM (154 w, 3 d)

Recent Activity

Aug 24 2017

wangxindsb added a comment to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

There are 105 alarms running the checker on the LibreOffice, 92 True positive, 13 not sure.

Aug 24 2017, 5:54 AM

Aug 22 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Highlight pure virtual even in non-pure-only mode;
  • Add change to the header.
Aug 22 2017, 10:33 AM

Aug 21 2017

wangxindsb added a comment to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
In D34275#847434, @NoQ wrote:

Most importantly, do you think we can enable the checker by default now? Was this checker evaluated on any large codebase, and if so, how many true/false positives did it find, probably compared to the old checker?

Aug 21 2017, 10:06 PM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Fix the errors of the tests;
  • Add -analyzer-output=text to the run-line;
  • Change the message of the visitor's diagnostic piece.
Aug 21 2017, 9:25 PM

Aug 19 2017

wangxindsb added inline comments to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
Aug 19 2017, 11:37 PM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Rename reportbug();
  • Change message "Pure function" to "pure virtual function";
  • Fixing: expected-warning;
Aug 19 2017, 8:21 PM
wangxindsb added inline comments to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
Aug 19 2017, 8:16 PM
wangxindsb added reviewers for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way: NoQ, dcoughlin.
Aug 19 2017, 5:56 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

+enum class ObjectState : bool { CtorCalled, DtorCalled };
+} // end namespace

Aug 19 2017, 1:01 AM
wangxindsb removed reviewers for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way: dcoughlin, dergachev.a.
Aug 19 2017, 12:06 AM

Aug 13 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Fix the Assertion Failed when run the checker to check the building of LibreOffice.

Aug 13 2017, 5:42 PM

Jul 26 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Change the bugtype, just like the older checker.
Jul 26 2017, 2:27 AM

Jul 14 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Change two maps to one map.
  • Move the declarations of PSM and SVB after the next early return.
  • Delete the variable std::string DeclName.
  • Delete last return in reportbug().
Jul 14 2017, 10:05 AM
wangxindsb added inline comments to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
Jul 14 2017, 10:05 AM

Jul 12 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Change function name to start with a lower case letter.
  • Use StringRef instead of `const char * ' for ReportBug() const.
  • Correct the braces for single statement blocks.
Jul 12 2017, 9:43 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Change IsVirtualCall(const CallExpr *CE) to be a free static function.
  • Rename some variables.
  • Improve the BugReporterVisitor, enclose the declaration names in single quotes.
  • Hoist getSValBuilder() from the if statements.
  • Fix some code duplications.
  • Use the CXXMemberCall instead CXXInstanceCall in the CheckPreCall.
  • Remove IsVirtualCall(CE) from if statements.
  • Fix the error of the visitnode() method which may throw a wrong call graph for the code blow.
Jul 12 2017, 7:29 AM

Jul 9 2017

wangxindsb added a comment to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Look forward to your review.

Jul 9 2017, 6:14 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Use the map of object to ctor/dtor to check the virtual call.
  • Use CXXInstanceCall and getCXXThisVal method to get the 'this' instead of getThisSVal().
  • Correct some format errors.
Jul 9 2017, 6:14 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Change the two bugtype to one.
  • Use the generateErrorNode() for the pure virtual call.
  • Change the test case for the new expression.
Jul 9 2017, 6:13 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Change the two bugtype to one.
  • Use the generateErrorNode() for the pure virtual call.
  • Change the test case for the new expression.
Jul 9 2017, 6:13 AM

Jul 6 2017

wangxindsb added inline comments to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
Jul 6 2017, 8:46 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
  • Rename the BugType.
  • Correct the code style to be clang format.
  • Rename the arguments to start with uppercase letter.
  • Add the support to check for the constructor called by the New expr.

You don't need to put effort to review the code, because I will make some changes to the bug report system and the GDM of the checker which has not been done now.

Jul 6 2017, 8:43 AM

Jun 27 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

-Fix the bug of the virtual call during a function call of the object.
-Add flag for the PUREONLY.

Jun 27 2017, 10:31 AM

Jun 24 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Add license to VirtualCallChecker.cpp

Jun 24 2017, 12:04 AM

Jun 21 2017

wangxindsb added a comment to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

> Oh, I think I see how it works now. How about:

struct A;
struct X {
   void callFooOfA(A*);
};
struct A {
  A() {
    X x;
    x.virtualMethod(); // this virtual call is ok
    x.callFooOfA(this)
  }
  virtual foo();
};
void X::callFooOfA(A* a) {
   a->foo(); // Would be good to warn here. 
}
int main() {
  A a;
}

Yes, you are right, the checker doesn't warn on the a->foo();. I will fix this error soon.

Jun 21 2017, 4:34 AM

Jun 20 2017

wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Correct some error in VirtualCallChecker.cpp.
Complete the test case.

Jun 20 2017, 9:08 AM
wangxindsb added inline comments to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
Jun 20 2017, 9:01 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Add run line in the test case.

Jun 20 2017, 6:34 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Add test case for the virtual call checker.

Jun 20 2017, 6:22 AM
wangxindsb added a comment to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

What about:

struct A {
  A() {
    X x;
    x.virtualMethod(); // this virtual call is ok
    foo(); // should warn here
  }
  virtual foo();
}
int main() {
  A a;
}

Does the checker warn on the second call?

Jun 20 2017, 6:00 AM
wangxindsb added a comment to D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

I do not see any test cases for this patch. Could you add them as well?

I add the test case just now.

Jun 20 2017, 4:15 AM
wangxindsb updated the diff for D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.

Add test case for the patch

Jun 20 2017, 3:52 AM

Jun 16 2017

wangxindsb created D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way.
Jun 16 2017, 6:31 AM