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] 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 ho

[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 http://

[PATCH] D15434: [libcxx] Export 2 basic_string methods to minimize the effect from internal_linkage switch

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. The switch to internal_linkage attribute removes 3 symbols from the libc++ export table, all in basic_string: insert(..., InputIterato

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 cfe-commits@lists.llv

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 pa

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 lib/

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-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 lib/

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); p

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 incl

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 in

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 include/clang/Drive

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

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 include/clang/Frontend/

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&view=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

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&view=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: cfe/trunk/test/C

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&view=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

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&view=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: cfe/trunk/test/Driver/s

[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 Kin

r280028 - Fix typo in test.

2016-08-29 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Aug 29 18:15:46 2016 New Revision: 280028 URL: http://llvm.org/viewvc/llvm-project?rev=280028&view=rev Log: Fix typo in test. Modified: cfe/trunk/test/Driver/sanitizer-ld.c Modified: cfe/trunk/test/Driver/sanitizer-ld.c URL: http://llvm.org/viewvc/llvm-project/cfe/

r280031 - [cfi] Export __cfi_check when linking with -fsanitize-cfi-cross-dso.

2016-08-29 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Aug 29 18:42:34 2016 New Revision: 280031 URL: http://llvm.org/viewvc/llvm-project?rev=280031&view=rev Log: [cfi] Export __cfi_check when linking with -fsanitize-cfi-cross-dso. Multi-DSO CFI model requires every DSO to export a __cfi_check function. Modified: cfe/tr

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. I would also expect -nodefaultlibs and -nostdlib to remove all standard libraries from the link command line, including the sanitizer ones. I like the idea of -flink-sanitizer-runtime=address, but may be without "address" - the set of sanitizer runtime libraries can be

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&view=rev Repository: rL LLVM http://reviews.llvm.org/D16823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

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 === --- include/f

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 Repos

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 @@ -1564,6

[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&view=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 http://lists.llvm.org/cgi-bin/mailman/l

[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 in

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 http://revie

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 updated this revision to Diff 50379. eugenis marked 2 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D17360 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/cfi-check-fail.c test/CodeGen/cfi-check-fail2.c Index: test/CodeGen/cfi-check-fail2.c

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

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, Options))

[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 flags

[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&view=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).

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] 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 cfe-commits@lists.llvm.

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&view=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 target

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

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-03-31 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: docs/ClassScope.rst:23 @@ +22,3 @@ + + - ``-fdefault-class-scope=attrs`` indicates that the compiler will infer + class scope based on platform-specific attributes that control the class's Maybe call it "default"? A

[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&view=rev Log: Revert "Remove visibility attributes from out-of-class method definitions in iostreams." Modified: libcxx/trunk/include/istream libcxx/trunk/include/ostre

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

2016-01-13 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 44805. eugenis marked 2 inline comments as done. 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/Code

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

2016-01-13 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2654-2678 @@ +2653,27 @@ + for (auto CheckKindMaskPair : CheckKinds) { +int Kind = CheckKindMaskPair.first; +SanitizerMask Mask = CheckKindMaskPair.second; +// All CFI checks are recoverable. +asser

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 test/CodeGen/cfi-ic

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

[PATCH] D16496: [cfi] Do not emit bit set entry for available_externally vtables.

2016-01-22 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. In the Itanium ABI, vtable may be emitted speculatively as an available_externally global. Such vtable may not be present at the link

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&view=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 v

Re: [PATCH] D16496: [cfi] Do not emit bit set entry for available_externally vtables.

2016-01-22 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r258596 Repository: rL LLVM http://reviews.llvm.org/D16496 ___ 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 test/CodeGen/cfi-ic

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 LLVM

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&view=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 d

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 http://lists.llvm.org/cgi-bin/

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&view=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: http://llvm.or

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&view=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

[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] 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 t

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 ar

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 wrot

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 lib/CodeGen/CG

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 te

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] 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, StaticData

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 test/CodeGenC

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&view=rev Log: [cfi] Safe handling of unaddressable vtable pointers (clang). Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the front

r266005 - Allow simultaneous safestack and stackprotector attributes.

2016-04-11 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Apr 11 17:27:55 2016 New Revision: 266005 URL: http://llvm.org/viewvc/llvm-project?rev=266005&view=rev Log: Allow simultaneous safestack and stackprotector attributes. This is the clang part of http://reviews.llvm.org/D18846. SafeStack instrumentation pass adds stack pro

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&view=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

Re: [PATCH] D19170: [safestack] Link SafeStack runtime only when not using separate stack segment

2016-04-15 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Test, please. Where is this runtime support implemented? Some platform's libc, or an external library? http://reviews.llvm.org/D19170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

Re: [PATCH] D19170: [safestack] Link SafeStack runtime only when not using separate stack segment

2016-04-15 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D19170#402939, @mlemay-intel wrote: > In http://reviews.llvm.org/D19170#402861, @eugenis wrote: > > > Test, please. > > > Do you know of any examples of the sort of test that you would like to see > for a feature like this? test/Driver/saniti

Re: [PATCH] D19170: [safestack] Link SafeStack runtime only when not using separate stack segment

2016-04-15 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/D19170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

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

2016-04-21 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Yes, I'd like to try. I think this is blocked on the changes that move visibility attributes to the first declaration, right? Also, re: cfi-commits thread for r255177, it appears that on Mac we can neither hide nor expose existing methods (i.e. if something was hidden, i

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

2016-04-21 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 54562. eugenis added a comment. Updates with Eric's patch from https://gist.github.com/EricWF/487e5b1de2bb320e93fbb3c9c758b013 without the iostream changes. Repository: rL LLVM http://reviews.llvm.org/D15404 Files: include/complex include/experimenta

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

2016-04-21 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. This change does not affect libc++.so on Linux in any way. Repository: rL LLVM http://reviews.llvm.org/D15404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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

2016-04-21 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r267093 Thanks for your help! Repository: rL LLVM http://reviews.llvm.org/D15404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[libcxx] r267093 - Cleanup: move visibility/linkage attributes to the first declaration.

2016-04-21 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Thu Apr 21 20:04:55 2016 New Revision: 267093 URL: http://llvm.org/viewvc/llvm-project?rev=267093&view=rev Log: Cleanup: move visibility/linkage attributes to the first declaration. http://reviews.llvm.org/D15404 Modified: libcxx/trunk/include/complex libcxx/trunk/i

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

2016-09-15 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. Looks great. Thank you for seeing it through! https://reviews.llvm.org/D24642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-19 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/VarBypassDetector.h:50 @@ +49,3 @@ +public: + void Reset(const Stmt *Body); + rename to smth like StartFunction()? add some API documentation. https://reviews.llvm.org/D24693

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-28 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In https://reviews.llvm.org/D24693#553474, @vitalybuka wrote: > My assumption is that "start" makes access valid, and "end" makes access > invalid, up to the next "start". That's also my understanding, but LangRef does not say anything about llvm.lifetime.start cancel

[PATCH] D25453: Add -fno-sanitize-address-use-after-scope flag

2016-10-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 Comment at: lib/Frontend/CompilerInvocation.cpp:739 + UasArg && + UasArg->getOption().matches(OPT_fsanitize_address_use_after_scope); Opts.SSPBufferSize =

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] 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 http://lists.llv

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

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 addr

[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 exc

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 limit

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

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 (a

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&view=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&view=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 sanitize

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&view=rev Log: Fix linking of DFSan + coverage. Broken in r272717 because of no test coverage. Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp cfe/trunk/test/Driver/san

<    1   2   3   4   >