Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/libsanitizer/asan Unbreak the sanitiz...



details:   https://anonhg.NetBSD.org/src/rev/b5ba8a440759
branches:  trunk
changeset: 464825:b5ba8a440759
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 25 18:03:59 2019 +0000

description:
Unbreak the sanitizers for gcc. The sanitizer offset defined in
libsanitizer needs to match with the compiler concept of
TARGET_ASAN_SHADOW_OFFSET, since the compiler generates instructions
to access memory at that offset in the code, and expects the
sanitizer library to have mapped something there. If there is
disagreement, Mr. Segmentation Fault comes and resolves it for you.

diffstat:

 external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r b0c80842d407 -r b5ba8a440759 external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h
--- a/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h   Fri Oct 25 17:39:56 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/asan/asan_mapping.h   Fri Oct 25 18:03:59 2019 +0000
@@ -185,8 +185,10 @@
 #    define SHADOW_OFFSET kSystemZ_ShadowOffset64
 #  elif SANITIZER_FREEBSD
 #    define SHADOW_OFFSET kFreeBSD_ShadowOffset64
-#  elif SANITIZER_NETBSD
-#    define SHADOW_OFFSET kNetBSD_ShadowOffset64
+// XXX: see TARGET_ASAN_SHADOW_OFFSET in gcc.
+// for example ix86_asan_shadow_offset() in i386.c 
+// #  elif SANITIZER_NETBSD
+// #    define SHADOW_OFFSET kNetBSD_ShadowOffset64
 #  elif SANITIZER_MAC
 #   define SHADOW_OFFSET kDefaultShadowOffset64
 #  elif defined(__mips64)



Home | Main Index | Thread Index | Old Index