[compiler-rt] r300521 - [asan] Fixup for r300483 (which is a fixup for r300473).
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 17 18:08:00 PDT 2017
Author: eugenis
Date: Mon Apr 17 20:08:00 2017
New Revision: 300521
URL: http://llvm.org/viewvc/llvm-project?rev=300521&view=rev
Log:
[asan] Fixup for r300483 (which is a fixup for r300473).
Sanitizer Printf() does not know about %lu.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc?rev=300521&r1=300520&r2=300521&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc Mon Apr 17 20:08:00 2017
@@ -142,10 +142,11 @@ bool ThreadSuspender::SuspendThread(tid_
&pterrno)) {
// Either the thread is dead, or something prevented us from attaching.
// Log this event and move on.
- VReport(1, "Could not attach to thread %lu (errno %d).\n", tid, pterrno);
+ VReport(1, "Could not attach to thread %zu (errno %d).\n", (uptr)tid,
+ pterrno);
return false;
} else {
- VReport(2, "Attached to thread %lu.\n", tid);
+ VReport(2, "Attached to thread %zu.\n", (uptr)tid);
// The thread is not guaranteed to stop before ptrace returns, so we must
// wait on it. Note: if the thread receives a signal concurrently,
// we can get notification about the signal before notification about stop.
@@ -163,8 +164,8 @@ bool ThreadSuspender::SuspendThread(tid_
if (internal_iserror(waitpid_status, &wperrno)) {
// Got a ECHILD error. I don't think this situation is possible, but it
// doesn't hurt to report it.
- VReport(1, "Waiting on thread %lu failed, detaching (errno %d).\n",
- tid, wperrno);
+ VReport(1, "Waiting on thread %zu failed, detaching (errno %d).\n",
+ (uptr)tid, wperrno);
internal_ptrace(PTRACE_DETACH, tid, nullptr, nullptr);
return false;
}
More information about the llvm-commits
mailing list