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 Undo previous (disable l...



details:   https://anonhg.NetBSD.org/src/rev/63e23c8082d4
branches:  trunk
changeset: 451491:63e23c8082d4
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 25 15:18:52 2019 +0000

description:
Undo previous (disable lsan), and instead fix it by passing 1 instead of 0
to the address argument in detach. Apparently linux ignores the address
argument for detach (or treats 0 as 'do not set').

diffstat:

 external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h                                       |  2 +-
 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc |  4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r ef86053b6b62 -r 63e23c8082d4 external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h
--- a/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h    Sat May 25 13:54:37 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h    Sat May 25 15:18:52 2019 +0000
@@ -20,7 +20,7 @@
 #include "sanitizer_common/sanitizer_stoptheworld.h"
 #include "sanitizer_common/sanitizer_symbolizer.h"
 
-#if (SANITIZER_LINUX) && !SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 64) \
+#if (SANITIZER_NETBSD || SANITIZER_LINUX) && !SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 64) \
      && (defined(__x86_64__) ||  defined(__mips64) ||  defined(__aarch64__))
 #define CAN_SANITIZE_LEAKS 1
 #else
diff -r ef86053b6b62 -r 63e23c8082d4 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc      Sat May 25 13:54:37 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc      Sat May 25 15:18:52 2019 +0000
@@ -164,7 +164,7 @@
         // doesn't hurt to report it.
         VReport(1, "Waiting on thread %d failed, detaching (errno %d).\n",
                 tid, wperrno);
-        internal_ptrace(PTRACE_DETACH, tid, nullptr, nullptr);
+        internal_ptrace(PTRACE_DETACH, tid, (void*)(uptr)1, nullptr);
         return false;
       }
       if (WIFSTOPPED(status) && WSTOPSIG(status) != SIGSTOP) {
@@ -183,7 +183,7 @@
   for (uptr i = 0; i < suspended_threads_list_.thread_count(); i++) {
     pid_t tid = suspended_threads_list_.GetThreadID(i);
     int pterrno;
-    if (!internal_iserror(internal_ptrace(PTRACE_DETACH, tid, nullptr, nullptr),
+    if (!internal_iserror(internal_ptrace(PTRACE_DETACH, tid, (void*)(uptr)1, nullptr),
                           &pterrno)) {
       VReport(2, "Detached from thread %d.\n", tid);
     } else {



Home | Main Index | Thread Index | Old Index