Skip to content

Commit

Permalink
Update Crashpad to 3fae8ff07c097da6d0042510bdbe5b16c67a8e12
Browse files Browse the repository at this point in the history
fbc365fa9ed5 GCC 7.2 support (-Wnoexcept-type)
2f481590112b Make crashpad_util_test build without warnings with clang-
             cl on Windows
b96b9f627ee7 win: Use test::ErrorMessage() in test::ChildLauncher
52d766400da1 linux: ProcessReader can own ProcessMemoryLinux without
             unique_ptr
9bc5989125b8 crashpad_util_test warning fixes for clang-cl, 64-bit
             edition
34699d378b82 Create client data structures for typed Annotations
5e9ed4cb9f69 win: Dynamically disable WoW64 tests absent explicit 32-bit
             build output
cb3aa9c4d8f3 DumpAndCrash in extended handler test in favor of debug
             break
c49da9caef30 win: Expect uneven symbolic link support
1dae919b7e5a #include "base/logging.h" in client/annotation.h for
             DCHECK()
ef262d1ee3c2 #include "build/build_config.h" where needed
672c87258912 Upstream crashpad_util_test-in-Chromium changes
692488a254c4 Un-disable WinMultiprocess-based tests in Chromium
3fae8ff07c09 win: Fix -Wsign-compare warnings produced by clang

Change-Id: I4b1355afce8be5571af3582f7dd0057b5018d70f
Bug: crashpad:204, crashpad:205
Reviewed-on: https://chromium-review.googlesource.com/742284
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512421}
  • Loading branch information
markmentovai authored and Commit Bot committed Oct 29, 2017
1 parent 9b39004 commit a34342c
Show file tree
Hide file tree
Showing 49 changed files with 1,588 additions and 282 deletions.
4 changes: 4 additions & 0 deletions build/secondary/third_party/crashpad/crashpad/client/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ config("client_config") {

static_library("client") {
sources = [
"annotation.cc",
"annotation.h",
"annotation_list.cc",
"annotation_list.h",
"crash_report_database.cc",
"crash_report_database.h",
"crash_report_database_mac.mm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ static_library("compat") {
"win/sys/types.h",
"win/time.cc",
"win/time.h",
"win/winbase.h",
"win/winnt.h",
"win/winternl.h",
]
Expand Down
22 changes: 16 additions & 6 deletions build/secondary/third_party/crashpad/crashpad/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ static_library("crashpad_test") {
"file.cc",
"file.h",
"gtest_death_check.h",
"gtest_disabled.cc",
"gtest_disabled.h",
"hex_string.cc",
"hex_string.h",
"mac/dyld.cc",
Expand Down Expand Up @@ -58,30 +60,38 @@ static_library("crashpad_test") {
}
}

static_library("crashpad_gtest_main") {
static_library("crashpad_gmock_main") {
testonly = true
defines = [ "CRASHPAD_IN_CHROMIUM" ]
defines = [
"CRASHPAD_IN_CHROMIUM",
"CRASHPAD_TEST_LAUNCHER_GMOCK",
]
sources = [
"gtest_main.cc",
]
deps = [
":crashpad_test",
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
include_dirs = [ ".." ]
}

static_library("crashpad_gmock_main") {
static_library("crashpad_gtest_main") {
testonly = true
defines = [ "CRASHPAD_IN_CHROMIUM" ]
defines = [
"CRASHPAD_IN_CHROMIUM",
"CRASHPAD_TEST_LAUNCHER_GTEST",
]
sources = [
"gmock_main.cc",
"gtest_main.cc",
]
deps = [
":crashpad_test",
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
include_dirs = [ ".." ]
Expand Down
14 changes: 4 additions & 10 deletions build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,12 @@ static_library("util") {
test("crashpad_util_test") {
sources = [
"file/delimited_file_reader_test.cc",
"file/directory_reader_test.cc",
"file/file_io_test.cc",
"file/file_reader_test.cc",
"file/filesystem_test.cc",
"file/filesystem_test_util.cc",
"file/filesystem_test_util.h",
"file/string_file_test.cc",
"mac/launchd_test.mm",
"mac/mac_util_test.mm",
Expand Down Expand Up @@ -419,19 +423,9 @@ test("crashpad_util_test") {
":crashpad_util_test_safe_terminate_process_test_child",
]
libs = [ "rpcrt4.lib" ]
} else {
# These tests use symbolic links, which require admin priviledges on
# Windows before Windows 10.
sources += [
"file/directory_reader_test.cc",
"file/filesystem_test.cc",
"file/filesystem_test_util.cc",
"file/filesystem_test_util.h",
]
}

include_dirs = [ ".." ]
defines = [ "CRASHPAD_IN_CHROMIUM" ]

data = [
"net/http_transport_test_server.py",
Expand Down
2 changes: 1 addition & 1 deletion third_party/crashpad/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: Crashpad
Short Name: crashpad
URL: https://crashpad.chromium.org/
Version: unknown
Revision: 6d5bd1d04d5f50d9f4a58d528ccfb38c46423f23
Revision: 3fae8ff07c097da6d0042510bdbe5b16c67a8e12
License: Apache 2.0
License File: crashpad/LICENSE
Security Critical: yes
Expand Down
13 changes: 13 additions & 0 deletions third_party/crashpad/crashpad/build/run_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# coding: utf-8

# Copyright 2014 The Crashpad Authors. All rights reserved.
#
Expand Down Expand Up @@ -31,6 +32,18 @@ def main(args):
os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
binary_dir = args[0]

# Tell 64-bit Windows tests where to find 32-bit test executables, for
# cross-bitted testing. This relies on the fact that the GYP build by default
# uses {Debug,Release} for the 32-bit build and {Debug,Release}_x64 for the
# 64-bit build. This is not a universally valid assumption, and if it’s not
# met, 64-bit tests that require 32-bit build output will disable themselves
# dynamically.
if (sys.platform == 'win32' and binary_dir.endswith('_x64') and
'CRASHPAD_TEST_32_BIT_OUTPUT' not in os.environ):
binary_dir_32 = binary_dir[:-4]
if os.path.isdir(binary_dir_32):
os.environ['CRASHPAD_TEST_32_BIT_OUTPUT'] = binary_dir_32

tests = [
'crashpad_client_test',
'crashpad_minidump_test',
Expand Down
40 changes: 40 additions & 0 deletions third_party/crashpad/crashpad/client/annotation.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2017 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "client/annotation.h"

#include <type_traits>

#include "client/annotation_list.h"

namespace crashpad {

static_assert(std::is_standard_layout<Annotation>::value,
"Annotation must be POD");

// static
constexpr size_t Annotation::kNameMaxLength;
constexpr size_t Annotation::kValueMaxSize;

void Annotation::SetSize(ValueSizeType size) {
DCHECK_LT(size, kValueMaxSize);
size_ = size;
AnnotationList::Get()->Add(this);
}

void Annotation::Clear() {
size_ = 0;
}

} // namespace crashpad
Loading

0 comments on commit a34342c

Please sign in to comment.