[PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-08 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: kcc, pcc. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Clang-side cross-DSO CFI. * Enabled with -fsanitize-cfi-cross-dso * uses a runtime library, unlike "plain" CFI * does not yet support

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Hi, Have you had a chance to look at this? Repository: rL LLVM http://reviews.llvm.org/D14409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15208: Patch for inline abort code generation

2015-12-08 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. I misunderstood the meaning of -fsanitize-trap, and now I prefer -fsanitize-merge-traps for the flag name. Repository: rL LLVM http://reviews.llvm.org/D15208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D15246: [Docs] Update MSan docs

2015-12-04 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. This revision is now accepted and ready to land. Comment at: docs/MemorySanitizer.rst:109 @@ -107,3 +108,3 @@ MemorySanitizer can track origins of unitialized values, similar to Valgrind's --track-origins option. This feature is enabled by

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D14409#306272, @EricWF wrote: > Does the `inline` keyword have any effect when it's on function definitions > that are externally instantiated? I could not detect any difference in behavior with or without inline keyword. Remove it?

[PATCH] D15395: Add 3 more missing inline/visibility attributes

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. These are the cases when an out-of-class definition of a method is marked _LIBCPP_INLINE_VISIBILITY, but the in-class

Re: [PATCH] D15395: Add 3 more missing inline/visibility attributes

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r255166 Repository: rL LLVM http://reviews.llvm.org/D15395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15395: Add 3 more missing inline/visibility attributes

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Should be fine. Repository: rL LLVM http://reviews.llvm.org/D15395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r255177 Thanks for the review! Repository: rL LLVM http://reviews.llvm.org/D14409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxxabi] r255186 - Replace cmake check for printf with a check for fopen.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Dec 9 18:44:42 2015 New Revision: 255186 URL: http://llvm.org/viewvc/llvm-project?rev=255186=rev Log: Replace cmake check for printf with a check for fopen. Printf is a builtin, and the check fails with -Werror because of a clang warning about an incompatible

Re: [PATCH] D14411: Use __attribute__((internal_linkage)) when available.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a dependency: D12502: [libcxx] Better constain tuples constructors -- Fix PR23256 and PR22806. eugenis added a comment. Note, this breaks tuple_cat.pass.cpp test. With -O0, replacing always_inline with internal_linkage results in less optimization being done (namely, no inlining

[PATCH] D15404: Cleanup: move visibility/linkage attributes to the first declaration (part 2).

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. This is a follow-up to r252385. For some reason, I missed a lot of cases when the visibility attribute was applied to the

Re: [PATCH] D14411: Use __attribute__((internal_linkage)) when available.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a dependency: D15404: Cleanup: move visibility/linkage attributes to the first declaration (part 2).. eugenis added a comment. This change depends on http://reviews.llvm.org/D15404. Repository: rL LLVM http://reviews.llvm.org/D14411

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D14409#306379, @eugenis wrote: > In http://reviews.llvm.org/D14409#306272, @EricWF wrote: > > > Does the `inline` keyword have any effect when it's on function definitions > > that are externally instantiated? > > > I could not detect any

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D14409#306531, @eugenis wrote: > In http://reviews.llvm.org/D14409#306379, @eugenis wrote: > > > In http://reviews.llvm.org/D14409#306272, @EricWF wrote: > > > > > Does the `inline` keyword have any effect when it's on function > > >

[libcxx] r255177 - Remove visibility attributes from out-of-class method definitions in iostreams.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Dec 9 17:42:30 2015 New Revision: 255177 URL: http://llvm.org/viewvc/llvm-project?rev=255177=rev Log: Remove visibility attributes from out-of-class method definitions in iostreams. No point in pretending that these methods are hidden - they are actually exported from

Re: [PATCH] D14411: Use __attribute__((internal_linkage)) when available.

2015-12-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D14411#306722, @EricWF wrote: > In http://reviews.llvm.org/D14411#306716, @EricWF wrote: > > > Why does this depend on http://reviews.llvm.org/D15404? > > > Woops, I meant the tuple patch but I see the other comment now. I'm curious > as to

[PATCH] D15433: [libcxx] Remove inline/visibility attributes from exported template methods in valarray.

2015-12-10 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added a reviewer: EricWF. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. This does not affect the libc++ export list now. It is required for internal_linkage switch to not affect the libc++ export list. This

Re: [PATCH] D14411: Use __attribute__((internal_linkage)) when available.

2015-12-10 Thread Evgeniy Stepanov via cfe-commits
eugenis added dependencies: D15433: [libcxx] Remove inline/visibility attributes from exported template methods in valarray., D15432: [libcxx] Move member function definition before it's explicit template instantiation declaration in to satisfy GCC.. eugenis added a comment. Depends on

r255827 - Fix CFI tests in sanitizer-ld.

2015-12-16 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Dec 16 16:03:39 2015 New Revision: 255827 URL: http://llvm.org/viewvc/llvm-project?rev=255827=rev Log: Fix CFI tests in sanitizer-ld. This test is not testing what it is supposed to test because of a mixup with the CHECK lines. Modified:

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-14 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. added some docs Comment at: lib/CodeGen/CodeGenModule.cpp:1041 @@ -988,3 +1040,3 @@ void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { assert(!GV->isDeclaration() && "Only globals with definition can force usage.");

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-14 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 42806. eugenis marked 2 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D15367 Files: docs/ControlFlowIntegrity.rst docs/ControlFlowIntegrityDesign.rst include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-11 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 42607. eugenis marked an inline comment as done. Repository: rL LLVM http://reviews.llvm.org/D15367 Files: include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGClass.cpp

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-11 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2558 @@ +2557,3 @@ + false)); + llvm::MDString *MDS = dyn_cast(MD); + llvm::Constant *TypeId = pcc wrote: > What happens if `MD` is not an `MDString`? assert + check on the caller side

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 42914. eugenis marked 10 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D15367 Files: docs/ControlFlowIntegrity.rst docs/ControlFlowIntegrityDesign.rst docs/UsersManual.rst include/clang/Driver/Options.td

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: docs/ControlFlowIntegrityDesign.rst:389 @@ +388,3 @@ + - Calls between different instrumented DSOs are also protected with + performance penalty compared to the monolithic CFI. + - Calls from instrumented DSO to an uninstrumented

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
eugenis marked an inline comment as done. eugenis added a comment. Repository: rL LLVM http://reviews.llvm.org/D15367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r255712 - Relax checks in cfi-cross-dso test.

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Dec 15 17:49:51 2015 New Revision: 255712 URL: http://llvm.org/viewvc/llvm-project?rev=255712=rev Log: Relax checks in cfi-cross-dso test. The test is failing with unnamed labels. Modified: cfe/trunk/test/CodeGenCXX/cfi-cross-dso.cpp Modified:

r255736 - [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Dec 15 18:38:42 2015 New Revision: 255736 URL: http://llvm.org/viewvc/llvm-project?rev=255736=rev Log: [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes). Split the CFI runtime in two: cfi and cfi_diag. The latter includes UBSan runtime to

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 42918. Repository: rL LLVM http://reviews.llvm.org/D15367 Files: docs/ControlFlowIntegrity.rst docs/ControlFlowIntegrityDesign.rst docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h

r255694 - Cross-DSO control flow integrity (Clang part).

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Dec 15 17:00:20 2015 New Revision: 255694 URL: http://llvm.org/viewvc/llvm-project?rev=255694=rev Log: Cross-DSO control flow integrity (Clang part). Clang-side cross-DSO CFI. * Adds a command line flag -f[no-]sanitize-cfi-cross-dso. * Links a runtime library when

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r255694 Repository: rL LLVM http://reviews.llvm.org/D15367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14411: Use __attribute__((internal_linkage)) when available.

2015-12-10 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. With http://reviews.llvm.org/D15434, there is no difference in libc++ export list with the switch to internal_linkage. Repository: rL LLVM http://reviews.llvm.org/D14411 ___ cfe-commits mailing list

Re: [PATCH] D15433: [libcxx] Remove inline/visibility attributes from exported template methods in valarray.

2015-12-10 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Libc++.so does not instantiate valarray for any other types, so this does not add any extra exports. Definitions valarray members (with types other than size_t) will now be exported from user code. This looks like a positive change to me: - these methods are already

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-14 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 42782. eugenis marked 3 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D15367 Files: include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGClass.cpp

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-14 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:3871 @@ +3870,3 @@ +isa(MD) && dyn_cast(MD)->isDistinct(); +if (CGM.getCodeGenOpts().SanitizeCfiCrossDso && !hasLocalScope) { + EmitCfiSlowPathCheck(BitSetTest, MD, CastedCallee);

Re: [PATCH] D15367: Cross-DSO control flow integrity (Clang part)

2015-12-15 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 42902. eugenis added a comment. added the new flag to UserManual Repository: rL LLVM http://reviews.llvm.org/D15367 Files: docs/ControlFlowIntegrity.rst docs/ControlFlowIntegrityDesign.rst docs/UsersManual.rst include/clang/Driver/Options.td

[libcxx] r257193 - Revert "Remove visibility attributes from out-of-class method definitions in iostreams."

2016-01-08 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Jan 8 13:21:02 2016 New Revision: 257193 URL: http://llvm.org/viewvc/llvm-project?rev=257193=rev Log: Revert "Remove visibility attributes from out-of-class method definitions in iostreams." Modified: libcxx/trunk/include/istream libcxx/trunk/include/ostream

[PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2015-12-21 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: pcc, kcc. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. - Runtime diagnostic data for cfi-icall changed to match the rest of cfi checks - Layout of all CFI diagnostic data changed to put

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-11-30 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. ping Repository: rL LLVM http://reviews.llvm.org/D14409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14858: Support building tsan on android.

2015-11-20 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. I vaguely recall that android runtime loader had some symbol lookup differencies with glibc and that prevented interceptors (when statically linked into the main executable) from working. Maybe it is not the case now. http://reviews.llvm.org/D14858

Re: [PATCH] D14858: Support building tsan on android.

2015-11-20 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D14858#293651, @danalbert wrote: > I assume we're going to actually want to go the other direction on this and > build a shared library for Android's TSAN (see eugenis' comment on >

Re: [PATCH] D14858: Support building tsan on android.

2015-11-20 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. OK, it sounds like static runtime would work fine. We would still need a way to switch to the shared runtime for the apps (the workflow when we LD_PRELOAD the runtime into the Zygote to run instrumented apps on a non-instrumented device). Something like -shared-libasan

Re: [PATCH] D19854: Define Contiki OS toolchain

2016-06-10 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D19854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21054: CodeGen: Update Clang to use the new type metadata.

2016-06-09 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. eugenis added a reviewer: eugenis. eugenis added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D21054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D19854: Define Contiki OS toolchain

2016-06-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. This needs a driver test. http://reviews.llvm.org/D19854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21317: [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-14 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. ubsan_standalone (that's what the needsUbsanRt change is for). Repository: rL LLVM http://reviews.llvm.org/D21317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21317: [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-14 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D21317#457784, @kcc wrote: > Can you at least add a compiler-rt test where we ensure that this flag can > not be used such that it wil compile but fail to link? > > E.g. > > clang -fsanitize-coverage=edge x.c > > should compile *and* link

Re: [PATCH] D20561: Warn when taking address of packed member

2016-06-13 Thread Evgeniy Stepanov via cfe-commits
eugenis added a subscriber: eugenis. eugenis added a comment. In http://reviews.llvm.org/D20561#446031, @aaron.ballman wrote: > In http://reviews.llvm.org/D20561#445824, @rogfer01 wrote: > > > I think I wasn't clear with the purpose of the fix-it: there are a few > > cases where getting the

Re: [PATCH] D21317: [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-13 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. For the context, this is supposed to fix this problem: https://bugs.chromium.org/p/chromium/issues/detail?id=618534 Of course there are other ways of dealing with that that do not require changing the compiler, but this change seems like the right thing to do. The

[PATCH] D21317: [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-13 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: pcc, kcc. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. The reason is that this (a) seems to work just fine and (b) is useful when building stuff with sanitizer+coverage, but needing to

Re: [PATCH] D21317: [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-14 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 60759. eugenis added a comment. + docs Repository: rL LLVM http://reviews.llvm.org/D21317 Files: docs/SanitizerCoverage.rst lib/Driver/SanitizerArgs.cpp test/Driver/fsanitize-coverage.c Index: test/Driver/fsanitize-coverage.c

r272717 - [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-14 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Jun 14 16:33:40 2016 New Revision: 272717 URL: http://llvm.org/viewvc/llvm-project?rev=272717=rev Log: [sanitizer] Allow sanitize coverage w/o sanitizers. The reason is that this (a) seems to work just fine and (b) useful when building stuff with sanitizer+coverage,

r272735 - Fix sanitizer coverage support in the win32 driver.

2016-06-14 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Jun 14 18:21:19 2016 New Revision: 272735 URL: http://llvm.org/viewvc/llvm-project?rev=272735=rev Log: Fix sanitizer coverage support in the win32 driver. --dependent-lib arguments for the sanitizer libraries must be emitted when coverage is enabled w/o any sanitizers.

Re: [PATCH] D21122: CodeGen: Start emitting checked loads when both trapping CFI and -fwhole-program-vtables are enabled.

2016-06-17 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D21122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r272853 - Fix linking of DFSan + coverage.

2016-06-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Jun 15 18:05:21 2016 New Revision: 272853 URL: http://llvm.org/viewvc/llvm-project?rev=272853=rev Log: Fix linking of DFSan + coverage. Broken in r272717 because of no test coverage. Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp

r272856 - Fix sanitizer-ld test.

2016-06-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Jun 15 18:29:26 2016 New Revision: 272856 URL: http://llvm.org/viewvc/llvm-project?rev=272856=rev Log: Fix sanitizer-ld test. Modified: cfe/trunk/test/Driver/sanitizer-ld.c Modified: cfe/trunk/test/Driver/sanitizer-ld.c URL:

Re: [PATCH] D20561: Warn when taking address of packed member

2016-06-16 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. This timeval thing looks like a legitimate warning to me. I don't think the analysis should go beyond the function boundaries. If a callee expects timeval * as part of its signature it should get a properly aligned timeval *. http://reviews.llvm.org/D20561

Re: [PATCH] D21317: [sanitizer] Allow sanitize coverage w/o sanitizers.

2016-06-17 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r272717 Repository: rL LLVM http://reviews.llvm.org/D21317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r260441 - Fix invalid casts in .

2016-02-10 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Feb 10 15:53:28 2016 New Revision: 260441 URL: http://llvm.org/viewvc/llvm-project?rev=260441=rev Log: Fix invalid casts in . static_cast of a pointer to object before the start of the object's lifetime has undefined behavior. This code triggers CFI warnings. This

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-10 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. Thanks for the review! Committed as r260441. Repository: rL LLVM http://reviews.llvm.org/D16738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-08 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D16738#345696, @EricWF wrote: > I prefer using the `(void*)` casts when possible. In particular when doing > the pointer comparisons. Could you change those back to `void*` casts then > use the `__as_base` function for the rest? done

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-08 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 47271. Repository: rL LLVM http://reviews.llvm.org/D16738 Files: include/__config include/functional Index: include/functional === --- include/functional +++ include/functional @@

r258997 - Strengthen cfi-check-fail test.

2016-01-27 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Jan 27 16:28:56 2016 New Revision: 258997 URL: http://llvm.org/viewvc/llvm-project?rev=258997=rev Log: Strengthen cfi-check-fail test. r258993 allows stricter testing for basic block labels by making sure that they are always followed by ":". Use this to improve the

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-01 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D16738#340175, @EricWF wrote: > > This also could be fixed in a different way by replacing C-style > > > casts with reinterpret_cast<>, which, from my reading of the > > > standard, is allowed in this context. > > > I agree that using `void*`

[PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: pcc, kcc. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend does an additional check of

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2494 @@ +2493,3 @@ + llvm::Value *ValidVtable = nullptr; + if (CheckAndAppendValidVtable) { +llvm::Value *AllVtables = llvm::MetadataAsValue::get( samsonov wrote: > This is really ugly. Why

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2494 @@ +2493,3 @@ + llvm::Value *ValidVtable = nullptr; + if (CheckAndAppendValidVtable) { +llvm::Value *AllVtables = llvm::MetadataAsValue::get( pcc wrote: > eugenis wrote: > > samsonov

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46718. eugenis added a comment. Moved bitset.text call outside. LLVM is smart enough to sink it along the cold branch, so performance should not suffer. Repository: rL LLVM http://reviews.llvm.org/D16823 Files: lib/CodeGen/CGClass.cpp

[PATCH] D16738: Fix invalid casts in .

2016-01-29 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added subscribers: cfe-commits, pcc. eugenis set the repository for this revision to rL LLVM. static_cast of a pointer to object before the start of the object's lifetime has undefined behavior (c++14 p3.8) This

Re: [PATCH] D16738: Fix invalid casts in .

2016-01-29 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. http://clang.llvm.org/docs/ControlFlowIntegrity.html Basically it says that the cast to __base is done on a memory that does not contain an object of type __base (based on the vptr value). Repository: rL LLVM http://reviews.llvm.org/D16738

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. http://llvm.org/viewvc/llvm-project?rev=259716=rev Repository: rL LLVM http://reviews.llvm.org/D16823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r259716 - [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Feb 3 16:18:55 2016 New Revision: 259716 URL: http://llvm.org/viewvc/llvm-project?rev=259716=rev Log: [cfi] Safe handling of unaddressable vtable pointers (clang). Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46857. eugenis added a comment. How about this? Repository: rL LLVM http://reviews.llvm.org/D16738 Files: include/__config include/functional Index: include/functional === ---

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGClass.cpp:2608 @@ -2607,3 +2607,3 @@ auto TypeId = CGM.CreateCfiIdForTypeMetadata(MD); if (CGM.getCodeGenOpts().SanitizeCfiCrossDso && TypeId) { EmitCfiSlowPathCheck(M, BitSetTest, TypeId, CastedVTable,

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46807. Repository: rL LLVM http://reviews.llvm.org/D16823 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/cfi-check-fail.c test/CodeGenCXX/cfi-cast.cpp

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46723. eugenis marked an inline comment as done. Repository: rL LLVM http://reviews.llvm.org/D16823 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/cfi-check-fail.c

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:4053 @@ +4052,3 @@ + + if (!CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFIVCall) || + !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFINVCall) || I don't like emitting all these bitset

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2642 @@ +2641,3 @@ + llvm::MDString::get(CGM.getLLVMContext(), "all-vtables")); + llvm::Value *ValidVtable = Builder.CreateZExt( + Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::bitset_test),

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-02-25 Thread Evgeniy Stepanov via cfe-commits
eugenis updated the summary for this revision. eugenis updated this revision to Diff 49115. eugenis added a comment. OK, done. Please take another look. This is inferior to the original patch in terms of functionality, but the implementation is a lot simpler. Repository: rL LLVM

Re: [PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-19 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 45292. Repository: rL LLVM http://reviews.llvm.org/D15699 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/CodeGenModule.cpp lib/Driver/Tools.cpp test/CodeGen/cfi-check-fail.c

Re: [PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-22 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. ping Repository: rL LLVM http://reviews.llvm.org/D15699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-25 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 45920. Repository: rL LLVM http://reviews.llvm.org/D15699 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/CodeGenModule.cpp lib/Driver/Tools.cpp test/CodeGen/cfi-check-fail.c

Re: [PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-25 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: test/CodeGen/cfi-check-fail.c:18 @@ +17,3 @@ +// CHECK: [[TRAP]] +// CHECK-NEXT: call void @llvm.trap() +// CHECK-NEXT: unreachable Right. It fails. I've removed the ":" after all label names. Repository: rL

r258745 - [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-25 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Jan 25 17:34:52 2016 New Revision: 258745 URL: http://llvm.org/viewvc/llvm-project?rev=258745=rev Log: [cfi] Cross-DSO CFI diagnostic mode (clang part) * Runtime diagnostic data for cfi-icall changed to match the rest of cfi checks * Layout of all CFI diagnostic data

Re: [PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-25 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. Thanks! Committed as http://reviews.llvm.org/rL258745 Repository: rL LLVM http://reviews.llvm.org/D15699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r258749 - Fix use of constexpr std::pair that's not in C++11.

2016-01-25 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Jan 25 17:45:37 2016 New Revision: 258749 URL: http://llvm.org/viewvc/llvm-project?rev=258749=rev Log: Fix use of constexpr std::pair that's not in C++11. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp URL:

r258596 - [cfi] Do not emit bit set entry for available_externally vtables.

2016-01-22 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Jan 22 19:20:18 2016 New Revision: 258596 URL: http://llvm.org/viewvc/llvm-project?rev=258596=rev Log: [cfi] Do not emit bit set entry for available_externally vtables. In the Itanium ABI, vtable may be emitted speculatively as an available_externally global. Such

[PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-02-17 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: pcc, krasin. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. In the cross-DSO CFI mode a module may be asked to handle any type of CFI error, even if the module itself is not checked for that

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-02-18 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. This lets us support the following case: module A checks vcalls and casts, with diagnostics module B checks vcalls but not casts (but it still has bitsets for vtables), with diagnostics then a cast check from module A with a target in module B should print diagnostics

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-03-10 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. ping Repository: rL LLVM http://reviews.llvm.org/D17360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-03-10 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r263180, thanks for the review! Repository: rL LLVM http://reviews.llvm.org/D17360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-03-15 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. No, this is not committed. I've run dcommit in the wrong checkout and landed http://reviews.llvm.org/D17900 instead. Repository: rL LLVM http://reviews.llvm.org/D17360 ___ cfe-commits mailing list

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-03-15 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. r263578, finally Repository: rL LLVM http://reviews.llvm.org/D17360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r263578 - [cfi] Don't emit checks for disabled CFI kinds.

2016-03-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Mar 15 15:19:29 2016 New Revision: 263578 URL: http://llvm.org/viewvc/llvm-project?rev=263578=rev Log: [cfi] Don't emit checks for disabled CFI kinds. In the cross-DSO CFI mode clang emits __cfi_check_fail that handles errors triggered from other modules with targets in

[PATCH] D18107: Disable CFI checks in std::addressof.

2016-03-11 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added a reviewer: EricWF. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. std::addressof may be used on a storage of an object before the start of its lifetime (see std::allocate_shared for example). CFI

[libcxx] r263310 - Disable CFI checks in std::addressof.

2016-03-11 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Mar 11 17:50:57 2016 New Revision: 263310 URL: http://llvm.org/viewvc/llvm-project?rev=263310=rev Log: Disable CFI checks in std::addressof. std::addressof may be used on a storage of an object before the start of its lifetime (see std::allocate_shared for example). CFI

Re: [PATCH] D18107: Disable CFI checks in std::addressof.

2016-03-11 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r263310 Thanks! Repository: rL LLVM http://reviews.llvm.org/D18107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16538: [cc1as] Add MCTargetOptions argument to createAsmBackend

2016-03-11 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: tools/driver/cc1as_main.cpp:413-416 @@ -412,6 +414,6 @@ // FIXME: init MCTargetOptions from sanitizer flags here. MCTargetOptions Options; std::unique_ptr TAP( TheTarget->createMCAsmParser(*STI, *Parser, *MCII,

r266095 - Stricter checks in the stack-protector codegen test.

2016-04-12 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Apr 12 12:51:59 2016 New Revision: 266095 URL: http://llvm.org/viewvc/llvm-project?rev=266095=rev Log: Stricter checks in the stack-protector codegen test. Modified: cfe/trunk/test/CodeGen/stack-protector.c Modified: cfe/trunk/test/CodeGen/stack-protector.c URL:

<    1   2   3   >