public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Revert 0x7fff8000 shadow offset for now
@ 2013-02-13 16:08 Jakub Jelinek
  2013-02-14  8:42 ` Konstantin Serebryany
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2013-02-13 16:08 UTC (permalink / raw)
  To: Konstantin Serebryany; +Cc: gcc-patches

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  <jakub@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);
 }
 \f
--- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [committed] Revert 0x7fff8000 shadow offset for now
  2013-02-13 16:08 [committed] Revert 0x7fff8000 shadow offset for now Jakub Jelinek
@ 2013-02-14  8:42 ` Konstantin Serebryany
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Serebryany @ 2013-02-14  8:42 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches

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 <jakub@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  <jakub@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-14  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13 16:08 [committed] Revert 0x7fff8000 shadow offset for now Jakub Jelinek
2013-02-14  8:42 ` Konstantin Serebryany

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).