RE: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Thanks! LGTM > -Original Message- > From: jkor...@apple.com > Sent: Friday, November 8, 2019 3:33 PM > To: Voss, Matthew > Cc: Jan Korous ; cfe-commits@lists.llvm.org; > jeremy.morse.l...@gmail.com > Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a > dependency in cc1 > > Yes, sorry, I messed up when relanding the patch. Seems fixed now. > > > On Nov 8, 2019, at 2:24 PM, Voss, Matthew wrote: > > > > Hi Jan, > > > > Thanks for looking at this. I'm seeing new errors on the PS4 windows > bot. > > > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubunt > > u-fast/builds/57835 > > > > Thanks, > > Matthew > > > >> -Original Message- > >> From: jkor...@apple.com > >> Sent: Friday, November 8, 2019 2:01 PM > >> To: Voss, Matthew > >> Cc: Jan Korous ; cfe-commits@lists.llvm.org; > >> jeremy.morse.l...@gmail.com > >> Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as > >> a dependency in cc1 > >> > >> Hi Matthew, > >> > >> You were absolutely right - my bad! > >> > >> I relanded the patches plus a fix. > >> > >> 555c6be041d [clang] Fix -fsanitize-system-blacklist processing in cc1 > >> > >> Thanks, > >> > >> Jan > >> > >>> On Nov 8, 2019, at 11:00 AM, Voss, Matthew > >> wrote: > >>> > >>> Hi Jan, > >>> > >>>> Are you sure it is this commit? > >>> I narrowed it down to your commit on my local machine. Let me know > >>> if it > >> doesn't repro on your end, though. > >>> > >>> Thanks, > >>> Matthew > >>> > >>> > >>>> -Original Message- > >>>> From: jkor...@apple.com > >>>> Sent: Friday, November 8, 2019 10:55 AM > >>>> To: Voss, Matthew > >>>> Cc: Jan Korous ; cfe-commits@lists.llvm.org; > >>>> jeremy.morse.l...@gmail.com > >>>> Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist > >>>> as a dependency in cc1 > >>>> > >>>> Hi Matthew, > >>>> > >>>> Are you sure it is this commit? It is definitely possible yet > >>>> sounds a bit unlikely that my patch would cause linker errors. > >>>> > >>>> Anyway, I am going to reproduce on a linux box. > >>>> > >>>> Thanks. > >>>> > >>>> Jan > >>>> > >>>>> On Nov 7, 2019, at 4:50 PM, Voss, Matthew > >> wrote: > >>>>> > >>>>> Hi Jan, > >>>>> > >>>>> It looks like this commit is causing DFSAN failures on the > >>>>> sanitizer > >>>> bots and our internal CI. Could you take a look? > >>>>> > >>>>> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24 > >>>>> 31 2/ steps/64-bit%20check-dfsan/logs/stdio > >>>>> > >>>>> Thanks, > >>>>> Matthew > >>>>> > >>>>>> -Original Message- > >>>>>> From: cfe-commits On Behalf > >>>>>> Of Jan Korous via cfe-commits > >>>>>> Sent: Thursday, November 7, 2019 2:07 PM > >>>>>> To: cfe-commits@lists.llvm.org > >>>>>> Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as > >>>>>> a dependency in cc1 > >>>>>> > >>>>>> > >>>>>> Author: Jan Korous > >>>>>> Date: 2019-11-07T14:06:43-08:00 > >>>>>> New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > >>>>>> > >>>>>> URL: https://github.com/llvm/llvm- > >>>>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > >>>>>> DIFF: https://github.com/llvm/llvm- > >>>>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff > >>>>>> > >>>>>> LOG: [clang] Report sanitizer blacklist as a dependency in cc1 > >>>>>> > >>>>>> Previously these were reported from the driver which blocked > >>>>>> clang-scan- deps from getting the full set of dependencies from > >>>>>> cc1 > >>&g
Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Yes, sorry, I messed up when relanding the patch. Seems fixed now. > On Nov 8, 2019, at 2:24 PM, Voss, Matthew wrote: > > Hi Jan, > > Thanks for looking at this. I'm seeing new errors on the PS4 windows bot. > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/57835 > > Thanks, > Matthew > >> -Original Message- >> From: jkor...@apple.com >> Sent: Friday, November 8, 2019 2:01 PM >> To: Voss, Matthew >> Cc: Jan Korous ; cfe-commits@lists.llvm.org; >> jeremy.morse.l...@gmail.com >> Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a >> dependency in cc1 >> >> Hi Matthew, >> >> You were absolutely right - my bad! >> >> I relanded the patches plus a fix. >> >> 555c6be041d [clang] Fix -fsanitize-system-blacklist processing in cc1 >> >> Thanks, >> >> Jan >> >>> On Nov 8, 2019, at 11:00 AM, Voss, Matthew >> wrote: >>> >>> Hi Jan, >>> >>>> Are you sure it is this commit? >>> I narrowed it down to your commit on my local machine. Let me know if it >> doesn't repro on your end, though. >>> >>> Thanks, >>> Matthew >>> >>> >>>> -Original Message- >>>> From: jkor...@apple.com >>>> Sent: Friday, November 8, 2019 10:55 AM >>>> To: Voss, Matthew >>>> Cc: Jan Korous ; cfe-commits@lists.llvm.org; >>>> jeremy.morse.l...@gmail.com >>>> Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as >>>> a dependency in cc1 >>>> >>>> Hi Matthew, >>>> >>>> Are you sure it is this commit? It is definitely possible yet sounds >>>> a bit unlikely that my patch would cause linker errors. >>>> >>>> Anyway, I am going to reproduce on a linux box. >>>> >>>> Thanks. >>>> >>>> Jan >>>> >>>>> On Nov 7, 2019, at 4:50 PM, Voss, Matthew >> wrote: >>>>> >>>>> Hi Jan, >>>>> >>>>> It looks like this commit is causing DFSAN failures on the sanitizer >>>> bots and our internal CI. Could you take a look? >>>>> >>>>> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2431 >>>>> 2/ steps/64-bit%20check-dfsan/logs/stdio >>>>> >>>>> Thanks, >>>>> Matthew >>>>> >>>>>> -Original Message- >>>>>> From: cfe-commits On Behalf Of >>>>>> Jan Korous via cfe-commits >>>>>> Sent: Thursday, November 7, 2019 2:07 PM >>>>>> To: cfe-commits@lists.llvm.org >>>>>> Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a >>>>>> dependency in cc1 >>>>>> >>>>>> >>>>>> Author: Jan Korous >>>>>> Date: 2019-11-07T14:06:43-08:00 >>>>>> New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 >>>>>> >>>>>> URL: https://github.com/llvm/llvm- >>>>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 >>>>>> DIFF: https://github.com/llvm/llvm- >>>>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff >>>>>> >>>>>> LOG: [clang] Report sanitizer blacklist as a dependency in cc1 >>>>>> >>>>>> Previously these were reported from the driver which blocked >>>>>> clang-scan- deps from getting the full set of dependencies from cc1 >>>> commands. >>>>>> >>>>>> Also the default sanitizer blacklist that is added in driver was >>>>>> never reported as a dependency. I introduced >>>>>> -fsanitize-system-blacklist cc1 option to keep track of which >>>>>> blacklists were user-specified and which were added by driver and >>>>>> clang -MD now also reports system blacklists as dependencies. >>>>>> >>>>>> Differential Revision: https://reviews.llvm.org/D69290 >>>>>> >>>>>> Added: >>>>>> >>>>>> >>>>>> Modified: >>>>>> clang/include/clang/Driver/Options.td >>>>>> clang/include/clang/Driver/SanitizerArgs.h >>>>>> clang/lib/Driver/SanitizerArgs.cpp >&
RE: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Jan, Thanks for looking at this. I'm seeing new errors on the PS4 windows bot. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/57835 Thanks, Matthew > -Original Message- > From: jkor...@apple.com > Sent: Friday, November 8, 2019 2:01 PM > To: Voss, Matthew > Cc: Jan Korous ; cfe-commits@lists.llvm.org; > jeremy.morse.l...@gmail.com > Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a > dependency in cc1 > > Hi Matthew, > > You were absolutely right - my bad! > > I relanded the patches plus a fix. > > 555c6be041d [clang] Fix -fsanitize-system-blacklist processing in cc1 > > Thanks, > > Jan > > > On Nov 8, 2019, at 11:00 AM, Voss, Matthew > wrote: > > > > Hi Jan, > > > >> Are you sure it is this commit? > > I narrowed it down to your commit on my local machine. Let me know if it > doesn't repro on your end, though. > > > > Thanks, > > Matthew > > > > > >> -Original Message- > >> From: jkor...@apple.com > >> Sent: Friday, November 8, 2019 10:55 AM > >> To: Voss, Matthew > >> Cc: Jan Korous ; cfe-commits@lists.llvm.org; > >> jeremy.morse.l...@gmail.com > >> Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as > >> a dependency in cc1 > >> > >> Hi Matthew, > >> > >> Are you sure it is this commit? It is definitely possible yet sounds > >> a bit unlikely that my patch would cause linker errors. > >> > >> Anyway, I am going to reproduce on a linux box. > >> > >> Thanks. > >> > >> Jan > >> > >>> On Nov 7, 2019, at 4:50 PM, Voss, Matthew > wrote: > >>> > >>> Hi Jan, > >>> > >>> It looks like this commit is causing DFSAN failures on the sanitizer > >> bots and our internal CI. Could you take a look? > >>> > >>> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2431 > >>> 2/ steps/64-bit%20check-dfsan/logs/stdio > >>> > >>> Thanks, > >>> Matthew > >>> > >>>> -Original Message- > >>>> From: cfe-commits On Behalf Of > >>>> Jan Korous via cfe-commits > >>>> Sent: Thursday, November 7, 2019 2:07 PM > >>>> To: cfe-commits@lists.llvm.org > >>>> Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a > >>>> dependency in cc1 > >>>> > >>>> > >>>> Author: Jan Korous > >>>> Date: 2019-11-07T14:06:43-08:00 > >>>> New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > >>>> > >>>> URL: https://github.com/llvm/llvm- > >>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > >>>> DIFF: https://github.com/llvm/llvm- > >>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff > >>>> > >>>> LOG: [clang] Report sanitizer blacklist as a dependency in cc1 > >>>> > >>>> Previously these were reported from the driver which blocked > >>>> clang-scan- deps from getting the full set of dependencies from cc1 > >> commands. > >>>> > >>>> Also the default sanitizer blacklist that is added in driver was > >>>> never reported as a dependency. I introduced > >>>> -fsanitize-system-blacklist cc1 option to keep track of which > >>>> blacklists were user-specified and which were added by driver and > >>>> clang -MD now also reports system blacklists as dependencies. > >>>> > >>>> Differential Revision: https://reviews.llvm.org/D69290 > >>>> > >>>> Added: > >>>> > >>>> > >>>> Modified: > >>>> clang/include/clang/Driver/Options.td > >>>> clang/include/clang/Driver/SanitizerArgs.h > >>>> clang/lib/Driver/SanitizerArgs.cpp > >>>> clang/lib/Frontend/CompilerInvocation.cpp > >>>> clang/test/Driver/fsanitize-blacklist.c > >>>> clang/test/Frontend/dependency-gen.c > >>>> > >>>> Removed: > >>>> > >>>> > >>>> > >>>> ### > >>>> ## > >>>> # > >>>> ## > >>>> diff --git a/clang/include/clang/D
Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Matthew, You were absolutely right - my bad! I relanded the patches plus a fix. 555c6be041d [clang] Fix -fsanitize-system-blacklist processing in cc1 Thanks, Jan > On Nov 8, 2019, at 11:00 AM, Voss, Matthew wrote: > > Hi Jan, > >> Are you sure it is this commit? > I narrowed it down to your commit on my local machine. Let me know if it > doesn't repro on your end, though. > > Thanks, > Matthew > > >> -Original Message- >> From: jkor...@apple.com >> Sent: Friday, November 8, 2019 10:55 AM >> To: Voss, Matthew >> Cc: Jan Korous ; cfe-commits@lists.llvm.org; >> jeremy.morse.l...@gmail.com >> Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a >> dependency in cc1 >> >> Hi Matthew, >> >> Are you sure it is this commit? It is definitely possible yet sounds a bit >> unlikely that my patch would cause linker errors. >> >> Anyway, I am going to reproduce on a linux box. >> >> Thanks. >> >> Jan >> >>> On Nov 7, 2019, at 4:50 PM, Voss, Matthew wrote: >>> >>> Hi Jan, >>> >>> It looks like this commit is causing DFSAN failures on the sanitizer >> bots and our internal CI. Could you take a look? >>> >>> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24312/ >>> steps/64-bit%20check-dfsan/logs/stdio >>> >>> Thanks, >>> Matthew >>> >>>> -Original Message- >>>> From: cfe-commits On Behalf Of >>>> Jan Korous via cfe-commits >>>> Sent: Thursday, November 7, 2019 2:07 PM >>>> To: cfe-commits@lists.llvm.org >>>> Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a >>>> dependency in cc1 >>>> >>>> >>>> Author: Jan Korous >>>> Date: 2019-11-07T14:06:43-08:00 >>>> New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 >>>> >>>> URL: https://github.com/llvm/llvm- >>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 >>>> DIFF: https://github.com/llvm/llvm- >>>> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff >>>> >>>> LOG: [clang] Report sanitizer blacklist as a dependency in cc1 >>>> >>>> Previously these were reported from the driver which blocked >>>> clang-scan- deps from getting the full set of dependencies from cc1 >> commands. >>>> >>>> Also the default sanitizer blacklist that is added in driver was >>>> never reported as a dependency. I introduced >>>> -fsanitize-system-blacklist cc1 option to keep track of which >>>> blacklists were user-specified and which were added by driver and >>>> clang -MD now also reports system blacklists as dependencies. >>>> >>>> Differential Revision: https://reviews.llvm.org/D69290 >>>> >>>> Added: >>>> >>>> >>>> Modified: >>>> clang/include/clang/Driver/Options.td >>>> clang/include/clang/Driver/SanitizerArgs.h >>>> clang/lib/Driver/SanitizerArgs.cpp >>>> clang/lib/Frontend/CompilerInvocation.cpp >>>> clang/test/Driver/fsanitize-blacklist.c >>>> clang/test/Frontend/dependency-gen.c >>>> >>>> Removed: >>>> >>>> >>>> >>>> # >>>> # >>>> ## >>>> diff --git a/clang/include/clang/Driver/Options.td >>>> b/clang/include/clang/Driver/Options.td >>>> index dcd2976a97f2..c2e30a16b8da 100644 >>>> --- a/clang/include/clang/Driver/Options.td >>>> +++ b/clang/include/clang/Driver/Options.td >>>> @@ -979,6 +979,9 @@ def fno_sanitize_EQ : CommaJoined<["-"], "fno- >>>> sanitize=">, Group, def fsanitize_blacklist : >>>> Joined<["- "], "fsanitize-blacklist=">, >>>> Group, >>>> HelpText<"Path to blacklist file for >>>> sanitizers">; >>>> +def fsanitize_system_blacklist : Joined<["-"], >>>> +"fsanitize-system-blacklist=">, >>>> + HelpText<"Path to system blacklist file for sanitizers">, >>>> + Flags<[CC1Option]>; >>>> def fno_sanitize_blacklist : Flag<["-"], "fno-sanitiz
Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Jan, The x86_64 sanitizer was failing: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24326 And then immediately after the reverts landed: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24327 check-dfsan passes. I don't have any explanation as to why this might be the case sorry (and it seems fairly odd), but I managed to reproduce it on a Ubuntu 19.04 VM. -- Thanks, Jeremy ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RE: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Jan, > Are you sure it is this commit? I narrowed it down to your commit on my local machine. Let me know if it doesn't repro on your end, though. Thanks, Matthew > -Original Message- > From: jkor...@apple.com > Sent: Friday, November 8, 2019 10:55 AM > To: Voss, Matthew > Cc: Jan Korous ; cfe-commits@lists.llvm.org; > jeremy.morse.l...@gmail.com > Subject: Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a > dependency in cc1 > > Hi Matthew, > > Are you sure it is this commit? It is definitely possible yet sounds a bit > unlikely that my patch would cause linker errors. > > Anyway, I am going to reproduce on a linux box. > > Thanks. > > Jan > > > On Nov 7, 2019, at 4:50 PM, Voss, Matthew wrote: > > > > Hi Jan, > > > > It looks like this commit is causing DFSAN failures on the sanitizer > bots and our internal CI. Could you take a look? > > > > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24312/ > > steps/64-bit%20check-dfsan/logs/stdio > > > > Thanks, > > Matthew > > > >> -Original Message- > >> From: cfe-commits On Behalf Of > >> Jan Korous via cfe-commits > >> Sent: Thursday, November 7, 2019 2:07 PM > >> To: cfe-commits@lists.llvm.org > >> Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a > >> dependency in cc1 > >> > >> > >> Author: Jan Korous > >> Date: 2019-11-07T14:06:43-08:00 > >> New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > >> > >> URL: https://github.com/llvm/llvm- > >> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > >> DIFF: https://github.com/llvm/llvm- > >> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff > >> > >> LOG: [clang] Report sanitizer blacklist as a dependency in cc1 > >> > >> Previously these were reported from the driver which blocked > >> clang-scan- deps from getting the full set of dependencies from cc1 > commands. > >> > >> Also the default sanitizer blacklist that is added in driver was > >> never reported as a dependency. I introduced > >> -fsanitize-system-blacklist cc1 option to keep track of which > >> blacklists were user-specified and which were added by driver and > >> clang -MD now also reports system blacklists as dependencies. > >> > >> Differential Revision: https://reviews.llvm.org/D69290 > >> > >> Added: > >> > >> > >> Modified: > >>clang/include/clang/Driver/Options.td > >>clang/include/clang/Driver/SanitizerArgs.h > >>clang/lib/Driver/SanitizerArgs.cpp > >>clang/lib/Frontend/CompilerInvocation.cpp > >>clang/test/Driver/fsanitize-blacklist.c > >>clang/test/Frontend/dependency-gen.c > >> > >> Removed: > >> > >> > >> > >> # > >> # > >> ## > >> diff --git a/clang/include/clang/Driver/Options.td > >> b/clang/include/clang/Driver/Options.td > >> index dcd2976a97f2..c2e30a16b8da 100644 > >> --- a/clang/include/clang/Driver/Options.td > >> +++ b/clang/include/clang/Driver/Options.td > >> @@ -979,6 +979,9 @@ def fno_sanitize_EQ : CommaJoined<["-"], "fno- > >> sanitize=">, Group, def fsanitize_blacklist : > >> Joined<["- "], "fsanitize-blacklist=">, > >> Group, > >> HelpText<"Path to blacklist file for > >> sanitizers">; > >> +def fsanitize_system_blacklist : Joined<["-"], > >> +"fsanitize-system-blacklist=">, > >> + HelpText<"Path to system blacklist file for sanitizers">, > >> + Flags<[CC1Option]>; > >> def fno_sanitize_blacklist : Flag<["-"], "fno-sanitize-blacklist">, > >> Group, > >> HelpText<"Don't use blacklist file for > >> sanitizers">; > >> > >> diff --git a/clang/include/clang/Driver/SanitizerArgs.h > >> b/clang/include/clang/Driver/SanitizerArgs.h > >> index c37499e0f201..0aebf8cb225d 100644 > >> --- a/clang/include/clang/Driver/SanitizerArgs.h > >> +++ b/clang/include/clang/Driver/SanitizerArgs.h > >> @@ -25,8 +25,8 @@ class SanitizerArgs { > >> Sanitizer
Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Matthew, Are you sure it is this commit? It is definitely possible yet sounds a bit unlikely that my patch would cause linker errors. Anyway, I am going to reproduce on a linux box. Thanks. Jan > On Nov 7, 2019, at 4:50 PM, Voss, Matthew wrote: > > Hi Jan, > > It looks like this commit is causing DFSAN failures on the sanitizer bots and > our internal CI. Could you take a look? > > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24312/steps/64-bit%20check-dfsan/logs/stdio > > Thanks, > Matthew > >> -Original Message- >> From: cfe-commits On Behalf Of Jan >> Korous via cfe-commits >> Sent: Thursday, November 7, 2019 2:07 PM >> To: cfe-commits@lists.llvm.org >> Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a >> dependency in cc1 >> >> >> Author: Jan Korous >> Date: 2019-11-07T14:06:43-08:00 >> New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 >> >> URL: https://github.com/llvm/llvm- >> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 >> DIFF: https://github.com/llvm/llvm- >> project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff >> >> LOG: [clang] Report sanitizer blacklist as a dependency in cc1 >> >> Previously these were reported from the driver which blocked clang-scan- >> deps from getting the full set of dependencies from cc1 commands. >> >> Also the default sanitizer blacklist that is added in driver was never >> reported as a dependency. I introduced -fsanitize-system-blacklist cc1 >> option to keep track of which blacklists were user-specified and which >> were added by driver and clang -MD now also reports system blacklists as >> dependencies. >> >> Differential Revision: https://reviews.llvm.org/D69290 >> >> Added: >> >> >> Modified: >>clang/include/clang/Driver/Options.td >>clang/include/clang/Driver/SanitizerArgs.h >>clang/lib/Driver/SanitizerArgs.cpp >>clang/lib/Frontend/CompilerInvocation.cpp >>clang/test/Driver/fsanitize-blacklist.c >>clang/test/Frontend/dependency-gen.c >> >> Removed: >> >> >> >> ## >> ## >> diff --git a/clang/include/clang/Driver/Options.td >> b/clang/include/clang/Driver/Options.td >> index dcd2976a97f2..c2e30a16b8da 100644 >> --- a/clang/include/clang/Driver/Options.td >> +++ b/clang/include/clang/Driver/Options.td >> @@ -979,6 +979,9 @@ def fno_sanitize_EQ : CommaJoined<["-"], "fno- >> sanitize=">, Group, def fsanitize_blacklist : Joined<["- >> "], "fsanitize-blacklist=">, >> Group, >> HelpText<"Path to blacklist file for >> sanitizers">; >> +def fsanitize_system_blacklist : Joined<["-"], >> +"fsanitize-system-blacklist=">, >> + HelpText<"Path to system blacklist file for sanitizers">, >> + Flags<[CC1Option]>; >> def fno_sanitize_blacklist : Flag<["-"], "fno-sanitize-blacklist">, >> Group, >> HelpText<"Don't use blacklist file for >> sanitizers">; >> >> diff --git a/clang/include/clang/Driver/SanitizerArgs.h >> b/clang/include/clang/Driver/SanitizerArgs.h >> index c37499e0f201..0aebf8cb225d 100644 >> --- a/clang/include/clang/Driver/SanitizerArgs.h >> +++ b/clang/include/clang/Driver/SanitizerArgs.h >> @@ -25,8 +25,8 @@ class SanitizerArgs { >> SanitizerSet RecoverableSanitizers; >> SanitizerSet TrapSanitizers; >> >> - std::vector BlacklistFiles; >> - std::vector ExtraDeps; >> + std::vector UserBlacklistFiles; >> + std::vector SystemBlacklistFiles; >> int CoverageFeatures = 0; >> int MsanTrackOrigins = 0; >> bool MsanUseAfterDtor = true; >> >> diff --git a/clang/lib/Driver/SanitizerArgs.cpp >> b/clang/lib/Driver/SanitizerArgs.cpp >> index cc6c5e6ef438..8937197c253c 100644 >> --- a/clang/lib/Driver/SanitizerArgs.cpp >> +++ b/clang/lib/Driver/SanitizerArgs.cpp >> @@ -557,29 +557,35 @@ SanitizerArgs::SanitizerArgs(const ToolChain , >> >> // Setup blacklist files. >> // Add default blacklist from resource directory. >> - addDefaultBlacklists(D, Kinds, BlacklistFiles); >> + addDefaultBlacklists(D, Kinds, SystemBlacklistFiles); >> // Parse -f(no-)sanitize-blacklist options. >> for (const auto *Arg : Args) { >> if (Arg->getOption().matches(options::OPT_fsanitize_blacklist)) { >> Arg->claim(); >> std::string BLPath = Arg->getValue(); >> if (llvm::sys::fs::exists(BLPath)) { >> -BlacklistFiles.push_back(BLPath); >> -ExtraDeps.push_back(BLPath); >> +UserBlacklistFiles.push_back(BLPath); >> } else { >> D.Diag(clang::diag::err_drv_no_such_file) << BLPath; >> } >> } else if (Arg- >>> getOption().matches(options::OPT_fno_sanitize_blacklist)) { >> Arg->claim(); >> - BlacklistFiles.clear(); >> - ExtraDeps.clear(); >> + UserBlacklistFiles.clear(); >> + SystemBlacklistFiles.clear(); >> } >> } >> // Validate blacklists format. >> { >> std::string
Re: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Jan, As the dfsan tests have been failing for a bit, I've reverted this in 6b45e1bc, and the follow-up patch in d6be9273c, to clear the buildbots. -- Thanks, Jeremy ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RE: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a dependency in cc1
Hi Jan, It looks like this commit is causing DFSAN failures on the sanitizer bots and our internal CI. Could you take a look? http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24312/steps/64-bit%20check-dfsan/logs/stdio Thanks, Matthew > -Original Message- > From: cfe-commits On Behalf Of Jan > Korous via cfe-commits > Sent: Thursday, November 7, 2019 2:07 PM > To: cfe-commits@lists.llvm.org > Subject: [clang] 03b84e4 - [clang] Report sanitizer blacklist as a > dependency in cc1 > > > Author: Jan Korous > Date: 2019-11-07T14:06:43-08:00 > New Revision: 03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > > URL: https://github.com/llvm/llvm- > project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4 > DIFF: https://github.com/llvm/llvm- > project/commit/03b84e4f6d0e1c04f22d69cc445f36e1f713beb4.diff > > LOG: [clang] Report sanitizer blacklist as a dependency in cc1 > > Previously these were reported from the driver which blocked clang-scan- > deps from getting the full set of dependencies from cc1 commands. > > Also the default sanitizer blacklist that is added in driver was never > reported as a dependency. I introduced -fsanitize-system-blacklist cc1 > option to keep track of which blacklists were user-specified and which > were added by driver and clang -MD now also reports system blacklists as > dependencies. > > Differential Revision: https://reviews.llvm.org/D69290 > > Added: > > > Modified: > clang/include/clang/Driver/Options.td > clang/include/clang/Driver/SanitizerArgs.h > clang/lib/Driver/SanitizerArgs.cpp > clang/lib/Frontend/CompilerInvocation.cpp > clang/test/Driver/fsanitize-blacklist.c > clang/test/Frontend/dependency-gen.c > > Removed: > > > > ## > ## > diff --git a/clang/include/clang/Driver/Options.td > b/clang/include/clang/Driver/Options.td > index dcd2976a97f2..c2e30a16b8da 100644 > --- a/clang/include/clang/Driver/Options.td > +++ b/clang/include/clang/Driver/Options.td > @@ -979,6 +979,9 @@ def fno_sanitize_EQ : CommaJoined<["-"], "fno- > sanitize=">, Group, def fsanitize_blacklist : Joined<["- > "], "fsanitize-blacklist=">, >Group, >HelpText<"Path to blacklist file for > sanitizers">; > +def fsanitize_system_blacklist : Joined<["-"], > +"fsanitize-system-blacklist=">, > + HelpText<"Path to system blacklist file for sanitizers">, > + Flags<[CC1Option]>; > def fno_sanitize_blacklist : Flag<["-"], "fno-sanitize-blacklist">, > Group, > HelpText<"Don't use blacklist file for > sanitizers">; > > diff --git a/clang/include/clang/Driver/SanitizerArgs.h > b/clang/include/clang/Driver/SanitizerArgs.h > index c37499e0f201..0aebf8cb225d 100644 > --- a/clang/include/clang/Driver/SanitizerArgs.h > +++ b/clang/include/clang/Driver/SanitizerArgs.h > @@ -25,8 +25,8 @@ class SanitizerArgs { >SanitizerSet RecoverableSanitizers; >SanitizerSet TrapSanitizers; > > - std::vector BlacklistFiles; > - std::vector ExtraDeps; > + std::vector UserBlacklistFiles; > + std::vector SystemBlacklistFiles; >int CoverageFeatures = 0; >int MsanTrackOrigins = 0; >bool MsanUseAfterDtor = true; > > diff --git a/clang/lib/Driver/SanitizerArgs.cpp > b/clang/lib/Driver/SanitizerArgs.cpp > index cc6c5e6ef438..8937197c253c 100644 > --- a/clang/lib/Driver/SanitizerArgs.cpp > +++ b/clang/lib/Driver/SanitizerArgs.cpp > @@ -557,29 +557,35 @@ SanitizerArgs::SanitizerArgs(const ToolChain , > >// Setup blacklist files. >// Add default blacklist from resource directory. > - addDefaultBlacklists(D, Kinds, BlacklistFiles); > + addDefaultBlacklists(D, Kinds, SystemBlacklistFiles); >// Parse -f(no-)sanitize-blacklist options. >for (const auto *Arg : Args) { > if (Arg->getOption().matches(options::OPT_fsanitize_blacklist)) { >Arg->claim(); >std::string BLPath = Arg->getValue(); >if (llvm::sys::fs::exists(BLPath)) { > -BlacklistFiles.push_back(BLPath); > -ExtraDeps.push_back(BLPath); > +UserBlacklistFiles.push_back(BLPath); >} else { > D.Diag(clang::diag::err_drv_no_such_file) << BLPath; >} > } else if (Arg- > >getOption().matches(options::OPT_fno_sanitize_blacklist)) { >Arg->claim(); > - BlacklistFiles.clear(); > - ExtraDeps.clear(); > + UserBlacklistFiles.clear(); > + SystemBlacklistFiles.clear(); > } >} >// Validate blacklists format. >{ > std::string BLError; > std::unique_ptr SCL( > -llvm::SpecialCaseList::create(BlacklistFiles, BLError)); > +llvm::SpecialCaseList::create(UserBlacklistFiles, BLError)); > +if (!SCL.get()) > + D.Diag(clang::diag::err_drv_malformed_sanitizer_blacklist) << > + BLError; } { > +std::string BLError; > +std::unique_ptr SCL( > +