summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_printf.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2017-07-25 16:56:22 +0000
committerVitaly Buka <vitalybuka@google.com>2017-07-25 16:56:22 +0000
commitad87a2bf27320d4026890d9ae58dc6a453928d44 (patch)
treed2de08b50d394e2fb7b37c8a5d1a42e35a67d7f8 /lib/sanitizer_common/sanitizer_printf.cc
parent26aeaee1b40622ec7250f857078aebc765a39269 (diff)
Revert "[compiler-rt] Include thread ID into sanitizers logs"
This improvement introduce additional dependencies on sandboxed environments. This reverts commit r308637. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_printf.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_printf.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sanitizer_common/sanitizer_printf.cc b/lib/sanitizer_common/sanitizer_printf.cc
index f81e15357..520206441 100644
--- a/lib/sanitizer_common/sanitizer_printf.cc
+++ b/lib/sanitizer_common/sanitizer_printf.cc
@@ -257,15 +257,15 @@ static void NOINLINE SharedPrintfCodeNoBuffer(bool append_pid,
"Buffer in Report is too short!\n"); \
}
if (append_pid) {
+ int pid = internal_getpid();
const char *exe_name = GetProcessName();
if (common_flags()->log_exe_name && exe_name) {
needed_length += internal_snprintf(buffer, buffer_size,
"==%s", exe_name);
CHECK_NEEDED_LENGTH
}
- needed_length +=
- internal_snprintf(buffer + needed_length, buffer_size - needed_length,
- "==%d:%d==", internal_getpid(), GetTid());
+ needed_length += internal_snprintf(
+ buffer + needed_length, buffer_size - needed_length, "==%d==", pid);
CHECK_NEEDED_LENGTH
}
needed_length += VSNPrintf(buffer + needed_length,
@@ -307,7 +307,7 @@ void Printf(const char *format, ...) {
va_end(args);
}
-// Like Printf, but prints the current PID:TID before the output string.
+// Like Printf, but prints the current PID before the output string.
FORMAT(1, 2)
void Report(const char *format, ...) {
va_list args;