[cfe-commits] adding '-fasan' flag

Kostya Serebryany kcc at google.com
Wed Nov 16 14:59:54 PST 2011


On Wed, Nov 16, 2011 at 2:56 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> 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

FYI
For AddressSanitizer we may also need fine-grained control in the future.
-faddress-sanitizer-[no-]reads
-faddress-sanitizer-[no-]stack
-faddress-sanitizer-[no-]globals



> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111116/433f6f31/attachment.html>


More information about the cfe-commits mailing list