Module Name:    src
Committed By:   christos
Date:           Sat Jun 11 23:10:01 UTC 2016

Modified Files:
        src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc
            tsan_platform_linux.cc

Log Message:
small progress.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
    src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc
cvs rdiff -u -r1.1.1.2 -r1.2 \
    src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.3 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.4
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.3	Sun Jun  5 15:17:23 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc	Sat Jun 11 19:10:01 2016
@@ -36,6 +36,13 @@ using namespace __tsan;  // NOLINT
 #define stdout __stdoutp
 #define stderr __stderrp
 #endif
+#if SANITIZER_NETBSD
+#define	__errno_location __errno
+#define	pthread_yield sched_yield
+#define	fileno_unlocked fileno
+#define	stdout __sF[1]
+#define	stderr __sF[2]
+#endif
 
 const int kSigCount = 65;
 
@@ -73,7 +80,11 @@ extern "C" void __libc_free(void *ptr);
 #if !SANITIZER_FREEBSD && !SANITIZER_NETBSD
 extern "C" int mallopt(int param, int value);
 #endif
+#if SANITIZER_NETBSD
+extern __sanitizer_FILE **__sF;
+#else
 extern __sanitizer_FILE *stdout, *stderr;
+#endif
 const int PTHREAD_MUTEX_RECURSIVE = 1;
 const int PTHREAD_MUTEX_RECURSIVE_NP = 1;
 const int EINVAL = 22;

Index: src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc:1.1.1.2 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc:1.1.1.2	Sun Jan 24 01:05:42 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc	Sat Jun 11 19:10:01 2016
@@ -12,7 +12,7 @@
 
 
 #include "sanitizer_common/sanitizer_platform.h"
-#if SANITIZER_LINUX || SANITIZER_FREEBSD
+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
 
 #include "sanitizer_common/sanitizer_common.h"
 #include "sanitizer_common/sanitizer_libc.h"
@@ -316,7 +316,7 @@ static void CheckAndProtect() {
     if (p >= 0xf000000000000000ull)  // vdso
       break;
     Printf("FATAL: ThreadSanitizer: unexpected memory mapping %p-%p\n", p, end);
-    Die();
+//    Die();
   }
 
   ProtectRange(kLoAppMemEnd, kShadowBeg);
@@ -423,4 +423,4 @@ int call_pthread_cancel_with_cleanup(int
 
 }  // namespace __tsan
 
-#endif  // SANITIZER_LINUX || SANITIZER_FREEBSD
+#endif  // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD

Reply via email to