[PATCH] D69569: isBuiltinFunc() uses StringRef instead of const char*

2019-10-29 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Fix LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69569/new/ https://reviews.llvm.org/D69569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D41569: [Concepts] Constraint enforcement and diagnostics

2019-10-28 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. I noticed in Decl.cpp your change deleted some whitespace that belonged there. Not a big deal, just try to remember to run clang-format-diff when you're submitting for review. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-03-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; timpugh wrote: > connorkuehl wrote: > > pcc wrote: > > > I don't think we can use `default_random_

[PATCH] D59034: Delete x86_64 ShadowCallStack support

2019-03-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCRT355624: Delete x86_64 ShadowCallStack support (authored by vlad.tsyrklevich, committed by ). Changed prior to commit: https://reviews.llvm.org/D59034?vs=189750&id=189756#toc Repository: rCRT Compil

[PATCH] D59034: Delete x86_64 ShadowCallStack support

2019-03-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 189750. vlad.tsyrklevich added a comment. - Keep x86_64 doc link Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59034/new/ https://reviews.llvm.org/D59034 Files: clang/docs/ShadowCallStack.rst comp

[PATCH] D59034: Delete x86_64 ShadowCallStack support

2019-03-06 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added a reviewer: pcc. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, jdoerfert, hiraditya, javed.absar, mgorny. Herald added projects: clang, Sanitizers, LLVM. ShadowCallStack on x86_64 suffered from the same racy securit

[PATCH] D56818: TLS: Respect visibility for thread_local variables on Darwin (PR40327)

2019-01-17 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC351457: TLS: Respect visibility for thread_local variables on Darwin (PR40327) (authored by vlad.tsyrklevich, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://rev

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-14 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. In https://reviews.llvm.org/D51905#1234308, @zhaomo wrote: > In https://reviews.llvm.org/D51905#1231383, @vlad.tsyrklevich wrote: > > > This change causes all compiler-rt cfi tests to be UNSUPPORTED for me > > locally, do you have any idea why that might be? The

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-11 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. This change causes all compiler-rt cfi tests to be UNSUPPORTED for me locally, do you have any idea why that might be? The lit changes don't make it immediately clear. Comment at: clang/lib/CodeGen/CGVTables.cpp:1055 +// When vtable inter

[PATCH] D50724: SafeStack: Disable Darwin support

2018-08-14 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339720: SafeStack: Disable Darwin support (authored by vlad.tsyrklevich, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50724 Files: cfe/trunk

[PATCH] D50724: SafeStack: Disable Darwin support

2018-08-14 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. In https://reviews.llvm.org/D50724#1199345, @kubamracek wrote: > Doesn't this need any tests to be updated? Otherwise, LGTM. There were no Darwin-specific safestack driver tests. I ran check-clang just to make sure and it passes. Repository: rC Clang http

[PATCH] D50724: SafeStack: Disable Darwin support

2018-08-14 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added reviewers: pcc, kubamracek. Herald added a subscriber: cfe-commits. Darwin support does not appear to be used as evidenced by the fact that the runtime has never supported non-trivial programs. Repository: rC Clang https://reviews

[PATCH] D50372: Introduce the VTable interleaving scheme to the CFI design documentation

2018-08-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: clang/docs/ControlFlowIntegrityDesign.rst:283 +At the same time, it is also more efficient in terms of performance because in the interleaved virtual +table address points are consecutive, thus the validity check of a virtual

[PATCH] D50163: [AST] Remove the static_assert check in ObjCMethodDecl::ObjCMethodDecl

2018-08-01 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC338648: [AST] Remove the static_assert check in ObjCMethodDecl::ObjCMethodDecl (authored by vlad.tsyrklevich, committed by

[PATCH] D47567: Implement CFI for indirect calls via a member function pointer.

2018-06-25 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich accepted this revision. vlad.tsyrklevich added a comment. This revision is now accepted and ready to land. I think it would be clearer to replace uses of 'member function pointer' with 'pointer to member function'; however, a google search shows that the usage of both terms is b

[PATCH] D34156: [LTO] Enable module summary emission by default for regular LTO

2018-06-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Herald added a subscriber: steven_wu. Hi Tobias, I tracked down the failure self-hosting LLVM with LTO with this revision to https://bugs.llvm.org/show_bug.cgi?id=37684#c2 and have a fix under review in https://reviews.llvm.org/D47898. This revision needs to be

[PATCH] D47726: [Analyzer][Z3] Test fixes for Z3 constraint manager

2018-06-05 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334067: [Analyzer][Z3] Test fixes for Z3 constraint manager (authored by vlad.tsyrklevich, committed by ). Changed prior to commit: https://reviews.llvm.org/D47726?vs=149786&id=150076#toc Repository:

[PATCH] D47726: [Analyzer][Z3] Test fixes for Z3 constraint manager

2018-06-05 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334067: [Analyzer][Z3] Test fixes for Z3 constraint manager (authored by vlad.tsyrklevich, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47726

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-05 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334065: [Analyzer] Fix Z3ConstraintManager crash (PR37646) (authored by vlad.tsyrklevich, committed by ). Changed prior to commit: https://reviews.llvm.org/D47617?vs=149796&id=150074#toc Repository:

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-04 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 149796. vlad.tsyrklevich added a comment. - Merge test with apsint.c and move to z3/apsint.c Repository: rC Clang https://reviews.llvm.org/D47617 Files: lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp test/Analysis/apsint.c test/Analysis/z

[PATCH] D47726: [Analyzer][Z3] Test fixes for Z3 constraint manager

2018-06-04 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added reviewers: george.karpenkov, NoQ, ddcc. Herald added subscribers: cfe-commits, a.sidorin, zzheng, szepet, xazax.hun. Since Z3 tests have been not been running [1] some tests needed to be updated. I also added a regression test for [1].

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-04 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. In https://reviews.llvm.org/D47617#1119268, @NoQ wrote: > Also does this test need to be z3-specific? We would also not like to crash > here without z3. I originally did that so I could specify enabling and testing the z3 backend; however, looking at the test

[PATCH] D47617: [Analyzer] Fix Z3 crash (PR37646)

2018-05-31 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added reviewers: george.karpenkov, NoQ, ddcc. Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. Fix another Z3ConstraintManager crash, use fixAPSInt() to extend a boolean APSInt. Repository: rC Clang https://reviews.l

[PATCH] D47603: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. In https://reviews.llvm.org/D47603#1118106, @george.karpenkov wrote: > Would it be possible to add tests? I know we have very few unit tests, but I > assume you could actually use an integration test to exercise this path? I tested this change and it fixes PR3

[PATCH] D45611: [analyzer] Fix filename in cross-file HTML report

2018-04-18 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich accepted this revision. vlad.tsyrklevich added a comment. This revision is now accepted and ready to land. This LGTM, but 1) you should add a test, probably just need to another CHECK to test/Coverage/html-multifile-diagnostics.c from https://reviews.llvm.org/D30406, and 2) some

[PATCH] D45455: [CFI] Disable CFI checks for __cxa_decrement_exception_refcount

2018-04-09 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329629: [CFI] Disable CFI checks for __cxa_decrement_exception_refcount (authored by vlad.tsyrklevich, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm

[PATCH] D45455: [CFI] Disable CFI checks for __cxa_decrement_exception_refcount

2018-04-09 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXXA329629: [CFI] Disable CFI checks for __cxa_decrement_exception_refcount (authored by vlad.tsyrklevich, committed by ). Changed prior to commit: https://reviews.llvm.org/D45455?vs=141733&id=141752#to

[PATCH] D45455: [CFI] Disable CFI checks for __cxa_decrement_exception_refcount

2018-04-09 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. Herald added subscribers: cfe-commits, christof. exception_header->exceptionDestructor is a void(*)(void*) function pointer; however, it can point to destructors like std:: exception::~exception that don't match that type signature. Repository: rCXXA lib

[PATCH] D45357: [XRay][llvm+clang] Consolidate attribute list files

2018-04-06 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich accepted this revision. vlad.tsyrklevich added inline comments. This revision is now accepted and ready to land. Comment at: llvm/docs/XRayExample.rst:196 +``-fxray-attr-list=`` flag to clang. You can have multiple files, each defining +different sets of attribut

[PATCH] D45239: AArch64: Implement support for the shadowcallstack attribute.

2018-04-04 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich accepted this revision. vlad.tsyrklevich added inline comments. This revision is now accepted and ready to land. Comment at: clang/docs/ShadowCallStack.rst:12 ShadowCallStack is an **experimental** instrumentation pass, currently only implemented for x86_64, th

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-04-03 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329122: Add the -fsanitize=shadow-call-stack flag (authored by vlad.tsyrklevich, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44801 Files: c

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-04-03 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 140868. vlad.tsyrklevich added a comment. - Small test, doc updates Repository: rC Clang https://reviews.llvm.org/D44801 Files: docs/ShadowCallStack.rst docs/index.rst include/clang/Basic/Sanitizers.def lib/CodeGen/CGDeclCXX.cpp lib/Co

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-28 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: docs/ShadowCallStack.rst:14 +buffer overflows. It works by saving a function's return address to a +separately allocated 'shadow call stack' in the function prolog and checking the +return address on the stack against the shado

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-23 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 139652. vlad.tsyrklevich marked 6 inline comments as done. vlad.tsyrklevich added a comment. - Address Kostya's documentation feedback Repository: rC Clang https://reviews.llvm.org/D44801 Files: docs/ShadowCallStack.rst docs/index.rst incl

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-22 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 139554. vlad.tsyrklevich added a comment. - Add Driver tests Repository: rC Clang https://reviews.llvm.org/D44801 Files: docs/ShadowCallStack.rst docs/index.rst include/clang/Basic/Sanitizers.def lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/C

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-22 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added a reviewer: pcc. Herald added a subscriber: cfe-commits. Add support for the -fsanitize=shadow-call-stack flag which causes clang to add ShadowCallStack attribute to functions compiled with that flag enabled. Repository: rC Clang

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-25 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314171: Allow specifying sanitizers in blacklists (authored by vlad.tsyrklevich). Repository: rL LLVM https://reviews.llvm.org/D37925 Files: cfe/trunk/docs/ControlFlowIntegrity.rst cfe/trunk/docs/

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-21 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/AST/Decl.cpp:3953 ReasonToReject = 5; // is standard layout. - else if (Blacklist.isBlacklistedLocation(getLocation(), "field-padding")) + else if (Blacklist.isBlacklistedLocation(ASanMask, getLocation(), +

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-21 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 116213. vlad.tsyrklevich marked 5 inline comments as done. vlad.tsyrklevich added a comment. - sanitizerCompile -> createSanitizerSections - ASanMask -> AsanMask and fix another bug relating to ANDing with LangOpts.Sanitize.Mask https://reviews.llv

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-19 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich marked an inline comment as done. vlad.tsyrklevich added inline comments. Comment at: docs/SanitizerSpecialCaseList.rst:57 + +Sections are regular expressions written in square brackets that denote which +sanitizer the following entries apply to. For example, ``[

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-19 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115849. vlad.tsyrklevich added a comment. - Refactor to make compile() not virtual again - Refactor a confusing use of ASanMask into individual uses of SanitizerKind::{Address,KernelAddress} - 'Sections' -> 'Section names' https://reviews.llvm.org/

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-18 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115751. vlad.tsyrklevich added a comment. Update for SectionsMap refactor in LLVM https://reviews.llvm.org/D37925 Files: docs/ControlFlowIntegrity.rst docs/SanitizerSpecialCaseList.rst include/clang/Basic/SanitizerBlacklist.h include/clang/

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-18 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115703. vlad.tsyrklevich added a comment. Update documentation to mention sections in the blacklist documentation and in the CFI documentation (where it's most useful) https://reviews.llvm.org/D37925 Files: docs/ControlFlowIntegrity.rst docs/S

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115528. vlad.tsyrklevich added a comment. Address @eugenis' comments https://reviews.llvm.org/D37925 Files: include/clang/Basic/SanitizerBlacklist.h include/clang/Basic/SanitizerSpecialCaseList.h lib/AST/Decl.cpp lib/Basic/CMakeLists.txt

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:33 + + bool inSection(SanitizerMask Mask, StringRef Prefix, StringRef Query, + StringRef Category = StringRef()) const; eugenis wrote: > Please add

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115509. vlad.tsyrklevich added a comment. Run clang-format. https://reviews.llvm.org/D37925 Files: include/clang/Basic/SanitizerBlacklist.h include/clang/Basic/SanitizerSpecialCaseList.h lib/AST/Decl.cpp lib/Basic/CMakeLists.txt lib/Basic

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Not included in this change: - Updating the sanitizer documentation to use section headers. It's worth doing for the CFI documentation to let people know they can break down blacklist entries by CFI mode, but is it worth pushing users to specify '[address]', '

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. Herald added a subscriber: mgorny. This is the follow-up patch to https://reviews.llvm.org/D37924. This change refactors clang to use the the newly added section headers in SpecialCaseList to specify which sanitizers blacklists entries should apply to, like

[PATCH] D32842: Specify which sanitizers are covered by a sanitizer blacklist

2017-09-12 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. @vsk Why don't I take a look at implementing the blacklist selection methods @eugenis mentioned on top of this change now so that we can skip ahead and merge something everyone is satisfied with? https://reviews.llvm.org/D32842 _

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-04 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310097: CFI: blacklist STL allocate() from unrelated-casts (authored by vlad.tsyrklevich). Repository: rL LLVM https://reviews.llvm.org/D36294 Files: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp cfe/

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich marked an inline comment as done. vlad.tsyrklevich added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:789 +auto *MD = dyn_cast_or_null(D); +if (MD && MD->getName().equals("allocate") && MD->getNumParams() == 2) { + auto *BT = MD->para

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 109668. vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added a comment. Address pcc's comments https://reviews.llvm.org/D36294 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGen/cfi-unrelated-cast.cpp Index: test/CodeGen

[PATCH] D36013: Fix logic for generating llvm.type.test()s

2017-07-28 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 108702. vlad.tsyrklevich marked 2 inline comments as done. https://reviews.llvm.org/D36013 Files: lib/CodeGen/CGClass.cpp test/CodeGenCXX/cfi-vcall-no-trap.cpp Index: test/CodeGenCXX/cfi-vcall-no-trap.cpp ===

[PATCH] D36013: Fix logic for generating llvm.type.test()s

2017-07-28 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. `CodeGenFunction::EmitTypeMetadataCodeForVCall()` could output an `llvm.assume(llvm.type.test())`when CFI was enabled, optimizing out the vcall check. This case was only reached when: 1) CFI-vcall was enabled, 2) -fwhole-program-tables was specified, and

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-06-16 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Please commit on my behalf. https://reviews.llvm.org/D30406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-06-16 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 102838. vlad.tsyrklevich marked an inline comment as done. vlad.tsyrklevich added a comment. After reviewing this patch again last night I: 1. Updated some "%clang_cc1 -analyze" calls with "%clang_analyze_cc1" due to 2cfd901321423a96edd8513afc7c7c2

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-06-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 102765. vlad.tsyrklevich added a comment. Herald added a subscriber: xazax.hun. Updates to cleanly rebase on a recent clang master. Ran all tests with ASan to ensure I avoided a broken build post-merge as with https://reviews.llvm.org/D30909 http

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 98905. vlad.tsyrklevich added a comment. Some stylistic & comment updates. https://reviews.llvm.org/D30909 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h li

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Core/ProgramState.cpp:656-659 + // If the SVal is a LazyCompoundVal it might only cover sub-region of a given + // symbol. For example, the LCV might represent a field in an uninitialized + // struct. In th

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-11 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Core/ProgramState.cpp:656-659 + // If the SVal is a LazyCompoundVal it might only cover sub-region of a given + // symbol. For example, the LCV might represent a field in an uninitialized + // struct. In th

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-11 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 98726. vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added a comment. Minor updates & some clarification on the feedback https://reviews.llvm.org/D30909 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-09 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 98390. vlad.tsyrklevich marked 3 inline comments as done. vlad.tsyrklevich added a comment. Herald added a subscriber: xazax.hun. - Update the logic to move the LCV symbol logic into ProgramState::addTaint(SVal) out of the GenericTaintChecker. This a

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-04-10 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:494 + SymbolManager &SM = C.getSymbolManager(); + return SM.getDerivedSymbol(Sym, LCV.getRegion()); } NoQ

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-03-26 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:494 + SymbolManager &SM = C.getSymbolManager(); + return SM.getDerivedSymbol(Sym, LCV.getRegion()); } NoQ wrote: > I'd think about this a bit more and come

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-03-26 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 93091. vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added a comment. Respond to Artem's comments. https://reviews.llvm.org/D30909 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h include/clang/StaticA

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-03-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 91615. vlad.tsyrklevich added a comment. Fix a stray assert(), correctly this time.. https://reviews.llvm.org/D30909 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h include/clang/StaticAnalyzer/Core/PathSensitive/TaintMana

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-03-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 91614. vlad.tsyrklevich added a comment. Fix a stray assert() https://reviews.llvm.org/D30909 Files: lib/StaticAnalyzer/Core/ProgramState.cpp Index: lib/StaticAnalyzer/Core/ProgramState.cpp ==

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-03-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. This is the second part of https://reviews.llvm.org/D28445, it extends taint propagation to cases where the tainted region is a sub-region and we can't taint a conjured symbol entirely. This required adding a new map in the GDM that maps tainted parent sy

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-03-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. In https://reviews.llvm.org/D28445#694906, @zaks.anna wrote: > @vlad.tsyrklevich, > > Do you have commit access or should we commit on your behalf? You should commit on my behalf. https://reviews.llvm.org/D28445

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-03-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:455 + // Otherwise, return a nullptr as there's not yet a functional way to taint + // sub-regions of LCVs. + return nullptr; NoQ wrote: > I'm not sure if i

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-03-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 90868. vlad.tsyrklevich added a comment. Updated with the documentation update from @NoQ https://reviews.llvm.org/D28445 Files: include/clang/StaticAnalyzer/Core/PathSensitive/Store.h lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp lib/St

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-03-02 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:211 + + if (I + 1 != E) { +os << "getHashValue() Is there a cleaner way to do these two comparisons? https://reviews.llvm.org/D30406

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-03-02 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 90417. vlad.tsyrklevich edited the summary of this revision. vlad.tsyrklevich added a comment. Updated the formatting to make the file split more obvious (padding/line break height) and added simple navigation across files, example here: https://raw

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-02-27 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Here's an example 3 file report from the Linux source: https://cdn.rawgit.com/vlad902/73bd32181151f2f0b07fa501a0f0b627/raw/0106f09cdb0d045b757de3d71ddc58072d33/report2.html It's not as immediately clear this is a multi-file output. Ideas to improve this cou

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-02-27 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. While looking at checker output with https://reviews.llvm.org/D30289 applied I realized I was missing results. After some digging I found that it's because the Linux kernel makes heavy use of inlined functions included in header files, and the resulting d

[PATCH] D30289: [Analyzer] Add bug visitor for taint checker

2017-02-23 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 89497. vlad.tsyrklevich marked 2 inline comments as done. vlad.tsyrklevich added a comment. Fixes and a test for Artem's suggestions. https://reviews.llvm.org/D30289 Files: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp test/Analysis/taint

[PATCH] D30289: [Analyzer] Add bug visitor for taint checker

2017-02-23 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. Add a bug visitor to the taint checker to make it easy to distinguish where the tainted value originated. This is especially useful when the original taint source is obscured by complex data flow. https://reviews.llvm.org/D30289 Files: lib/StaticAnaly

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-22 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 89467. vlad.tsyrklevich added a comment. @NoQ I've tried to address all the issues you mentioned in this change. Let me know if the expanded documentation doesn't address what you were looking for. https://reviews.llvm.org/D28445 Files: include/

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:502 +RegionBindingsRef B = getRegionBindings(S); +const MemRegion *MR = L.getRegion()->getBaseRegion(); +if (Optional V = B.getDefaultBinding(MR)) vlad.tsyrkl

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 88493. vlad.tsyrklevich added a comment. Remove an unnecessary call to `getBaseRegion()`, remove the logic to create a new SymbolDerived as it's currently unused, and add a comment to reflect that `getLCVSymbol()` is called in a PostStmt and a defau

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:442 + +const RecordDecl *RD = RT->getDecl()->getDefinition(); +for (const auto *I : RD->fields()) { a.sidorin wrote: > vlad.tsyrklevich wrote: > > a.si

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-08 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:442 + +const RecordDecl *RD = RT->getDecl()->getDefinition(); +for (const auto *I : RD->fields()) { a.sidorin wrote: > NoQ wrote: > > We need to be car

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-06 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 87237. vlad.tsyrklevich marked 4 inline comments as done. vlad.tsyrklevich added a comment. As Artem mentioned, I reworked `getLCVSymbol()` to get the default bindings directly from the StoreManager which required adding a new method. I also reverte

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-01-26 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Hello @NoQ, I just wanted to ping you on the updated change since I'm not sure if you saw it. https://reviews.llvm.org/D28445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D28765: CStringChecker can crash when uninitialized checks are disabled

2017-01-19 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich abandoned this revision. vlad.tsyrklevich added a comment. The motivation was to make resulting output easier to navigate and to cut the result size by ~90%, one default run against the FreeBSD kernel takes 3 gigs of storage and I'm running several builds a day as I iterate on c

[PATCH] D28765: CStringChecker can crash when uninitialized checks are disabled

2017-01-16 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added reviewers: cfe-commits, zaks.anna, dcoughlin, NoQ. CStringChecker assumes that SVals are not undefined at two points with comments stating that other checkers will check for that condition first; however, it can crash if a user choos

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-01-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 84517. vlad.tsyrklevich added a comment. Artem, thank you for the very detailed reply! Between this, and hitting the right search terms to find your clang analyzer guide my understanding of the symbol abstractions the analyzer exposes has improved s

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-01-10 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:443 + if (auto LCV = Val.getAs()) +return C.getSymbolManager().getRegionValueSymbol(LCV->getRegion()); + zaks.anna wrote: > This might create a new symbol

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-01-07 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added reviewers: zaks.anna, cfe-commits. While extending the GenericTaintChecker for my purposes I'm hitting a case where taint is not propagated where I believe it should be. Currently, the following example will propagate taint correctly