Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-05 Thread Chandler Carruth
On Sat, Nov 3, 2012 at 1:57 AM, Kostya Serebryany k...@google.com wrote: On Sat, Nov 3, 2012 at 12:06 AM, Richard Smith rich...@metafoo.co.uk Just so we have something specific to talk about, here are some options: 1) For the 3.2 release, we remove the existing switches. 2) For the 3.2

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-05 Thread Richard Smith
On Mon, Nov 5, 2012 at 3:38 AM, Chandler Carruth chandl...@google.com wrote: On Sat, Nov 3, 2012 at 1:57 AM, Kostya Serebryany k...@google.com wrote: On Sat, Nov 3, 2012 at 12:06 AM, Richard Smith rich...@metafoo.co.uk Just so we have something specific to talk about, here are some options:

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-03 Thread Kostya Serebryany
LGTM On Sat, Nov 3, 2012 at 12:06 AM, Richard Smith rich...@metafoo.co.ukwrote: On Fri, Nov 2, 2012 at 6:06 AM, Kostya Serebryany k...@google.com wrote: Assuming the implemented flag naming is ok with everyone, the patch is good. Few questions: + unsigned Kind; Do we only allow

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Kostya Serebryany
On Fri, Nov 2, 2012 at 9:41 AM, Alexander Potapenko gli...@google.comwrote: I haven't seen the patch yet, but here are two thoughts: - some tools may be incompatible with each other (e.g. ASan and TSan), so we shouldn't allow to use them together; - there are many users of TSan and ASan, thus

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Dmitry Vyukov
On Fri, Nov 2, 2012 at 4:51 AM, Richard Smith rich...@metafoo.co.uk wrote: Hi, The attached patch series adds a -fsanitize=sanitizer1,sanitizer2,sanitizer3 command-line option to Clang (and a corresponding -fno-sanitize=...). This works as follows for the driver options:

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Chandler Carruth
On Thu, Nov 1, 2012 at 11:01 PM, Dmitry Vyukov dvyu...@google.com wrote: On Fri, Nov 2, 2012 at 4:51 AM, Richard Smith rich...@metafoo.co.uk wrote: Hi, The attached patch series adds a -fsanitize=sanitizer1,sanitizer2,sanitizer3 command-line option to Clang (and a corresponding

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Kostya Serebryany
Assuming the implemented flag naming is ok with everyone, the patch is good. Few questions: + unsigned Kind; Do we only allow 32 sanitizers? Why not 64? Do we want to change -faddress-sanitizer in asan/tsan lit tests? projects/compiler-rt/lib/asan/lit_tests

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Dmitry Vyukov
On Fri, Nov 2, 2012 at 4:53 PM, Diego Novillo dnovi...@google.com wrote: On Fri, Nov 2, 2012 at 2:01 AM, Dmitry Vyukov dvyu...@google.com wrote: +Diego,David And if/when we add MemorySanitizer, can we add new alias -fmemory-sanitizer? I am asking because we are in the process of

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Matthieu Monrocq
On Fri, Nov 2, 2012 at 2:11 PM, Dmitry Vyukov dvyu...@google.com wrote: On Fri, Nov 2, 2012 at 4:53 PM, Diego Novillo dnovi...@google.com wrote: On Fri, Nov 2, 2012 at 2:01 AM, Dmitry Vyukov dvyu...@google.com wrote: +Diego,David And if/when we add MemorySanitizer, can we add new alias

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Richard Smith
On Thu, Nov 1, 2012 at 10:41 PM, Alexander Potapenko gli...@google.com wrote: I haven't seen the patch yet, but here are two thoughts: - some tools may be incompatible with each other (e.g. ASan and TSan), so we shouldn't allow to use them together; Patch 2 adds a diagnostic if the user

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Diego Novillo
On Fri, Nov 2, 2012 at 2:06 PM, Matthieu Monrocq matthieu.monr...@gmail.com wrote: Just to make sure everyone is on the same basis, Richard's proposal is to have the flag be `-fsanitize` = Note the leading `f` and the absence of trailing `r`. Yes. Dmitry, David, could you please make the

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Diego Novillo
On Fri, Nov 2, 2012 at 2:01 AM, Dmitry Vyukov dvyu...@google.com wrote: +Diego,David And if/when we add MemorySanitizer, can we add new alias -fmemory-sanitizer? I am asking because we are in the process of committing asan/tsan to gcc, and we want to preserve consistency between clang and

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-02 Thread Richard Smith
On Fri, Nov 2, 2012 at 6:06 AM, Kostya Serebryany k...@google.com wrote: Assuming the implemented flag naming is ok with everyone, the patch is good. Few questions: + unsigned Kind; Do we only allow 32 sanitizers? Why not 64? We currently have only 13. I don't think we'll forget to

Re: [cfe-commits] [PATCH] Add -fsanitize= command line argument to control -fcatch-undefined-behavior, -faddress-sanitizer, and -fthread-sanitizer

2012-11-01 Thread Alexander Potapenko
I haven't seen the patch yet, but here are two thoughts: - some tools may be incompatible with each other (e.g. ASan and TSan), so we shouldn't allow to use them together; - there are many users of TSan and ASan, thus we can't easily rename the corresponding command line options. The right thing