[PATCH] D124493: [symbolizer] Parse DW_TAG_variable DIs to show line info for globals

2022-04-27 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Hi @hctim, thanks for the patch. I have one question, though. Do you really need to remove the information you removed? Some people might be testing ASan binaries without access to debug info (because it's been stripped or it's not been loaded and is not available for th

Re: [PATCH] D63194: [clangd] Link and initialize target infos

2020-04-14 Thread Filipe Cabecinhas via cfe-commits
have access to. > The premerge-tests also seems to be succeeding, please see > https://results.llvm-merge-guard.org/BETA_amd64_debian_testing_clang8-626/console-log.txt > . > > Can you provide more info about how you've ran the test? > > On Fri, Apr 10, 2020 at 4:23 PM F

Re: [PATCH] D63194: [clangd] Link and initialize target infos

2020-04-10 Thread Filipe Cabecinhas via cfe-commits
Hi Kadir, Can you fix the target_info.test clangd test you committed in this revision, please? I see you've tried fixing it later by adding `REQUIRES: x86-registered-target`, but now it's never running because that feature isn't (ever) set. Here's a buildbot run showing it as unsupported (x86 targ

[PATCH] D67985: CFI: wrong type passed to llvm.type.test with multiple inheritance devirtualization

2019-10-07 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added subscribers: pcc, filcab. filcab added a comment. It seems there's a FIXME anticipating this problem. @pcc: Can you double-check, please? Thank you, Filipe Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67985/new/ https://reviews.llvm

[PATCH] D32950: Support C++1z features in `__has_extension`

2018-12-03 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Hi Eric, I know this is old, but are you interested in reviving this patch? I don't know enough about clang's extensions to LGTM such a patch (updated for the current code), but would really like to have a way to know if extensions are supported. We just now had people a

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-11-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Sorry to ressurect this review, but I have a few questions: - What kind of functions fail? - Are there bugzillas to track these? - How can a compiler expect to have blacklists for "all" its CFI clients? (I'm ok with having a default for "most-used, well-known, problematic

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-11-02 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Thanks for the review. Unfortunately, I forgot to edit the commit message. Let's hope no one gets too confused (phab reviews will be up anyway, so should be easy to figure out). Filipe Repository: rL LLVM https://reviews.llvm.org/D52615

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-11-02 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346001: Change -fsanitize-address-poison-class-member-array-new-cookie to -fsanitize… (authored by filcab, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-11-02 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346001: Change -fsanitize-address-poison-class-member-array-new-cookie to -fsanitize… (authored by filcab, committed by ). Changed prior to commit: https://reviews.llvm.org/D52615?vs=172376&id=172392#t

r346001 - Change -fsanitize-address-poison-class-member-array-new-cookie to -fsanitize-address-poison-custom-array-cookie

2018-11-02 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Fri Nov 2 10:29:04 2018 New Revision: 346001 URL: http://llvm.org/viewvc/llvm-project?rev=346001&view=rev Log: Change -fsanitize-address-poison-class-member-array-new-cookie to -fsanitize-address-poison-custom-array-cookie Handle it in the driver and propagate it to cc1 Re

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-11-02 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 172376. filcab added a comment. Reworded with feedback from the review. Repository: rC Clang https://reviews.llvm.org/D52615 Files: docs/ClangCommandLineReference.rst docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Driver/Saniti

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-11-01 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 172179. filcab added a comment. Expand yet a bit more. Repository: rC Clang https://reviews.llvm.org/D52615 Files: docs/ClangCommandLineReference.rst docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h inclu

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-11-01 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 172149. filcab added a comment. Expanded a bit more on the documentation, mentioning that user code might be technically allowed to access those array cookies, but that users might not want to allow it. Repository: rC Clang https://reviews.llvm.org/D5261

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-30 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D52615#1278000, @rjmccall wrote: > So, three points: > > - That's not class-member-specific; you can have a placement `operator new[]` > at global scope that isn't the special `void*` placement operator and > therefore still has a cookie, and

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-30 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 171661. filcab added a comment. Missed the change in some places Repository: rC Clang https://reviews.llvm.org/D52615 Files: docs/ClangCommandLineReference.rst docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-30 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 171660. filcab added a comment. Update with name change, using rjmccall's suggestion Repository: rC Clang https://reviews.llvm.org/D52615 Files: include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h include/clang/Frontend/CodeGenOptio

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-26 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D52615#1276938, @rjmccall wrote: > In https://reviews.llvm.org/D52615#1275946, @filcab wrote: > > > In https://reviews.llvm.org/D52615#1272725, @rjmccall wrote: > > > > > In https://reviews.llvm.org/D52615#1266320, @filcab wrote: > > > > > > > I

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-25 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D52615#1272725, @rjmccall wrote: > In https://reviews.llvm.org/D52615#1266320, @filcab wrote: > > > In https://reviews.llvm.org/D52615#1254567, @rsmith wrote: > > > > > This seems like an unreasonably long flag name. Can you try to find a > > >

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-23 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Ping! Thank you, Filipe Repository: rC Clang https://reviews.llvm.org/D52615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-16 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D52615#1254567, @rsmith wrote: > This seems like an unreasonably long flag name. Can you try to find a shorter > name for it? `-fsanitize-poison-extra-operator-new`? Not as explicit, but maybe ok if documented? Thank you, Filipe Repository

Re: [PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-10-10 Thread Filipe Cabecinhas via cfe-commits
LGTM on the clang side too. Thank you, Filipe On Wed, 10 Oct 2018 at 23:33, Richard Smith - zygoloid via Phabricator < revi...@reviews.llvm.org> wrote: > rsmith accepted this revision. > rsmith added a comment. > This revision is now accepted and ready to land. > > This looks good to me. Sounds

[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-10-10 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. LGTM on the clang side too. Thank you, Filipe Repository: rC Clang https://reviews.llvm.org/D50901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-10-08 Thread Filipe Cabecinhas via cfe-commits
Sorry about that. I’m away today but I don’t think you’ve answered my questions about “why not support standalone UBSan in tests”. Sorry if I missed the answers if you did. Will review the latest tomorrow. Thank you, Filipe On Mon, 8 Oct 2018 at 07:48, Roman Lebedev via Phabricator < revi...@rev

[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-10-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a subscriber: aizatsky. filcab added a comment. Sorry about that. I’m away today but I don’t think you’ve answered my questions about “why not support standalone UBSan in tests”. Sorry if I missed the answers if you did. Will review the latest tomorrow. Thank you, Filipe Repository

[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-09-27 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:305 enum ImplicitConversionCheckKind : unsigned char { -ICCK_IntegerTruncation = 0, +ICCK_IntegerTruncation = 0, // Legacy, no longer used. +ICCK_UnsignedIntegerTruncation = 1,

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-09-27 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab created this revision. filcab added reviewers: rjmccall, kcc, rsmith. Repository: rC Clang https://reviews.llvm.org/D52615 Files: include/clang/Driver/SanitizerArgs.h lib/Driver/SanitizerArgs.cpp test/Driver/fsanitize.c Index: test/Driver/fsanitize.c

r338553 - Use a dummy target so the test passes when default target is for a toolchain implements useIntegratedAs() -> true

2018-08-01 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Wed Aug 1 06:41:42 2018 New Revision: 338553 URL: http://llvm.org/viewvc/llvm-project?rev=338553&view=rev Log: Use a dummy target so the test passes when default target is for a toolchain implements useIntegratedAs() -> true Modified: cfe/trunk/test/Driver/integrated-as

r338552 - Add REQUIRES: native to a test that assumes it

2018-08-01 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Wed Aug 1 06:41:11 2018 New Revision: 338552 URL: http://llvm.org/viewvc/llvm-project?rev=338552&view=rev Log: Add REQUIRES: native to a test that assumes it Modified: cfe/trunk/test/Driver/darwin-infer-simulator-sdkroot.c Modified: cfe/trunk/test/Driver/darwin-infer-si

r335858 - Fix test that was failing on Windows due to too many backslashes

2018-06-28 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Thu Jun 28 07:16:13 2018 New Revision: 335858 URL: http://llvm.org/viewvc/llvm-project?rev=335858&view=rev Log: Fix test that was failing on Windows due to too many backslashes Modified: cfe/trunk/test/Driver/linux-per-target-runtime-dir.c Modified: cfe/trunk/test/Driver

[PATCH] D47375: [Driver] Add flag "--dependent-lib=..." when enabling asan or ubsan on PS4.

2018-06-06 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. I have a minor nit + what Paul mentioned (missing a `-NOT` check). Otherwise LGTM. Comment at: lib/Driver/ToolChains/Clang.cpp:3690 - // Add runtime flag for PS4 when PGO or Coverage are enabled. - if (RawTriple.isPS4CPU()) + // Add runtime flag fo

[PATCH] D47291: Proposal to make rtti errors more generic.

2018-05-25 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6729 def err_no_dynamic_cast_with_fno_rtti : Error< - "cannot use dynamic_cast with -fno-rtti">; + "use of dynamic_cast requires enabling RTTI">; I'd prefer to have the way

[PATCH] D46836: Fix some rtti-options tests

2018-05-15 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab accepted this revision. filcab added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/Driver/rtti-options.cpp:13 // RUN: %clang -### -c -fno-rtti -frtti %s 2>&1 | FileCheck -check-prefix=CHECK-RTTI %s -// RUN: %clang -### -c -frtti -fno

[PATCH] D43013: ASan+operator new[]: Fix operator new[] cookie poisoning

2018-02-12 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324884: ASan+operator new[]: Add an option for more thorough operator new[] cookie… (authored by filcab, committed by ). Changed prior to commit: https://reviews.llvm.org/D43013?vs=133389&id=133830#toc

r324884 - ASan+operator new[]: Add an option for more thorough operator new[] cookie poisoning

2018-02-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Feb 12 03:49:02 2018 New Revision: 324884 URL: http://llvm.org/viewvc/llvm-project?rev=324884&view=rev Log: ASan+operator new[]: Add an option for more thorough operator new[] cookie poisoning Summary: Right now clang is skipping array cookie poisoning for any operator n

[PATCH] D43013: ASan+operator new[]: Fix operator new[] cookie poisoning

2018-02-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 133389. filcab added a comment. Update commit message. Repository: rC Clang https://reviews.llvm.org/D43013 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/ItaniumCXXABI.cpp lib/Frontend/CompilerInvocat

[PATCH] D43013: ASan+operator new[]: Fix operator new[] cookie poisoning

2018-02-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D43013#1001006, @rjmccall wrote: > I don't understand why your description of this patch mentions the void* > placement new[] operator. There's no cookie to poison for that operator. Hah, sorry. In writing this commit log I used parts of the

[PATCH] D43013: ASan+operator new[]: Fix operator new[] cookie poisoning

2018-02-07 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab created this revision. filcab added reviewers: rjmccall, kcc, rsmith. The C++ Itanium ABI says: No cookie is required if the new operator being used is ::operator new[](size_t, void*). This commit adds a flag to tell clang to poison all operator new[] cookies. A previous review was poiso

r321647 - Revert "ASan+operator new[]: Fix operator new[] cookie poisoning"

2018-01-02 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Tue Jan 2 05:46:12 2018 New Revision: 321647 URL: http://llvm.org/viewvc/llvm-project?rev=321647&view=rev Log: Revert "ASan+operator new[]: Fix operator new[] cookie poisoning" This reverts r321645. I missed a compiler-rt test that needs updating. Modified: cfe/trunk/l

r321645 - ASan+operator new[]: Fix operator new[] cookie poisoning

2018-01-02 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Tue Jan 2 05:21:50 2018 New Revision: 321645 URL: http://llvm.org/viewvc/llvm-project?rev=321645&view=rev Log: ASan+operator new[]: Fix operator new[] cookie poisoning Summary: The C++ Itanium ABI says: No cookie is required if the new operator being used is ::operator new[

[PATCH] D41301: ASan+operator new[]: Fix operator new[] cookie poisoning

2018-01-02 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321645: ASan+operator new[]: Fix operator new[] cookie poisoning (authored by filcab, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41301 Files: cfe/trunk/lib/CodeGen/ItaniumCXXABI.c

[PATCH] D41301: ASan+operator new[]: Fix operator new[] cookie poisoning

2017-12-15 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab created this revision. filcab added reviewers: rjmccall, kcc, rsmith. The C++ Itanium ABI says: No cookie is required if the new operator being used is ::operator new[](size_t, void*). We should only avoid poisoning the cookie if we're calling this operator, not others. This is dealt with

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1733 // The PS4 uses C++11 as the default C++ standard. - if (T.isPS4()) -LangStd = LangStandard::lang_gnucxx11; - else -LangStd = LangStandard::lang_gnucxx98; +

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1733 // The PS4 uses C++11 as the default C++ standard. - if (T.isPS4()) -LangStd = LangStandard::lang_gnucxx11; - else -LangStd = LangStandard::lang_gnucxx98; +

[PATCH] D38354: Fix test by using -target instead of cc1 arguments (c-index-test goes through the driver)

2017-10-17 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Ping! https://reviews.llvm.org/D38354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r314524 - Fix Modules/{builtin-import.mm, umbrella-header-include-builtin.mm} to be able to handle non-Darwin targets

2017-09-29 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Fri Sep 29 08:45:34 2017 New Revision: 314524 URL: http://llvm.org/viewvc/llvm-project?rev=314524&view=rev Log: Fix Modules/{builtin-import.mm,umbrella-header-include-builtin.mm} to be able to handle non-Darwin targets Summary: Also makes them pass on Darwin, if the default

[PATCH] D38364: Fix Modules/builtin-import.mm to be able to handle non-Darwin targets

2017-09-29 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314524: Fix Modules/{builtin-import.mm,umbrella-header-include-builtin.mm} to be able… (authored by filcab). Repository: rL LLVM https://reviews.llvm.org/D38364 Files: cfe/trunk/test/Modules/builti

[PATCH] D38364: Fix Modules/builtin-import.mm to be able to handle non-Darwin targets

2017-09-28 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab updated this revision to Diff 117002. filcab added a comment. Add umbrella-header-include-builtin.mm too https://reviews.llvm.org/D38364 Files: test/Modules/builtin-import.mm test/Modules/umbrella-header-include-builtin.mm Index: test/Modules/umbrella-header-include-builtin.mm

[PATCH] D38364: Fix Modules/builtin-import.mm to be able to handle non-Darwin targets

2017-09-28 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab created this revision. Also makes it pass on Darwin, if the default target triple is a Linux triple. https://reviews.llvm.org/D38364 Files: test/Modules/builtin-import.mm Index: test/Modules/builtin-import.mm === --- tes

[PATCH] D38354: Fix test by using -target instead of cc1 arguments (c-index-test goes through the driver)

2017-09-28 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab created this revision. If LLVM_DEFAULT_TARGET_TRIPLE is a non-darwin triple, the file might fail. This might allow us to take out the FIXME and REQUIRES lines, but I'd rather let the bots double-check that the test is ok first. https://reviews.llvm.org/D38354 Files: test/Index/pch-from

[PATCH] D32047: [Driver] Add support for default UBSan blacklists

2017-07-19 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Should we simply not have `ubsan_blacklist.txt` if it's empty? Otherwise LGTM https://reviews.llvm.org/D32047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-26 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D34299#788427, @vsk wrote: > I hope I've cleared this up, but: we need to store the source location > constant _somewhere_, before we emit the return value check. That's because > we can't infer which return location to use at compile time.

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D34299#788152, @vsk wrote: > The source locations aren't constants. The ubsan runtime uses a bit inside of > source location structures as a flag. When an issue is diagnosed at a > particular source location, that bit is atomically set. This i

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Splitting the attrloc from the useloc might make sense since we would be able to emit attrloc just once. But I don't see why we need to store/load those pointers in runtime instead of just caching the `Constant*` in `CodeGenFunction`. I'd also like to have some asserts a

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-05-18 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:3854 + const Twine &Name) { + Value *GEPVal = Builder.CreateInBoundsGEP(Ptr, IdxList, Name); + You're creating the GEP first (possibly triggering

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Missing a `sanitizer-ld.c` test for freebsd. Comment at: include/clang/Basic/Attr.td:1849 + GNU<"no_sanitize_memory">, + GNU<"no_sanitize_tbaa">]; let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag, ---

[PATCH] D30762: [ubsan] Add a nullability sanitizer

2017-03-09 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Please make the tests tighter using `CHECK-NEXT` when possible. Much easier if later anyone needs to debug differences in IR. Comment at: docs/UndefinedBehaviorSanitizer.rst:102 + violating nullability rules does not result in undefined behavior, it

[PATCH] D30423: [ubsan] Detect UB loads from bitfields

2017-03-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. LGTM since my issue is only an issue on ObjC platforms and it seems those are the semantics it should have there. Comment at: test/CodeGenObjC/ubsan-bool.m:26 + // OBJC: [[ICMP:%.*]] = icmp ule i8 [[ASHR]], 1, !nosanitize + // OBJC: call void @__ubsa

[PATCH] D30729: [ubsan] Skip range checks for width-limited values

2017-03-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: test/CodeGenCXX/ubsan-bitfields.cpp:39 + // CHECK-NOT: !nosanitize + return s->e3; +} Add checks/check-nots to make sure the thing you don't want isn't emitted, not just `!nosanitize` The checks help document what you'

[PATCH] D30423: [ubsan] Detect UB loads from bitfields

2017-03-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: test/CodeGenObjC/ubsan-bool.m:26 + // OBJC: [[ICMP:%.*]] = icmp ule i8 [[ASHR]], 1, !nosanitize + // OBJC: call void @__ubsan_handle_load_invalid_value + jroelofs wrote: > vsk wrote: > > jroelofs wrote: > > > vsk wrote

[PATCH] D30285: [ubsan] Don't check alignment if the alignment is 1

2017-02-23 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab accepted this revision. filcab added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D30285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-09 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Minor nits, now. LGTM, but having someone more familiar with clang chime in would be great. Comment at: lib/CodeGen/CGExprScalar.cpp:1700 case LangOptions::SOB_Trapping: +if (getUnwidenedIntegerType(CGF.getContext(), E->getSubExpr()).hasValue()) +

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-03 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Why the switch to `if` instead of a fully-covered switch/case? In https://reviews.llvm.org/D29369#664426, @vsk wrote: > In https://reviews.llvm.org/D29369#664366, @regehr wrote: > > > Out of curiosity, how many of these superfluous checks are not subsequently > > elimina

Re: r293343 - [ubsan] Sanity-check shift amounts before truncation (fixes PR27271)

2017-01-30 Thread Filipe Cabecinhas via cfe-commits
Another example + possible fix (two WidthMinusOne, one per (possibly different) bitwidth): (not fully tested) int f() { return 0 << 0L; } diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 40d949dece..5c9055d49a 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/Cod

[PATCH] D28242: [ubsan] Minimize size of data for type_mismatch (Redo of D19667)

2017-01-06 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291236: [ubsan] Minimize size of data for type_mismatch (Redo of D19667) (authored by filcab). Changed prior to commit: https://reviews.llvm.org/D28242?vs=82913&id=83362#toc Repository: rL LLVM http

r291236 - [ubsan] Minimize size of data for type_mismatch (Redo of D19667)

2017-01-06 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Fri Jan 6 08:40:12 2017 New Revision: 291236 URL: http://llvm.org/viewvc/llvm-project?rev=291236&view=rev Log: [ubsan] Minimize size of data for type_mismatch (Redo of D19667) Summary: This patch makes the type_mismatch static data 7 bytes smaller (and it ends up being 16 by

[PATCH] D28242: [ubsan] Minimize size of data for type_mismatch (Redo of D19667)

2017-01-06 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab accepted this revision. filcab added a reviewer: filcab. filcab added a comment. This revision is now accepted and ready to land. Since Richard has already LGTMed the previous version, and this is a trivial change, I'll go ahead with committing. https://reviews.llvm.org/D28242 ___

[PATCH] D19667: [ubsan] Minimize size of data for type_mismatch

2016-12-15 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab abandoned this revision. filcab added a comment. I will post a new patch, using the features from https://reviews.llvm.org/rL289444. https://reviews.llvm.org/D19667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Thanks Vedant! Andrew: does Android not support C++11? I don't understand why it wouldn't have these funcions. Thank you, Filipe On Mon, 12 Dec 2016 at 18:58, Vedant Kumar wrote: > > > > On Dec 12, 2016, at 10:17 AM, Andrew Ford via Phabricator < > revi...@reviews.llvm.org> wrote: > > > > > >

r289446 - [Fix] Add missing include from r289444.

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Dec 12 10:43:40 2016 New Revision: 289446 URL: http://llvm.org/viewvc/llvm-project?rev=289446&view=rev Log: [Fix] Add missing include from r289444. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp URL: http://llvm.org/viewvc/llvm

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289444: [clang] Version support for UBSan handlers (authored by filcab). Changed prior to commit: https://reviews.llvm.org/D21695?vs=61817&id=81089#toc Repository: rL LLVM https://reviews.llvm.org/D

r289444 - [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Dec 12 10:18:40 2016 New Revision: 289444 URL: http://llvm.org/viewvc/llvm-project?rev=289444&view=rev Log: [clang] Version support for UBSan handlers This adds a way for us to version any UBSan handler by itself. The patch overrides D21289 for a better implementation (we

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-11-29 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Ping! https://reviews.llvm.org/D21695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-04 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D25199#560061, @vsk wrote: > My question was about whether it's possible to resume normal program > execution after printing the stack trace from the segv handler. I had assumed > this is not possible, and (mistakenly) thought that you were su

Re: [PATCH] D24628: [ASAN] Pass previous stack information through __sanitizer_finish_switch_fiber

2016-09-16 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. Please add some printf calls to the test, to show that you have the correct stack+size, too. Thanks for working on this. Filipe Comment at: lib/asan/asan_thread.cc:141 @@ -140,3 +140,3 @@ if (!fake_stack_save && current_fake_stack) current_fake_

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

2016-09-08 Thread Filipe Cabecinhas via cfe-commits
It seems some people on this thread (I'm sorry if everyone is taking this into account, but it seemed to me that this was going unnoticed, I want to make sure everyone is on the same page) is only talking about linking (or not) the sanitizer runtimes. But that's not the only thing. Depending on th

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

2016-08-30 Thread Filipe Cabecinhas via cfe-commits
Haha, the joke is on me. I had the opposite opinion two years ago (I guess by virtue of working on the sanitizers for a while, I've come to see them as default libs?). Making the behavior more consistent is good, and the r218541 discussion (+220455) makes me think your patch is good. We end up hav

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

2016-08-30 Thread Filipe Cabecinhas via cfe-commits
I don't think so. "No default libs" should mean "no default libs", not "some default libs". Maybe you're using an alternate sanitizer lib or something, hence usage of that flag. Thank you, Filipe On Tuesday, 30 August 2016, Chris Bieneman via cfe-commits < cfe-commits@lists.llvm.org> wrote: >

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-08-17 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D21695#514080, @vsk wrote: > Running sanitized programs in production sounds strange to me. But, if there > isn't really a cost to supporting this, I suppose it's fine. It does, and most likely this change wouldn't affect them, as I would gue

Re: [PATCH] D23498: Left shifts of negative values are defined if -fwrapv is set

2016-08-16 Thread Filipe Cabecinhas via cfe-commits
LGTM. Thank you, Filipe On Tue, Aug 16, 2016 at 10:23 AM, Davide Italiano wrote: > davide added a comment. > > The `Sema` bits look fine to me. I'll let Filipe comment on the sanitizer > part. > > > https://reviews.llvm.org/D23498 > > > ___ cfe-comm

Re: [PATCH] D23498: Left shifts of negative values are defined if -fwrapv is set

2016-08-15 Thread Filipe Cabecinhas via cfe-commits
filcab added a subscriber: filcab. Comment at: test/CodeGen/wrapv-lshr-sanitize.c:1 @@ +1,2 @@ +// RUN: %clang_cc1 -fsanitize=shift-base -emit-llvm %s -o - -triple x86_64-linux-gnu -fwrapv | opt -instnamer -S | FileCheck %s + Do you really need `instnamer`?

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-08-12 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D21695#510788, @vsk wrote: > After reading through the discussion in https://reviews.llvm.org/D19668, I > don't think I understood the pros/cons of using a single ABI check (like asan > does) versus adding version numbers to each handler routi

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-08-09 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. Ping! https://reviews.llvm.org/D21695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-19 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. Thanks a lot for working on this! Filipe https://reviews.llvm.org/D22463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!

2016-07-18 Thread Filipe Cabecinhas via cfe-commits
filcab added a subscriber: filcab. filcab added a comment. What about branches? I'm guessing we should expect the usual release branches. But will any person be able to create a branch? Will there be a policy, if this is the case? Is the policy enforceable? Comment at: docs/Pr

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-07-12 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. Ping! http://reviews.llvm.org/D21695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21289: [ubsan] Version names of handlers

2016-06-24 Thread Filipe Cabecinhas via cfe-commits
filcab abandoned this revision. filcab added a comment. Replaced by http://reviews.llvm.org/D21695 http://reviews.llvm.org/D21289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-06-24 Thread Filipe Cabecinhas via cfe-commits
filcab created this revision. filcab added reviewers: kcc, samsonov, rsmith. filcab added a subscriber: cfe-commits. This adds a way for us to version any UBSan handler by itself. The patch overrides D21289 for a better implementation (we're able to rev up a single handler). After this, then we c

[PATCH] D21289: [ubsan] Version names of handlers

2016-06-13 Thread Filipe Cabecinhas via cfe-commits
filcab created this revision. filcab added reviewers: kcc, samsonov, rsmith. filcab added a subscriber: cfe-commits. This patch introduces a simple way to bump of all the handlers in UBSan. This way, we can easily break backwards compatibility without it being confusing for users (a bit like the A

Re: r269765 - Revert "[X86] Add immediate range checks for many of the builtins."

2016-05-18 Thread Filipe Cabecinhas via cfe-commits
its wrote: > > > On Tue, May 17, 2016 at 7:07 AM, Filipe Cabecinhas via cfe-commits > wrote: >> >> Author: filcab >> Date: Tue May 17 09:07:43 2016 >> New Revision: 269765 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=269765&view=rev >&

r269765 - Revert "[X86] Add immediate range checks for many of the builtins."

2016-05-17 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Tue May 17 09:07:43 2016 New Revision: 269765 URL: http://llvm.org/viewvc/llvm-project?rev=269765&view=rev Log: Revert "[X86] Add immediate range checks for many of the builtins." This reverts commit r269619. Modified: cfe/trunk/lib/Sema/SemaChecking.cpp cfe/trunk/te

Re: [PATCH] D19667: [ubsan] Minimize size of data for type_mismatch

2016-05-16 Thread Filipe Cabecinhas via cfe-commits
filcab updated this revision to Diff 57350. filcab added a comment. Added a version field. http://reviews.llvm.org/D19667 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/catch-undef-behavior.c Index: test/CodeGen/catch-undef-behavior.c ===

Re: [PATCH] D19667: [ubsan] Minimize size of data for type_mismatch

2016-05-16 Thread Filipe Cabecinhas via cfe-commits
filcab updated this revision to Diff 57342. filcab added a comment. Minor update which never sets an AlignVal to 0. http://reviews.llvm.org/D19667 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/catch-undef-behavior.c Index: test/CodeGen/catch-undef-behavior.c ==

Re: [PATCH] D19667: [ubsan] Minimize size of data for type_mismatch

2016-05-13 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. Hi Richard. Just want to double-check something. If we have no alignment value, for this check, can we assume 1? It seems to me that that shouldn't be a problem, but wanted to double-check. Comment at: lib/CodeGen/CGExpr.cpp:579 @@ -578,1 +578,3 @@ +

Re: r269309 - [ubsan] Add -fsanitize-undefined-strip-path-components=N

2016-05-13 Thread Filipe Cabecinhas via cfe-commits
> On 13 May 2016, at 07:03, Sean Silva wrote: > > > > On Thu, May 12, 2016 at 9:51 AM, Filipe Cabecinhas via cfe-commits > wrote: > Author: filcab > Date: Thu May 12 11:51:36 2016 > New Revision: 269309 > > URL: http://llvm.org/viewvc/llvm-project?rev=269

r269309 - [ubsan] Add -fsanitize-undefined-strip-path-components=N

2016-05-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Thu May 12 11:51:36 2016 New Revision: 269309 URL: http://llvm.org/viewvc/llvm-project?rev=269309&view=rev Log: [ubsan] Add -fsanitize-undefined-strip-path-components=N Summary: This option allows the user to control how much of the file name is emitted by UBSan. Tuning this

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

2016-05-12 Thread Filipe Cabecinhas via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269309: [ubsan] Add -fsanitize-undefined-strip-path-components=N (authored by filcab). Changed prior to commit: http://reviews.llvm.org/D19666?vs=56396&id=57063#toc Repository: rL LLVM http://review

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

2016-05-06 Thread Filipe Cabecinhas via cfe-commits
filcab updated this revision to Diff 56396. filcab added a comment. Address Richard's comments. Final Windows fixes (force a Linux target so our mangled label matches). http://reviews.llvm.org/D19666 Files: docs/UndefinedBehaviorSanitizer.rst include/clang/Driver/Options.td include/clang/

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

2016-05-06 Thread Filipe Cabecinhas via cfe-commits
filcab added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2385-2386 @@ +2384,4 @@ +FilenameString = FilenameString.substr(I - E); + else +FilenameString = llvm::sys::path::filename(FilenameString); +} else if (PathComponentsToStrip > 0) { --

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

2016-05-05 Thread Filipe Cabecinhas via cfe-commits
filcab updated this revision to Diff 56289. filcab added a comment. Improve Windows support http://reviews.llvm.org/D19666 Files: docs/UndefinedBehaviorSanitizer.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGExpr.cpp lib/Driver/Tools.cpp

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

2016-05-05 Thread Filipe Cabecinhas via cfe-commits
filcab added a comment. In http://reviews.llvm.org/D19666#422150, @ygribov wrote: > Can we have generic option for other sanitizers? Do other sanitizers emit paths this way? For ASan, for example, we end up emitting them only when there are global constructors involved, where we'd emit an __as

  1   2   >