autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling compiler warning flags


From: Jeffrey Walton
Subject: Re: Enabling compiler warning flags
Date: Tue, 26 Feb 2013 08:53:17 -0500

On Tue, Feb 26, 2013 at 8:01 AM, Eric Blake <address@hidden> wrote:
> On 02/25/2013 06:09 PM, Jeffrey Walton wrote:
>
>> GCC 4.8 added a couple of interesting flags
>> (http://gcc.gnu.org/gcc-4.8/changes.html): -fsanitize=address and
>> -fsanitize=thread. Some reading about them is available at
>> http://llvm.org/devmtg/2012-11/Serebryany_TSan-MSan.pdf.
>>
>> It might be helpful to projects if the auto tools enabled one or both
>> by default. The overhead on Address Sanitizer looks small compared to
>> the payoff.
>
> That paper said address sanitizer added 2x slowdown (20x under
> valgrind), and would need hardware support to cut the slowdown to only
> 20%.  It also said thread sanitizer added 20x to 300x slowdown.  That
> sounds like neither one should be enabled by default, but are best used
> during development.  But thanks for pointing them out - they sound
> interesting.
Yes, my bad. Address Sanitizer should be enabled for debug
configurations by default (along with other "program diagnostics" to
borrow from Posix).

Release configurations should leave the choice to the user.

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]