| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/crash/browser/crash_handler_host_linux.h" | 5 #include "components/crash/browser/crash_handler_host_linux.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
| 10 #include <sys/syscall.h> | 10 #include <sys/syscall.h> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 iov[1].iov_len = sizeof(tid_buf_addr); | 177 iov[1].iov_len = sizeof(tid_buf_addr); |
| 178 iov[2].iov_base = &tid_fd; | 178 iov[2].iov_base = &tid_fd; |
| 179 iov[2].iov_len = sizeof(tid_fd); | 179 iov[2].iov_len = sizeof(tid_fd); |
| 180 iov[3].iov_base = &uptime; | 180 iov[3].iov_base = &uptime; |
| 181 iov[3].iov_len = sizeof(uptime); | 181 iov[3].iov_len = sizeof(uptime); |
| 182 iov[4].iov_base = &oom_size; | 182 iov[4].iov_base = &oom_size; |
| 183 iov[4].iov_len = sizeof(oom_size); | 183 iov[4].iov_len = sizeof(oom_size); |
| 184 iov[5].iov_base = serialized_crash_keys; | 184 iov[5].iov_base = serialized_crash_keys; |
| 185 iov[5].iov_len = crash_keys_size; | 185 iov[5].iov_len = crash_keys_size; |
| 186 #if !defined(ADDRESS_SANITIZER) | 186 #if !defined(ADDRESS_SANITIZER) |
| 187 COMPILE_ASSERT(5 == kCrashIovSize - 1, Incorrect_Number_Of_Iovec_Members); | 187 static_assert(5 == kCrashIovSize - 1, "kCrashIovSize should equal 6"); |
| 188 #else | 188 #else |
| 189 iov[6].iov_base = asan_report.get(); | 189 iov[6].iov_base = asan_report.get(); |
| 190 iov[6].iov_len = kMaxAsanReportSize + 1; | 190 iov[6].iov_len = kMaxAsanReportSize + 1; |
| 191 COMPILE_ASSERT(6 == kCrashIovSize - 1, Incorrect_Number_Of_Iovec_Members); | 191 static_assert(6 == kCrashIovSize - 1, "kCrashIovSize should equal 7"); |
| 192 #endif | 192 #endif |
| 193 msg.msg_iov = iov; | 193 msg.msg_iov = iov; |
| 194 msg.msg_iovlen = kCrashIovSize; | 194 msg.msg_iovlen = kCrashIovSize; |
| 195 msg.msg_control = control; | 195 msg.msg_control = control; |
| 196 msg.msg_controllen = kControlMsgSize; | 196 msg.msg_controllen = kControlMsgSize; |
| 197 | 197 |
| 198 const ssize_t msg_size = HANDLE_EINTR(recvmsg(browser_socket_, &msg, 0)); | 198 const ssize_t msg_size = HANDLE_EINTR(recvmsg(browser_socket_, &msg, 0)); |
| 199 if (msg_size < 0) { | 199 if (msg_size < 0) { |
| 200 LOG(ERROR) << "Error reading from death signal socket. Crash dumping" | 200 LOG(ERROR) << "Error reading from death signal socket. Crash dumping" |
| 201 << " is disabled." | 201 << " is disabled." |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 // no-ops. | 427 // no-ops. |
| 428 shutting_down_ = true; | 428 shutting_down_ = true; |
| 429 uploader_thread_->Stop(); | 429 uploader_thread_->Stop(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 bool CrashHandlerHostLinux::IsShuttingDown() const { | 432 bool CrashHandlerHostLinux::IsShuttingDown() const { |
| 433 return shutting_down_; | 433 return shutting_down_; |
| 434 } | 434 } |
| 435 | 435 |
| 436 } // namespace breakpad | 436 } // namespace breakpad |
| OLD | NEW |