Re: [PATCH] Enable -fsanitize=thread and =leak support on ppc64{,le}

2017-01-23 Thread David Edelsohn
On Mon, Jan 23, 2017 at 7:20 PM, Jakub Jelinek  wrote:
> Hi!
>
> On Mon, Jan 23, 2017 at 03:32:46PM +0100, Jakub Jelinek wrote:
>> I think it should be enabled if it works, even this late.
>> I bet we need something like the following patch on top of
>> the PR79168 patch.
>>
>> I'll test both patches on both ppc64le and ppc64.
>>
>> Another question is, it seems upstream has s390{,x}-*-linux* support for
>> asan/ubsan, does that work?  In that case we should add it to configure.tgt
>> too (similarly to the sparc*-*-linux* entry).
>>
>> 2017-01-23  Jakub Jelinek  
>>
>>   * configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*.
>
> Successfully bootstrapped/regtested on powerpc64{,le}-linux, ok for trunk?

Okay.

Thanks, David


[PATCH] Enable -fsanitize=thread and =leak support on ppc64{,le}

2017-01-23 Thread Jakub Jelinek
Hi!

On Mon, Jan 23, 2017 at 03:32:46PM +0100, Jakub Jelinek wrote:
> I think it should be enabled if it works, even this late.
> I bet we need something like the following patch on top of
> the PR79168 patch.
> 
> I'll test both patches on both ppc64le and ppc64.
> 
> Another question is, it seems upstream has s390{,x}-*-linux* support for
> asan/ubsan, does that work?  In that case we should add it to configure.tgt
> too (similarly to the sparc*-*-linux* entry).
> 
> 2017-01-23  Jakub Jelinek  
> 
>   * configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*.

Successfully bootstrapped/regtested on powerpc64{,le}-linux, ok for trunk?

> --- libsanitizer/configure.tgt.jj 2016-11-09 15:22:50.0 +0100
> +++ libsanitizer/configure.tgt2017-01-23 15:25:21.059399613 +0100
> @@ -1,5 +1,5 @@
>  # -*- shell-script -*-
> -#   Copyright (C) 2012 Free Software Foundation, Inc.
> +#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
>  
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> @@ -31,6 +31,11 @@ case "${target}" in
>   fi
>   ;;
>powerpc*-*-linux*)
> + if test x$ac_cv_sizeof_void_p = x8; then
> + TSAN_SUPPORTED=yes
> + LSAN_SUPPORTED=yes
> + TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_ppc64.lo
> + fi
>   ;;
>sparc*-*-linux*)
>   ;;
> 
> 
Jakub