Commit c65098c1 authored by Joshua Peraza's avatar Joshua Peraza Committed by Commit Bot

Update Crashpad to 6d4626090db24cc4c05946c3b43962596e522d9a

132a61018473 elf: Use compiler macros in crashpad info note
f5b486de7416 linux: Make StartHandler methods static
f5483cb99fd4 linux: Use HANDLE_EINTR for sendmsg and recvmsg
cf9e96b856cb elf: Use compiler macros in crashpad info size test note
6d4626090db2 linux: Add a second CaptureContext symbol name

Bug: crashpad:30
Change-Id: I99d6866bc07bc8fa636f736e29ad5ba94e134ea1
Reviewed-on: https://chromium-review.googlesource.com/971833
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545074}
parent 063d79cf
...@@ -2,7 +2,7 @@ Name: Crashpad ...@@ -2,7 +2,7 @@ Name: Crashpad
Short Name: crashpad Short Name: crashpad
URL: https://crashpad.chromium.org/ URL: https://crashpad.chromium.org/
Version: unknown Version: unknown
Revision: c27a1aaea0861852c6d92945b68856586e0cd51d Revision: 6d4626090db24cc4c05946c3b43962596e522d9a
License: Apache 2.0 License: Apache 2.0
License File: crashpad/LICENSE License File: crashpad/LICENSE
Security Critical: yes Security Critical: yes
......
...@@ -29,7 +29,7 @@ deps = { ...@@ -29,7 +29,7 @@ deps = {
'5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f', '5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f',
'crashpad/third_party/mini_chromium/mini_chromium': 'crashpad/third_party/mini_chromium/mini_chromium':
Var('chromium_git') + '/chromium/mini_chromium@' + Var('chromium_git') + '/chromium/mini_chromium@' +
'ef0df1119b40cfa2773d5960e239d4b960310869', 'd42eb410123667fe94427986d2616795897efa0c',
'crashpad/third_party/zlib/zlib': 'crashpad/third_party/zlib/zlib':
Var('chromium_git') + '/chromium/src/third_party/zlib@' + Var('chromium_git') + '/chromium/src/third_party/zlib@' +
'13dc246a58e4b72104d35f9b1809af95221ebda7', '13dc246a58e4b72104d35f9b1809af95221ebda7',
......
...@@ -132,7 +132,7 @@ class CrashpadClient { ...@@ -132,7 +132,7 @@ class CrashpadClient {
//! specified in this parameter. //! specified in this parameter.
//! //!
//! \return `true` on success, `false` on failure with a message logged. //! \return `true` on success, `false` on failure with a message logged.
bool StartHandlerAtCrash( static bool StartHandlerAtCrash(
const base::FilePath& handler, const base::FilePath& handler,
const base::FilePath& database, const base::FilePath& database,
const base::FilePath& metrics_dir, const base::FilePath& metrics_dir,
...@@ -164,7 +164,7 @@ class CrashpadClient { ...@@ -164,7 +164,7 @@ class CrashpadClient {
//! be used with an ExceptionHandlerClient. //! be used with an ExceptionHandlerClient.
//! //!
//! \return `true` on success, `false` on failure with a message logged. //! \return `true` on success, `false` on failure with a message logged.
bool StartHandlerForClient( static bool StartHandlerForClient(
const base::FilePath& handler, const base::FilePath& handler,
const base::FilePath& database, const base::FilePath& database,
const base::FilePath& metrics_dir, const base::FilePath& metrics_dir,
......
...@@ -215,6 +215,7 @@ bool CrashpadClient::StartHandler( ...@@ -215,6 +215,7 @@ bool CrashpadClient::StartHandler(
return false; return false;
} }
// static
bool CrashpadClient::StartHandlerAtCrash( bool CrashpadClient::StartHandlerAtCrash(
const base::FilePath& handler, const base::FilePath& handler,
const base::FilePath& database, const base::FilePath& database,
...@@ -235,6 +236,7 @@ bool CrashpadClient::StartHandlerAtCrash( ...@@ -235,6 +236,7 @@ bool CrashpadClient::StartHandlerAtCrash(
return false; return false;
} }
// static
bool CrashpadClient::StartHandlerForClient( bool CrashpadClient::StartHandlerForClient(
const base::FilePath& handler, const base::FilePath& handler,
const base::FilePath& database, const base::FilePath& database,
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
// of finding the instance of CrashpadInfo g_crashpad_info without requiring // of finding the instance of CrashpadInfo g_crashpad_info without requiring
// that symbol to be in the dynamic symbol table. // that symbol to be in the dynamic symbol table.
#include "build/build_config.h"
#include "util/misc/elf_note_types.h" #include "util/misc/elf_note_types.h"
// namespace crashpad { // namespace crashpad {
...@@ -45,16 +44,16 @@ name: ...@@ -45,16 +44,16 @@ name:
name_end: name_end:
.balign NOTE_ALIGN .balign NOTE_ALIGN
desc: desc:
#if defined(ARCH_CPU_64_BITS) #if defined(__LP64__)
.quad CRASHPAD_INFO_SYMBOL .quad CRASHPAD_INFO_SYMBOL
#else #else
#if defined(ARCH_CPU_LITTLE_ENDIAN) #if defined(__LITTLE_ENDIAN__)
.long CRASHPAD_INFO_SYMBOL .long CRASHPAD_INFO_SYMBOL
.long 0 .long 0
#else #else
.long 0 .long 0
.long CRASHPAD_INFO_SYMBOL .long CRASHPAD_INFO_SYMBOL
#endif // ARCH_CPU_LITTLE_ENDIAN #endif // __LITTLE_ENDIAN__
#endif // ARCH_CPU_64_BITS #endif // __LP64__
desc_end: desc_end:
.size CRASHPAD_NOTE_REFERENCE, .-CRASHPAD_NOTE_REFERENCE .size CRASHPAD_NOTE_REFERENCE, .-CRASHPAD_NOTE_REFERENCE
...@@ -348,7 +348,7 @@ bool ExceptionHandlerServer::ReceiveClientMessage(Event* event) { ...@@ -348,7 +348,7 @@ bool ExceptionHandlerServer::ReceiveClientMessage(Event* event) {
msg.msg_controllen = sizeof(cmsg_buf); msg.msg_controllen = sizeof(cmsg_buf);
msg.msg_flags = 0; msg.msg_flags = 0;
int res = recvmsg(event->fd.get(), &msg, 0); int res = HANDLE_EINTR(recvmsg(event->fd.get(), &msg, 0));
if (res < 0) { if (res < 0) {
PLOG(ERROR) << "recvmsg"; PLOG(ERROR) << "recvmsg";
return false; return false;
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
// of finding the instance of CrashpadInfo g_crashpad_info without requiring // of finding the instance of CrashpadInfo g_crashpad_info without requiring
// that symbol to be in the dynamic symbol table. // that symbol to be in the dynamic symbol table.
#include "build/build_config.h"
#include "util/misc/elf_note_types.h" #include "util/misc/elf_note_types.h"
// namespace crashpad { // namespace crashpad {
...@@ -41,16 +40,16 @@ name: ...@@ -41,16 +40,16 @@ name:
name_end: name_end:
.balign NOTE_ALIGN .balign NOTE_ALIGN
desc: desc:
#if defined(ARCH_CPU_64_BITS) #if defined(__LP64__)
.quad TEST_CRASHPAD_INFO_SYMBOL .quad TEST_CRASHPAD_INFO_SYMBOL
#else #else
#if defined(ARCH_CPU_LITTLE_ENDIAN) #if defined(__LITTLE_ENDIAN__)
.long TEST_CRASHPAD_INFO_SYMBOL .long TEST_CRASHPAD_INFO_SYMBOL
.long 0 .long 0
#else #else
.long 0 .long 0
.long TEST_CRASHPAD_INFO_SYMBOL .long TEST_CRASHPAD_INFO_SYMBOL
#endif // ARCH_CPU_LITTLE_ENDIAN #endif // __LITTLE_ENDIAN__
#endif // ARCH_CPU_64_BITS #endif // __LP64__
desc_end: desc_end:
.size info_size_test_note, .-info_size_test_note .size info_size_test_note, .-info_size_test_note
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <ucontext.h> #include <ucontext.h>
#include <unistd.h> #include <unistd.h>
#include "base/bit_cast.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <limits> #include <limits>
#include "base/bit_cast.h"
#include "base/macros.h" #include "base/macros.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "test/errors.h" #include "test/errors.h"
......
...@@ -92,7 +92,7 @@ int ExceptionHandlerClient::SendCrashDumpRequest( ...@@ -92,7 +92,7 @@ int ExceptionHandlerClient::SendCrashDumpRequest(
cmsg->cmsg_len = CMSG_LEN(sizeof(creds)); cmsg->cmsg_len = CMSG_LEN(sizeof(creds));
*reinterpret_cast<ucred*>(CMSG_DATA(cmsg)) = creds; *reinterpret_cast<ucred*>(CMSG_DATA(cmsg)) = creds;
if (sendmsg(server_sock_, &msg, MSG_NOSIGNAL) < 0) { if (HANDLE_EINTR(sendmsg(server_sock_, &msg, MSG_NOSIGNAL)) < 0) {
PLOG(ERROR) << "sendmsg"; PLOG(ERROR) << "sendmsg";
return errno; return errno;
} }
......
...@@ -15,10 +15,17 @@ ...@@ -15,10 +15,17 @@
// namespace crashpad { // namespace crashpad {
// void CaptureContext(ucontext_t* context); // void CaptureContext(ucontext_t* context);
// } // namespace crashpad // } // namespace crashpad
#define CAPTURECONTEXT_SYMBOL _ZN8crashpad14CaptureContextEP8ucontext
// The type name for a ucontext_t varies by libc implementation and version.
// Bionic and glibc 2.25 typedef ucontext_t from struct ucontext. glibc 2.26+
// typedef ucontext_t from struct ucontext_t. Alias the symbol names to maintain
// compatibility with both possibilities.
#define CAPTURECONTEXT_SYMBOL _ZN8crashpad14CaptureContextEP10ucontext_t
#define CAPTURECONTEXT_SYMBOL2 _ZN8crashpad14CaptureContextEP8ucontext
.text .text
.globl CAPTURECONTEXT_SYMBOL .globl CAPTURECONTEXT_SYMBOL
.globl CAPTURECONTEXT_SYMBOL2
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__)
.balign 16, 0x90 .balign 16, 0x90
#elif defined(__arm__) || defined(__aarch64__) #elif defined(__arm__) || defined(__aarch64__)
...@@ -26,6 +33,7 @@ ...@@ -26,6 +33,7 @@
#endif #endif
CAPTURECONTEXT_SYMBOL: CAPTURECONTEXT_SYMBOL:
CAPTURECONTEXT_SYMBOL2:
#if defined(__i386__) #if defined(__i386__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment