qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 04/13] build-sys: add AddressSanitizer when -


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v2 04/13] build-sys: add AddressSanitizer when --enable-debug if possible
Date: Tue, 2 Jan 2018 16:49:47 +0100

On Tue, Dec 19, 2017 at 4:48 PM, Marc-André Lureau
<address@hidden> wrote:
> Hi
>
> On Fri, Dec 15, 2017 at 4:06 PM, Marc-André Lureau
> <address@hidden> wrote:
>> Enable ASAN by default if the compiler supports it.
>>
>> If necessary, we could consider a seperate configure option, although
>> I like the idea to have it enabled by default with --enable-debug.
>
> Peter, Paolo, Fam, any thoughts about having ASAN enabled by default
> with --enable-debug? (when available)
>
> Slow down is not really noticeable to me when running make check, but
> I can do some measurements if that helps.
>
> thanks

ping, thanks

>
>
>> Signed-off-by: Marc-André Lureau <address@hidden>
>> ---
>>  configure | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/configure b/configure
>> index 2b8c71f522..52d9fd71e5 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5129,6 +5129,11 @@ elif test "$fortify_source" = "yes" ; then
>>    CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
>>  elif test "$debug" = "no"; then
>>    CFLAGS="-O2 $CFLAGS"
>> +elif test "$debug" = "yes"; then
>> +    write_c_skeleton;
>> +    if compile_prog "-fsanitize=address" ""; then
>> +        CFLAGS="-fsanitize=address $CFLAGS"
>> +    fi
>>  fi
>>
>>  ##########################################
>> --
>> 2.15.1.355.g36791d7216
>>
>>
>
>
>
> --
> Marc-André Lureau



-- 
Marc-André Lureau



reply via email to

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