Thanks!
This'll let us think about fixing 7fff8000+prelink w/o a rush.

Still, can we switch to using asan-rt in
ASAN_FLEXIBLE_MAPPING_AND_OFFSET=1 mode?
This way we will have fewer differences between gcc variant and upstream
and will be able to change the offset w/o changing the rt at all.
(and this will allow simpler experiments with zero base in gcc).

--kcc


On Wed, Feb 13, 2013 at 8:07 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> Hi!
>
> So that we don't keep GCC trunk in known broken state, I've
> bootstrapped/regtested this change and installed it.
>
> 2013-02-13  Jakub Jelinek  <ja...@redhat.com>
>
>         * config/i386/i386.c (ix86_asan_shadow_offset): Revert last change.
>
>         * asan/asan_mapping.h (SHADOW_OFFSET): Set to (1ULL << 44) on x86-64.
>
> --- gcc/config/i386/i386.c.jj   2013-02-13 11:53:42.000000000 +0100
> +++ gcc/config/i386/i386.c      2013-02-13 14:15:19.670007874 +0100
> @@ -5436,8 +5436,7 @@ ix86_legitimate_combined_insn (rtx insn)
>  static unsigned HOST_WIDE_INT
>  ix86_asan_shadow_offset (void)
>  {
> -  return TARGET_LP64 ? (TARGET_MACHO ? (HOST_WIDE_INT_1 << 44)
> -                                    : HOST_WIDE_INT_C (0x7fff8000))
> +  return TARGET_LP64 ? (HOST_WIDE_INT_1 << 44)
>                      : (HOST_WIDE_INT_1 << 29);
>  }
>
> --- libsanitizer/asan/asan_mapping.h.jj 2013-02-13 11:53:43.000000000 +0100
> +++ libsanitizer/asan/asan_mapping.h    2013-02-13 14:20:34.032179688 +0100
> @@ -36,11 +36,7 @@ extern SANITIZER_INTERFACE_ATTRIBUTE upt
>  #   if defined(__powerpc64__)
>  #    define SHADOW_OFFSET (1ULL << 41)
>  #   else
> -#    if ASAN_MAC
> -#     define SHADOW_OFFSET (1ULL << 44)
> -#    else
> -#     define SHADOW_OFFSET 0x7fff8000ULL
> -#    endif
> +#    define SHADOW_OFFSET (1ULL << 44)
>  #   endif
>  #  endif
>  # endif
>
>         Jakub

Reply via email to