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, 19 Dec 2017 16:48:25 +0100

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


> 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



reply via email to

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