| 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 // For linux_syscall_support.h. This makes it safe to call embedded system | 5 // For linux_syscall_support.h. This makes it safe to call embedded system |
| 6 // calls when in seccomp mode. | 6 // calls when in seccomp mode. |
| 7 | 7 |
| 8 #include "components/crash/app/breakpad_linux.h" | 8 #include "components/crash/app/breakpad_linux.h" |
| 9 | 9 |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 iov[3].iov_base = &g_process_start_time; | 844 iov[3].iov_base = &g_process_start_time; |
| 845 iov[3].iov_len = sizeof(g_process_start_time); | 845 iov[3].iov_len = sizeof(g_process_start_time); |
| 846 iov[4].iov_base = &base::g_oom_size; | 846 iov[4].iov_base = &base::g_oom_size; |
| 847 iov[4].iov_len = sizeof(base::g_oom_size); | 847 iov[4].iov_len = sizeof(base::g_oom_size); |
| 848 google_breakpad::SerializedNonAllocatingMap* serialized_map; | 848 google_breakpad::SerializedNonAllocatingMap* serialized_map; |
| 849 iov[5].iov_len = g_crash_keys->Serialize( | 849 iov[5].iov_len = g_crash_keys->Serialize( |
| 850 const_cast<const google_breakpad::SerializedNonAllocatingMap**>( | 850 const_cast<const google_breakpad::SerializedNonAllocatingMap**>( |
| 851 &serialized_map)); | 851 &serialized_map)); |
| 852 iov[5].iov_base = serialized_map; | 852 iov[5].iov_base = serialized_map; |
| 853 #if !defined(ADDRESS_SANITIZER) | 853 #if !defined(ADDRESS_SANITIZER) |
| 854 COMPILE_ASSERT(5 == kCrashIovSize - 1, Incorrect_Number_Of_Iovec_Members); | 854 static_assert(5 == kCrashIovSize - 1, "kCrashIovSize should equal 6"); |
| 855 #else | 855 #else |
| 856 iov[6].iov_base = const_cast<char*>(g_asan_report_str); | 856 iov[6].iov_base = const_cast<char*>(g_asan_report_str); |
| 857 iov[6].iov_len = kMaxAsanReportSize + 1; | 857 iov[6].iov_len = kMaxAsanReportSize + 1; |
| 858 COMPILE_ASSERT(6 == kCrashIovSize - 1, Incorrect_Number_Of_Iovec_Members); | 858 static_assert(6 == kCrashIovSize - 1, "kCrashIovSize should equal 7"); |
| 859 #endif | 859 #endif |
| 860 | 860 |
| 861 msg.msg_iov = iov; | 861 msg.msg_iov = iov; |
| 862 msg.msg_iovlen = kCrashIovSize; | 862 msg.msg_iovlen = kCrashIovSize; |
| 863 char cmsg[kControlMsgSpaceSize]; | 863 char cmsg[kControlMsgSpaceSize]; |
| 864 my_memset(cmsg, 0, kControlMsgSpaceSize); | 864 my_memset(cmsg, 0, kControlMsgSpaceSize); |
| 865 msg.msg_control = cmsg; | 865 msg.msg_control = cmsg; |
| 866 msg.msg_controllen = sizeof(cmsg); | 866 msg.msg_controllen = sizeof(cmsg); |
| 867 | 867 |
| 868 struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); | 868 struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 } | 1709 } |
| 1710 } | 1710 } |
| 1711 } | 1711 } |
| 1712 #endif // OS_ANDROID | 1712 #endif // OS_ANDROID |
| 1713 | 1713 |
| 1714 bool IsCrashReporterEnabled() { | 1714 bool IsCrashReporterEnabled() { |
| 1715 return g_is_crash_reporter_enabled; | 1715 return g_is_crash_reporter_enabled; |
| 1716 } | 1716 } |
| 1717 | 1717 |
| 1718 } // namespace breakpad | 1718 } // namespace breakpad |
| OLD | NEW |