r247696 - Mention that libcxx is required to build Compiler-RT tests on OS X.

2015-09-15 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Tue Sep 15 10:05:47 2015 New Revision: 247696 URL: http://llvm.org/viewvc/llvm-project?rev=247696&view=rev Log: Mention that libcxx is required to build Compiler-RT tests on OS X. Modified: cfe/trunk/www/get_started.html Modified: cfe/trunk/www/get_started.html URL: ht

Re: [PATCH] D5102: [analyzer][Bugfix/improvement] Fix for PR16833

2015-09-22 Thread Yury Gribov via cfe-commits
ygribov added a subscriber: ygribov. ygribov added a comment. Folks, could someone commit this for us? http://reviews.llvm.org/D5102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D14014: Checker of proper vfork usage

2015-10-23 Thread Yury Gribov via cfe-commits
ygribov created this revision. ygribov added reviewers: zaks.anna, dcoughlin, jordan_rose, krememek. ygribov added a subscriber: cfe-commits. ygribov set the repository for this revision to rL LLVM. Hi all, This checker verifies that vfork is used safely. Vforked process shared stack with parent

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-23 Thread Yury Gribov via cfe-commits
ygribov added a comment. > I didn't know vfork() is in regular use. Neither did I, until I had to debug the damned code. Actually Android has some 5 or 6 uses of it. > I'm also not convinced that flagging all stores in the vfork child process is > the right thing to do, > since the FP rate

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-23 Thread Yury Gribov via cfe-commits
ygribov added a comment. > One thing to note (which I assume you are already aware of) is that we > already have the "security.insecureAPI.vfork" checker, > an AST check that warns on *every* use of vfork. Yes, I was aware of this one. Unfortunately as I mentioned above vfork is probably to

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-23 Thread Yury Gribov via cfe-commits
ygribov added a comment. > This is a valid concern because it greatly complicates enablement of > VforkChecker for a casual user. I think at the very least I can check that InsecureAPI is enable and issue a warning to user. Repository: rL LLVM http://reviews.llvm.org/D14014 ___

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-24 Thread Yury Gribov via cfe-commits
ygribov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/VforkChecker.cpp:47 @@ +46,3 @@ + + bool isChildProcess(const ProgramStateRef State) const; + a.sidorin wrote: > I think it's a good idea to make some functions static and/or move them out >

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-24 Thread Yury Gribov via cfe-commits
ygribov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/VforkChecker.cpp:149 @@ +148,3 @@ + + // see if it's an ordinary assignment + do { ygribov wrote: > a.sidorin wrote: > > You can use early return to escape do{}. > In this particular case - y

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-26 Thread Yury Gribov via cfe-commits
ygribov removed rL LLVM as the repository for this revision. ygribov updated this revision to Diff 38423. ygribov added a comment. Updated based on review. http://reviews.llvm.org/D14014 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/StaticAn

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-26 Thread Yury Gribov via cfe-commits
ygribov marked 43 inline comments as done. ygribov added a comment. http://reviews.llvm.org/D14014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-28 Thread Yury Gribov via cfe-commits
ygribov added a comment. > > This is a valid concern because it greatly complicates enablement of > > VforkChecker for a casual user. > > > I think at the very least I can check that InsecureAPI is enable and issue a > warning to user. Actually I think that's not a huge problem. InsecureA

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-28 Thread Yury Gribov via cfe-commits
ygribov added a comment. Done! http://reviews.llvm.org/D14014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-29 Thread Yury Gribov via cfe-commits
ygribov added a comment. > What happens when this checker and the security.insecureAPI.vfork are enabled > at the same time? Both checkers will emit warnings independently (which I think is ok). > Did you run this checker on a large body of code? Did it find any issues? Yes, I've ran it on A

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-29 Thread Yury Gribov via cfe-commits
ygribov updated this revision to Diff 38740. ygribov added a comment. Updated after Anna's review. http://reviews.llvm.org/D14014 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/VforkChecker.cpp test/Analysis/Inputs/s

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-29 Thread Yury Gribov via cfe-commits
ygribov marked 15 inline comments as done. Comment at: lib/StaticAnalyzer/Checkers/VforkChecker.cpp:45 @@ +44,3 @@ + CheckerContext &C) { + const Expr *CE = Call.getOriginExpr(); + It seems that other checkers do more or less the

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-02 Thread Yury Gribov via cfe-commits
ygribov updated this revision to Diff 38926. ygribov marked 2 inline comments as done. ygribov added a comment. Updated after review. http://reviews.llvm.org/D14014 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/Stati

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-02 Thread Yury Gribov via cfe-commits
ygribov marked 5 inline comments as done. ygribov added a comment. http://reviews.llvm.org/D14014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-02 Thread Yury Gribov via cfe-commits
ygribov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp:118 @@ +117,3 @@ +std::tie(VD, Init) = parseAssignment(S); +if (VD && Init) + S = Init; Semantics is slightly changed for assignment case here: originally S

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-03 Thread Yury Gribov via cfe-commits
ygribov updated this revision to Diff 39040. ygribov added a comment. Updated warning messages. http://reviews.llvm.org/D14014 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/S

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-03 Thread Yury Gribov via cfe-commits
ygribov marked 2 inline comments as done. ygribov added a comment. http://reviews.llvm.org/D14014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-05 Thread Yury Gribov via cfe-commits
ygribov updated this revision to Diff 39345. ygribov added a comment. Moved to unix package (and thus enabled by default). I now also test for collaboration with security.InsecureAPI.vfork. http://reviews.llvm.org/D14014 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-05 Thread Yury Gribov via cfe-commits
ygribov added a comment. > I now also test for collaboration with security.InsecureAPI.vfork. Should probably clarify: I've added checks to testcase to verify that new checker properly interacts with (existing) InsecureAPI.vfork checker, http://reviews.llvm.org/D14014 _

r252285 - [analyzer] Add VforkChecker to find unsafe code in vforked process.

2015-11-06 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Fri Nov 6 05:16:31 2015 New Revision: 252285 URL: http://llvm.org/viewvc/llvm-project?rev=252285&view=rev Log: [analyzer] Add VforkChecker to find unsafe code in vforked process. This checker looks for unsafe constructs in vforked process: function calls (excluding whitelis

Re: [PATCH] D14014: Checker of proper vfork usage

2015-11-06 Thread Yury Gribov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252285: [analyzer] Add VforkChecker to find unsafe code in vforked process. (authored by ygribov). Changed prior to commit: http://reviews.llvm.org/D14014?vs=39345&id=39508#toc Repository: rL LLVM h

r252721 - [ASan] Allow -fsanitize-recover=address.

2015-11-11 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Wed Nov 11 04:45:48 2015 New Revision: 252721 URL: http://llvm.org/viewvc/llvm-project?rev=252721&view=rev Log: [ASan] Allow -fsanitize-recover=address. Differential Revision: http://reviews.llvm.org/D14243 Modified: cfe/trunk/docs/UsersManual.rst cfe/trunk/lib/

r259646 - [analyzer] AnalysisConsumer: print fully-qualified function name while displaying progress

2016-02-03 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Wed Feb 3 07:35:33 2016 New Revision: 259646 URL: http://llvm.org/viewvc/llvm-project?rev=259646&view=rev Log: [analyzer] AnalysisConsumer: print fully-qualified function name while displaying progress -analyzer-display progress option prints only function names which may

Re: [PATCH] D16804: [analyzer] AnalysisConsumer: print fully-qualified function name while displaying progress

2016-02-03 Thread Yury Gribov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259646: [analyzer] AnalysisConsumer: print fully-qualified function name while… (authored by ygribov). Changed prior to commit: http://reviews.llvm.org/D16804?vs=46640&id=46777#toc Repository: rL LLV

r259647 - Forgot to remove file in previous commit.

2016-02-03 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Wed Feb 3 07:36:31 2016 New Revision: 259647 URL: http://llvm.org/viewvc/llvm-project?rev=259647&view=rev Log: Forgot to remove file in previous commit. Removed: cfe/trunk/test/Analysis/analyze_display_progress.c Removed: cfe/trunk/test/Analysis/analyze_display_progres

r261204 - [analyzer] Add --force-analyze-debug-code option to scan-build

2016-02-18 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Thu Feb 18 05:08:46 2016 New Revision: 261204 URL: http://llvm.org/viewvc/llvm-project?rev=261204&view=rev Log: [analyzer] Add --force-analyze-debug-code option to scan-build to force debug build and hopefully enable more precise warnings. Static Analyzer is much more effici

Re: [PATCH] D17376: dump_ast_matchers.py: fix replacement regexps

2016-02-18 Thread Yury Gribov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261219: [analyzer] dump_ast_matchers.py: fix replacement regexps (authored by ygribov). Changed prior to commit: http://reviews.llvm.org/D17376?vs=48306&id=48316#toc Repository: rL LLVM http://revie

r261219 - [analyzer] dump_ast_matchers.py: fix replacement regexps

2016-02-18 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Thu Feb 18 09:43:56 2016 New Revision: 261219 URL: http://llvm.org/viewvc/llvm-project?rev=261219&view=rev Log: [analyzer] dump_ast_matchers.py: fix replacement regexps Patch by Alex Sidorin! Differential Revision: http://reviews.llvm.org/D17376 Modified: cfe/trunk/doc

Re: [PATCH] D19666: [ubsan] Add -fubsan-strip-path-components=N

2016-05-05 Thread Yury Gribov via cfe-commits
ygribov added a subscriber: ygribov. ygribov added a comment. Can we have generic option for other sanitizers? http://reviews.llvm.org/D19666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

Re: [PATCH] D15888: [Analyzer] Change the default SA checkers for PS4

2016-01-11 Thread Yury Gribov via cfe-commits
ygribov added a subscriber: ygribov. ygribov added a comment. What's the problem with Vfork though? http://reviews.llvm.org/D15888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r257318 - AnalysisConsumer: use canonical decl for both lookup and store of

2016-01-11 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Mon Jan 11 03:38:48 2016 New Revision: 257318 URL: http://llvm.org/viewvc/llvm-project?rev=257318&view=rev Log: AnalysisConsumer: use canonical decl for both lookup and store of visited decls. Due to redeclarations, the function may have different declarations used in CallEx

Re: [PATCH] D15410: AnalysisConsumer: use canonical decl for both lookup and store of visited decls

2016-01-11 Thread Yury Gribov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257318: AnalysisConsumer: use canonical decl for both lookup and store of (authored by ygribov). Changed prior to commit: http://reviews.llvm.org/D15410?vs=43726&id=6#toc Repository: rL LLVM htt

Re: [PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2016-01-25 Thread Yury Gribov via cfe-commits
ygribov added a subscriber: ygribov. Comment at: test/Driver/fsanitize.c:221 @@ +220,3 @@ +// RUN: %clang -target x86_64-apple-darwin10 -resource-dir=%S/Inputs/resource_dir -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN

Re: [PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2016-01-25 Thread Yury Gribov via cfe-commits
ygribov added inline comments. Comment at: test/Driver/fsanitize.c:221 @@ +220,3 @@ +// RUN: %clang -target x86_64-apple-darwin10 -resource-dir=%S/Inputs/resource_dir -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN-DARWI

r259030 - Small refactor in isBeforeInTranslationUnit.

2016-01-28 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Thu Jan 28 03:27:46 2016 New Revision: 259030 URL: http://llvm.org/viewvc/llvm-project?rev=259030&view=rev Log: Small refactor in isBeforeInTranslationUnit. Differential Revision: http://reviews.llvm.org/D15804 Modified: cfe/trunk/lib/Basic/SourceManager.cpp Modified:

r259031 - Fix isBeforeInTranslationUnit to not abort on macros defined in cmdline.

2016-01-28 Thread Yury Gribov via cfe-commits
Author: ygribov Date: Thu Jan 28 03:28:18 2016 New Revision: 259031 URL: http://llvm.org/viewvc/llvm-project?rev=259031&view=rev Log: Fix isBeforeInTranslationUnit to not abort on macros defined in cmdline. Differential Revision: http://reviews.llvm.org/D15804 Modified: cfe/trunk/lib/Basic/S

[PATCH] D14652: [analyzer] Improve modeling of static initializers.

2015-11-13 Thread Yury Gribov via cfe-commits
ygribov created this revision. ygribov added reviewers: zaks.anna, dcoughlin, jordan_rose. ygribov added a subscriber: cfe-commits. Conversions between unrelated pointer types (e.g. char * and void *) involve bitcasts which were not properly modeled in case of static initializers. The patch fixe

Re: [PATCH] D14652: [analyzer] Improve modeling of static initializers.

2015-11-17 Thread Yury Gribov via cfe-commits
ygribov added inline comments. Comment at: test/Analysis/inline.cpp:308 @@ +307,3 @@ +clang_analyzer_eval(0 != void_string); // expected-warning{{TRUE}} +clang_analyzer_eval(0 != ((char *)void_string)[1]); // expected-warning{{TRUE}} + } zaks.anna wrote:

Re: [PATCH] D14652: [analyzer] Improve modeling of static initializers.

2015-11-18 Thread Yury Gribov via cfe-commits
ygribov added inline comments. Comment at: test/Analysis/inline.cpp:308 @@ +307,3 @@ +clang_analyzer_eval(0 != void_string); // expected-warning{{TRUE}} +clang_analyzer_eval(0 != ((char *)void_string)[1]); // expected-warning{{TRUE}} + } zaks.anna wrote: