[cfe-commits] adding '-fasan' flag

Richard Smith richard at metafoo.co.uk
Wed Nov 16 14:56:34 PST 2011


On Wed, November 16, 2011 02:40, Eli Friedman wrote:
> On Tue, Nov 15, 2011 at 6:22 PM, Kostya Serebryany <kcc at google.com> wrote:
>> Hello,
>> Please review the following patch which adds -fasan (AddressSanitizer) flag
>> to clang. (Mostly prepared by Chandler Carruth).
>> The LLVM part of AddressSanitizer has been submitted as r144758.
>> This patch will allow to enable AddressSanitizer from the clang command
>> line. http://codereview.appspot.com/5396042
>> Coming next in separate patches:
>>   - a patch to clang driver to pass linker flags for AddressSanitizer
>> (small)
>>   - the run-time library and the tests (big)
>> Thanks,
>> --kcc
>
> I would prefer -faddress-sanitizer over -fasan; shorter isn't really
> better here.

I think, more generally, we should have a naming strategy for options
controlling runtime checks. For the IOC checks, it would be useful to have
fine-grained control over the individual checks for various reasons, so I
suggest a -W-like mechanism, with individual runtime check flags, along with
groups (eg all runtime overflow checks). As a straw man, we could use -R (e.g.
-Raddress, -Roverflow, -Rno-shift-overflow) for this.
-- 
Richard




More information about the cfe-commits mailing list