On Tue, Apr 17, 2018 at 05:15:06PM -0500, Bill Seurer wrote:
> [PATCH, rs6000] Fix address sanitizer for powerpc64.
> 
> This patch fixes problems that asan has on powerpc64 running on some old
> kernels and also very new kernels.
> 
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85394 and
> https://github.com/google/sanitizers/issues/933 for more information.
> 
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu and
> powerpc64be-unknown-linux-gnu with no regressions.  Is this ok for trunk?
> 
> 
> 2018-04-17  Bill Seurer  <seu...@linux.vnet.ibm.com>
> 
>       PR sanitizer/85389
>       * asan/asan_allocator.h: Switch to use dynamic base for the allocator
>       region.

I'd write
        * asan/asan_allocator.h (kAllocatorSpace): For __powerpc64__ change
        from 0xa0000000000ULL to ~(uptr)0.

Ok with that change and thanks for all the testing.

> Index: libsanitizer/asan/asan_allocator.h
> ===================================================================
> --- libsanitizer/asan/asan_allocator.h        (revision 259447)
> +++ libsanitizer/asan/asan_allocator.h        (working copy)
> @@ -122,7 +122,7 @@ const uptr kAllocatorSpace = ~(uptr)0;
>  const uptr kAllocatorSize  =  0x40000000000ULL;  // 4T.
>  typedef DefaultSizeClassMap SizeClassMap;
>  # elif defined(__powerpc64__)
> -const uptr kAllocatorSpace =  0xa0000000000ULL;
> +const uptr kAllocatorSpace = ~(uptr)0;
>  const uptr kAllocatorSize  =  0x20000000000ULL;  // 2T.
>  typedef DefaultSizeClassMap SizeClassMap;
>  # elif defined(__aarch64__) && SANITIZER_ANDROID
> 

        Jakub

Reply via email to