Commit 6c14690f authored by Robert Sesek's avatar Robert Sesek Committed by Commit Bot

Update Crashpad to af28b83eb7b6c5009c3ba1ccb440653df10fd7a0

ee84ce22bb89 fuchsia: Set kOS in MinidumpMiscInfoDebugBuildString
1020a6147d3d fuchsia: Use crashpad_info section matching Linux/Android
             for now
050d111bf986 fuchsia: Set METRICS_OS_NAME
4ee20f583191 Add Fuchsia clang and sdk to DEPS
0d05b0d59e19 fuchsia: Use RandBytes UUID generator
af28b83eb7b6 In Annotation::SetSize, use AnnotationList::Register rather
             than Get

Bug: 598854
Change-Id: Iccbc85ad93f03385bf0b4623f48046050f424062
Reviewed-on: https://chromium-review.googlesource.com/794036Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519807}
parent fe2c8a00
......@@ -2,7 +2,7 @@ Name: Crashpad
Short Name: crashpad
URL: https://crashpad.chromium.org/
Version: unknown
Revision: e9f40ae176fb15a3a5ed1adb9aa7bd85ad221ce8
Revision: af28b83eb7b6c5009c3ba1ccb440653df10fd7a0
License: Apache 2.0
License File: crashpad/LICENSE
Security Critical: yes
......
......@@ -10,6 +10,9 @@
.gdbinit
/Makefile
/out
/third_party/fuchsia/.cipd
/third_party/fuchsia/clang
/third_party/fuchsia/sdk
/third_party/gtest/gtest
/third_party/gyp/gyp
/third_party/mini_chromium/mini_chromium
......
......@@ -113,6 +113,18 @@ hooks = [
'buildtools/linux64/gn.sha1',
],
},
{
'name': 'fuchsia_clang',
'pattern': '.',
'condition': 'checkout_fuchsia',
'action': [
'cipd',
'ensure',
'-ensure-file', 'crashpad/third_party/fuchsia/toolchain.ensure',
'-root', 'crashpad/third_party/fuchsia',
'-log-level', 'info',
],
},
{
'name': 'gyp',
'pattern': '\.gypi?$',
......
......@@ -30,7 +30,9 @@ constexpr size_t Annotation::kValueMaxSize;
void Annotation::SetSize(ValueSizeType size) {
DCHECK_LT(size, kValueMaxSize);
size_ = size;
AnnotationList::Get()->Add(this);
// Use Register() instead of Get() in case the calling module has not
// explicitly initialized the annotation list, to avoid crashing.
AnnotationList::Register()->Add(this);
}
void Annotation::Clear() {
......
......@@ -58,11 +58,11 @@ __attribute__((
// found without having to consult the symbol table.
#if defined(OS_MACOSX)
section(SEG_DATA ",crashpad_info"),
#elif defined(OS_LINUX) || defined(OS_ANDROID)
#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
section("crashpad_info"),
#else // !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID)
#else
#error Port
#endif // !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID)
#endif
#if defined(ADDRESS_SANITIZER)
// AddressSanitizer would add a trailing red zone of at least 32 bytes,
......
......@@ -108,6 +108,8 @@ std::string MinidumpMiscInfoDebugBuildString() {
static constexpr char kOS[] = "linux";
#elif defined(OS_WIN)
static constexpr char kOS[] = "win";
#elif defined(OS_FUCHSIA)
static constexpr char kOS[] = "fuchsia";
#else
#error define kOS for this operating system
#endif
......
This directory is a placeholder for Fuchsia tools that will be downloaded by
CIPD (https://github.com/luci/luci-go/tree/master/cipd). The toolchain.ensure
files specifies which CIPD packages to retrieve, at which versions, and where
they're stored locally. The CIPD update happens as part of gclient runhooks.
# 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.
@Subdir clang
fuchsia/clang/${os}-${arch} latest
@Subdir sdk
fuchsia/sdk/${os=linux}-${arch} latest
......@@ -26,6 +26,8 @@
#define METRICS_OS_NAME "Android"
#elif defined(OS_LINUX)
#define METRICS_OS_NAME "Linux"
#elif defined(OS_FUCHSIA)
#define METRICS_OS_NAME "Fuchsia"
#endif
namespace crashpad {
......
......@@ -90,9 +90,11 @@ bool UUID::InitializeWithNew() {
uuid_generate(uuid);
InitializeFromBytes(uuid);
return true;
#elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID)
// Linux does not provide a UUID generator in a widely-available system
// library. uuid_generate() from libuuid is not available everywhere.
#elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || \
defined(OS_FUCHSIA)
// Linux, Android, and Fuchsia do not provide a UUID generator in a
// widely-available system library. On Linux and Android, uuid_generate()
// from libuuid is not available everywhere.
// On Windows, do not use UuidCreate() to avoid a dependency on rpcrt4, so
// that this function is usable early in DllMain().
base::RandBytes(this, sizeof(*this));
......
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