NoQ (Artem Dergachev)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 3 2015, 9:16 AM (89 w, 5 d)

Recent Activity

Yesterday

NoQ added a comment to D32449: Modifying PthreadLockChecker.cpp to reduce false positives..

No-no, all i was trying to say is that there's code in PthreadLockChecker.cpp that you haven't changed, but accidentally reformatted - and this is something we normally try to avoid. Like, for example, changing enum LockingSemantics {...} from vertical to horizontal - that wasn't your intention, it just accidentally happened because you auto-reformatted the whole file. I don't mind these changes, and i didn't mean they introduce any merge conflicts for now, though they tend to do so in the future for other people working on the same code, as we have a few downstream users, and magenta guys who are working on this checker as part of D26342), so most of the time it's better not to introduce unnecessary changes.

Tue, May 23, 9:01 AM

Mon, May 22

NoQ added a comment to D32449: Modifying PthreadLockChecker.cpp to reduce false positives..

Thanks, this is great! Two more things:

Mon, May 22, 12:14 PM

Sat, May 20

NoQ added a comment to D32449: Modifying PthreadLockChecker.cpp to reduce false positives..

Thanks! Your code looks very clear now, and it seems correct to me.

Sat, May 20, 5:30 AM

Thu, May 18

NoQ planned changes to D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts..

Todo:

  • See if the extra __kindofs leak into diagnostic messages.
  • Test how this behaves in cases (2) and (4), add tests.
  • Add tests for the recursive __kindof specifier merge (i.e. properly merge the second __kindof in NSSet<__kindof NSArray<__kindof NSString>>).
Thu, May 18, 9:55 AM
NoQ updated the diff for D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts..

Added a bit more info in the code comments.

Thu, May 18, 9:23 AM
NoQ updated the diff for D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts..

I think i found a relatively clean way of storing the kindof specifiers, which is within the most-specialized type object itself.

Thu, May 18, 9:16 AM

Wed, May 17

NoQ updated the diff for D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor..

Automatically pop up from bodyfarm-originated code in PathDiagnosticLocation::getStmt().

Wed, May 17, 7:35 AM

Tue, May 16

NoQ updated the diff for D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts..

Cover more cases and be more conservative.

Tue, May 16, 8:26 AM

Mon, May 15

NoQ created D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts..
Mon, May 15, 5:35 AM

Fri, May 12

NoQ added inline comments to D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions.
Fri, May 12, 2:22 AM

Thu, May 11

NoQ accepted D33095: [analyzer] Avoid allocation in Std C function modelling..

I guess i was planning for C++ support here, but never reached that far.

Thu, May 11, 10:44 PM
NoQ accepted D33092: [analyzer] Add checker to model builtin functions.

Great, thanks!

Thu, May 11, 10:42 PM
NoQ added a comment to D33092: [analyzer] Add checker to model builtin functions.

Hmm, shouldn't this be part of BuiltinFunctionChecker aka core.builtin.BuiltinFunctions? We already have __builtin_assume_aligned here (though it doesn't seem to assume anything because that particular assumption is hard to model).

Thu, May 11, 3:05 AM

Wed, May 10

NoQ added a comment to D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions.

This is fantastic, thanks! I really like the shape of how it turned out to work.

Wed, May 10, 2:57 AM

Tue, May 9

NoQ added a comment to D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor..

That wouldn't work this way because we'd have the completely redundant "calling property accessor" piece before that, and "returning..." after that.

I think we should not print "calling" and "returning" for calling into and returning from autogenerated code,

Tue, May 9, 11:48 PM
NoQ added a comment to D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor..

What are these? Is there a PR?

Tue, May 9, 11:40 PM

Fri, May 5

NoQ added a comment to D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case.

Noticed a few more things.

Fri, May 5, 8:19 AM
NoQ added inline comments to D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter.
Fri, May 5, 7:57 AM

Thu, May 4

NoQ added inline comments to D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case.
Thu, May 4, 5:15 AM
NoQ added a comment to D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case.

I see the checker going towards what we call "metadata symbols", which seems logical.

Thu, May 4, 3:18 AM

Wed, May 3

NoQ added a comment to D32449: Modifying PthreadLockChecker.cpp to reduce false positives..

Thanks for uploading this to phabricator and sorry again that i was lost for a while.

Wed, May 3, 5:17 AM
NoQ edited reviewers for D32449: Modifying PthreadLockChecker.cpp to reduce false positives., added: NoQ; removed: dergachev.a.

Uhm, i need to do something about this duplicate account. Sorry, I have completely forgotten that the review is already up...

Wed, May 3, 4:29 AM
NoQ updated the diff for D32702: [analyzer] Fix 'Memory Error' bugtype capitalization..

Added a reusable bug category.

Wed, May 3, 2:08 AM

Mon, May 1

NoQ created D32702: [analyzer] Fix 'Memory Error' bugtype capitalization..
Mon, May 1, 9:14 AM

Thu, Apr 27

NoQ added a comment to D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler.

Thanks! Because LLVM's Illinois license is rather permissive than copyleft, we try to avoid stuff copied from GPL/LGPL software (such as Qt or K3B) in our codebase. The code doesn't seem to have been copy-pasted from a copyleft project, but I guess it's better to rename the file to avoid referencing to K3B, and i added inline comments regarding moc intro comments.

Thu, Apr 27, 11:36 PM
D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler now requires changes to proceed.

Could you add a test, like a regular test in test/Analysis/copypaste/? Like, make a file with _moc in it, and demonstrate that the checker doesn't warn, despite having obvious clones otherwise.

Thu, Apr 27, 9:13 AM
NoQ accepted D31650: [Analyzer] Detect when function pointer is freed.

Looks good, thanks!

Thu, Apr 27, 9:05 AM
NoQ added a comment to D31868: [analyzer] Check NULL pointer dereference issue for memset function.

I've a feeling we need to roll this back a little bit.

Thu, Apr 27, 8:45 AM
NoQ added a comment to D32179: [StaticAnalyzer] Move inline counter increaser to inlineCall function.

Yep, this sounds logical!

Thu, Apr 27, 8:22 AM
NoQ added a comment to D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case.

Thank you very much!

Thu, Apr 27, 8:11 AM
NoQ added a comment to D31975: [Analyzer] Iterator Checkers.

I've seen the new reviews. A lot of thanks for working on the patch split. I believe it'd eventually benefit everyone, similarly to how everybody benefits from code quality or something like that. I'd try to keep up with the "to split or not to split" discussion a bit below, not sure if it's of much interest since we're already trying this out practically and we'll see how much benefit it brings at the end :) And in any case, it's quite hard to see at first that the "incremental" mindset actually works in practice, as i do know that initially it feels strange at times.

Thu, Apr 27, 8:10 AM

Tue, Apr 25

NoQ accepted D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

This looks great, thanks a lot!

Tue, Apr 25, 10:18 AM

Mon, Apr 24

NoQ created D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor..
Mon, Apr 24, 8:45 AM

Apr 21 2017

NoQ added a comment to D31975: [Analyzer] Iterator Checkers.

I had a look at how hard it is to split the patch.

Apr 21 2017, 3:50 AM

Apr 20 2017

NoQ added inline comments to D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..
Apr 20 2017, 6:47 AM
NoQ added inline comments to D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..
Apr 20 2017, 6:46 AM
NoQ added a dependency for D32291: [analyzer] Implement handling array subscript into null pointer, improve null dereference checks for array subscripts: D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..
Apr 20 2017, 6:45 AM
NoQ added a dependent revision for D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved.: D32291: [analyzer] Implement handling array subscript into null pointer, improve null dereference checks for array subscripts.
Apr 20 2017, 6:45 AM
NoQ created D32291: [analyzer] Implement handling array subscript into null pointer, improve null dereference checks for array subscripts.
Apr 20 2017, 6:44 AM

Apr 19 2017

NoQ added inline comments to D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..
Apr 19 2017, 11:06 PM
NoQ updated the diff for D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..

Fix comments!

Apr 19 2017, 11:04 PM
NoQ added a comment to D31975: [Analyzer] Iterator Checkers.
  1. Could you do renaming the checker file in a separate patch, so that we saw an actual diff, not a whole greenish file, here on phabricator?
  2. The invalidated iterator checker looks relatively small (a single check and a few rounds of iterator invalidations), would it be hard to split it up into a separate patch? That'd leave us with just one checker added.
Apr 19 2017, 10:59 PM
NoQ added a comment to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

Yay, now that's a lot cleaner!

Apr 19 2017, 10:11 PM
NoQ added a comment to D31975: [Analyzer] Iterator Checkers.

I think for this case it'd be great to (instead) add comments all over the place (especially in checker callbacks, eg. check[Pre|Post]Call() function bodies) to indicate what check every piece of code is for. That'd be equally easy to review, at least for me, but it'd also help greatly if we start splitting up checkers into modelling and checking parts.

Apr 19 2017, 9:57 PM

Apr 18 2017

NoQ added a comment to D31868: [analyzer] Check NULL pointer dereference issue for memset function.

Wow, so you're doing the binding thing now? Thanks! It was not critical for landing this patch, so you could have fixed comments here, allowing us to commit what's already done, and then proceed with further improvements. It's also easier to review and aligns with the LLVM's policy of incremental development.

Apr 18 2017, 7:17 AM
NoQ added inline comments to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.
Apr 18 2017, 7:02 AM
NoQ added inline comments to D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions.
Apr 18 2017, 6:55 AM

Apr 13 2017

NoQ added a comment to D31541: [analyzer] MisusedMovedObjectChecker: Add a printState() method..

Hmm, i've been thinking of writing a test for this via ExprInspection's clang_analyzer_printState(), however printState() functionality is only enabled in debug builds, and i'm not seeing how to enable the test only on debug builds (there's REQUIRES: but it only seems to have an asserts flag).

Apr 13 2017, 4:17 AM
NoQ added a comment to D31868: [analyzer] Check NULL pointer dereference issue for memset function.

This looks correct! Thanks for taking this up.

Apr 13 2017, 4:09 AM
NoQ updated the diff for D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..

Remove accidentally added braces in unrelated code.

Apr 13 2017, 12:00 AM

Apr 12 2017

NoQ added inline comments to D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..
Apr 12 2017, 10:05 AM
NoQ created D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved..
Apr 12 2017, 9:55 AM
NoQ added a comment to D31886: [analyzer] Simplify values in binary operations more aggressively.

maybe we want to skip this kind of simplification in case of Z3?

Apr 12 2017, 9:04 AM
NoQ updated the diff for D31886: [analyzer] Simplify values in binary operations more aggressively.

Thanks for the comments! Updated.

Apr 12 2017, 5:23 AM

Apr 10 2017

NoQ added a comment to D30691: [analyzer] Support for naive cross translational unit analysis.

One more obvious observation regarding scan-build: because you are already reading a compilation database, the whole tool is essentially usable in combination with the current scan-build-py (which can create compilation databases). So it's already quite usable, but you're forced to do regular analysis before cross-translation-unit analysis. So all we need is an extra mode in scan-build-py that does the interception and leaves the rest of the work to us, either by piping commands to us directly, or by providing us with a compilation database (if --intercept-first is passed). Having some kind of --intercept-only would solve half of the problems. Of course, ideally the logic that adds the -analyzer* options should also be re-used, but for usability it isn't immediately necessary.

Apr 10 2017, 9:32 AM
NoQ added a comment to D30691: [analyzer] Support for naive cross translational unit analysis.

Yeah, of course, ideally sticking this into scan-build, one way or another, would be great. I understand that it'd require quite a bit of communication with Laszlo. Otherwise we're just duplicating a whole lot of things.

Apr 10 2017, 9:26 AM
NoQ created D31886: [analyzer] Simplify values in binary operations more aggressively.
Apr 10 2017, 8:08 AM

Apr 6 2017

NoQ added a comment to D23418: [analyzer] Added a reusable constraint system to the CloneDetector.
$ cat test.c
#include <stdio.h>
int main() {
  int i = 5;
  {
    int i = i;
    printf("%d\n", i);
  }
  return 0;
}
$ clang test.c
$ ./a.out
32767
$ clang test.c -Xclang -ast-dump
...
`-FunctionDecl 0x7ff82d8eac78 <test.c:2:1, line:9:1> line:2:5 main 'int ()'
  `-CompoundStmt 0x7ff82d8eb070 <col:12, line:9:1>
    |-DeclStmt 0x7ff82d8eadb0 <line:3:3, col:12>
    | `-VarDecl 0x7ff82d8ead30 <col:3, col:11> col:7 i 'int' cinit
    |   `-IntegerLiteral 0x7ff82d8ead90 <col:11> 'int' 5
    |-CompoundStmt 0x7ff82d8eb010 <line:4:3, line:7:3>
    | |-DeclStmt 0x7ff82d8eae78 <line:5:5, col:14>
    | | `-VarDecl 0x7ff82d8eadd8 <col:5, col:13> col:9 used i 'int' cinit
    | |   `-ImplicitCastExpr 0x7ff82d8eae60 <col:13> 'int' <LValueToRValue>
    | |     `-DeclRefExpr 0x7ff82d8eae38 <col:13> 'int' lvalue Var 0x7ff82d8eadd
...
Apr 6 2017, 3:56 AM
NoQ added inline comments to D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler.
Apr 6 2017, 3:40 AM

Apr 5 2017

NoQ reopened D23418: [analyzer] Added a reusable constraint system to the CloneDetector.

Hmm, reverted because i'm seeing crashes on some buildbots (works for me though).

Apr 5 2017, 8:22 AM
NoQ added inline comments to D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler.
Apr 5 2017, 5:37 AM
NoQ added inline comments to D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions.
Apr 5 2017, 5:30 AM
NoQ added inline comments to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.
Apr 5 2017, 5:17 AM
NoQ added a comment to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

I updated my patch using if () {} else {} instead of ? :

Apr 5 2017, 5:15 AM
NoQ added a comment to D31453: [analyzer] Fix SimpleSValBuilder evalBinOpLN elementType might be nullptr issue.

Oh, sorry, i didn't notice this detail. I see it now.

Apr 5 2017, 5:07 AM

Apr 4 2017

NoQ added a comment to D31453: [analyzer] Fix SimpleSValBuilder evalBinOpLN elementType might be nullptr issue.

Hmm. I could not instantly reproduce the crash on your k3bdevice.cpp example, it doesn't crash both with and without both your and my patches.

Apr 4 2017, 8:55 AM
NoQ added inline comments to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.
Apr 4 2017, 8:50 AM
NoQ accepted D23418: [analyzer] Added a reusable constraint system to the CloneDetector.

Yay, i think this is good to go. Sorry again for being slow>< I guess i'd go ahead and land this patch soon.

Apr 4 2017, 8:41 AM
NoQ added a comment to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Hello, sorry for your having to wait on me. The implementation looks good, i'm only having a couple of public API concerns.

Apr 4 2017, 8:27 AM
NoQ added a comment to D28771: [Analyzer] Various fixes for the IteratorPastEnd checker.

Because i couldn't reproduce the loc-nonloc problem on my standard library, could you share a preprocessed file with the issue? I'm really curious at what's going on here, and it's the only issue remaining, so maybe we could squash it together.

Apr 4 2017, 7:53 AM
NoQ added a comment to D27918: [analyzer] OStreamChecker.

Sorry again for the delays, thank you for your patience. Your checker is in good shape, very well-structured and easy to follow, you definitely know your stuff, and my comments here are relatively minor.

Apr 4 2017, 7:50 AM
NoQ accepted D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe.

There are several undetected "TODO: loss of precision" right now in the tests that I would like to fix.

Apr 4 2017, 6:10 AM
NoQ added a comment to D31650: [Analyzer] Detect when function pointer is freed.

Hello, thanks for the patch!

Apr 4 2017, 1:06 AM

Mar 31 2017

NoQ created D31541: [analyzer] MisusedMovedObjectChecker: Add a printState() method..
Mar 31 2017, 9:16 AM
NoQ created D31538: [analyzer] MisusedMovedObjectChecker: Fix a false positive on state-resetting a base-class sub-object..
Mar 31 2017, 9:05 AM
NoQ added a comment to D31453: [analyzer] Fix SimpleSValBuilder evalBinOpLN elementType might be nullptr issue.

Thanks for looking into this!
I've heard that this may fail, but i didn't have a good reproduction case. I might also have fixed it partially or completely as a side effect of https://reviews.llvm.org/rL298927 .

Mar 31 2017, 7:47 AM

Mar 24 2017

NoQ added a comment to D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions.

Thanks again for the awesome stuff! It took years for me to even come up with the idea.

Mar 24 2017, 7:16 AM
NoQ added a comment to D24246: StaticAnalyzer - MisusedMovedObjectChecker.

I committed the checker. Thanks / congrats / all the stuff!

Mar 24 2017, 3:18 AM
NoQ added a comment to D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler.

This checker would definitely benefit from suppression in all auto-generated files, which definitely includes MOC files.

Mar 24 2017, 3:16 AM

Mar 23 2017

NoQ created D31289: [analyzer] Fix symbolication for unknown unary increment/decrement results..
Mar 23 2017, 9:06 AM

Mar 22 2017

NoQ added inline comments to D30534: [analyzer] When creating a temporary object copy, properly copy the value into it..
Mar 22 2017, 4:54 AM
NoQ updated the diff for D30534: [analyzer] When creating a temporary object copy, properly copy the value into it..

Fix review comments!

Mar 22 2017, 4:53 AM

Mar 20 2017

NoQ added a comment to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

Hello, thanks for the patch!

Mar 20 2017, 7:17 AM
NoQ added a comment to D23418: [analyzer] Added a reusable constraint system to the CloneDetector.

I think this is awesome.

Mar 20 2017, 6:57 AM

Mar 10 2017

NoQ added a comment to D30798: [analyzer] Turn suppress-c++-stdlib on by default .

I'd like to clarify that in case of path-sensitive analysis there are actually three warning classes to consider.

Mar 10 2017, 6:35 AM

Mar 7 2017

NoQ accepted D28445: [Analyzer] Extend taint propagation and checking.

I believe this should land. Thank you very much for getting this far to get this fixed.

Mar 7 2017, 7:52 AM
NoQ accepted D30157: [analyzer] Improve valist check.

It's great to see things move out of alpha and finally become actually accessible to the majority of users. Thanks!

Mar 7 2017, 7:28 AM
NoQ added a comment to D23418: [analyzer] Added a reusable constraint system to the CloneDetector.

I'm sorry for the delays; i'm humbly requesting a couple more weeks to get back to this awesome stuff.

Mar 7 2017, 7:22 AM
NoQ added a comment to D24246: StaticAnalyzer - MisusedMovedObjectChecker.

I tested this checker on WebKit code. It seems to work as expected, and i liked the support for WTFMove(). However i suddenly realized that it is not always unsafe to use a moved-from object, as discussed in detail at, for example, http://stackoverflow.com/a/7028318 . The checker already includes a state-reset method list, however there are also methods that are generally safe to call and possibly useful (such as .size()) or methods that don't entirely reset the state but affect it (.resize()?). People may use these tricks to improve performance. We shouldn't flag these tricks in a checker that is enabled by default, because it'd make people change and regress working code.

Mar 7 2017, 2:24 AM

Mar 6 2017

NoQ accepted D30341: [analyzer] clarify error messages about uninitialized function arguments.

Oh well, that's not good. Probably that's because we always highlight the current statement in path-sensitive reports. I guess we could improve upon that in the bug reporter.

Mar 6 2017, 11:52 PM
NoQ planned changes to D30534: [analyzer] When creating a temporary object copy, properly copy the value into it..
Mar 6 2017, 5:46 AM

Mar 3 2017

NoQ added a comment to D30489: [analyzer] catch out of bounds for VLA.

Do you agree that this is the problem? Would it be a good idea to try to keep the sz in the ProgramState?

Mar 3 2017, 2:59 PM
NoQ added a comment to D30341: [analyzer] clarify error messages about uninitialized function arguments.

The code looks good to me, but i'm expressing a tiny doubt: regardless of the output format, the user always has the relevant argument highlighted anyway (column number, tilde-underlined in command line, blue-ish box in scan-build, etc.), so the only significant clarification i see is on test files, where the column is not obvious.

Mar 3 2017, 2:45 PM
NoQ accepted D30589: [ExprInspectionChecker] Improve usability for C.

Thanks! This bugged me as well, but i didn't think of this trick :)

Mar 3 2017, 2:29 PM

Mar 2 2017

NoQ created D30534: [analyzer] When creating a temporary object copy, properly copy the value into it..
Mar 2 2017, 6:25 AM

Mar 1 2017

NoQ created D30499: [analyzer] pr32088: Don't destroy the temporary if its initializer causes return..
Mar 1 2017, 7:25 AM

Feb 28 2017

NoQ updated subscribers of D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output.

I think this is great. We've been hearing a lot of complaints on the mailing lists recently about that problem.

Feb 28 2017, 9:06 AM

Feb 23 2017

NoQ added inline comments to D28771: [Analyzer] Various fixes for the IteratorPastEnd checker.
Feb 23 2017, 9:20 AM
NoQ added inline comments to D28771: [Analyzer] Various fixes for the IteratorPastEnd checker.
Feb 23 2017, 8:16 AM
NoQ added a comment to D30289: [Analyzer] Add bug visitor for taint checker.

Yay, this is awesome!

Feb 23 2017, 1:44 AM