Module Name: src
Committed By: christos
Date: Sat May 25 15:18:52 UTC 2019
Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_common.h
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_stoptheworld_linux_libcdep.cc
Log Message:
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').
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.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/lsan/lsan_common.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.4 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.5
--- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.4 Sat May 25 09:54:37 2019
+++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h Sat May 25 11:18:52 2019
@@ -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
Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.6 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.7
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.6 Thu Jan 31 03:44:14 2019
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc Sat May 25 11:18:52 2019
@@ -164,7 +164,7 @@ bool ThreadSuspender::SuspendThread(Susp
// 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 @@ void ThreadSuspender::ResumeAllThreads()
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 {