From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- ...claration-of-tgkill-when-using-Android-.patch.1 | 49 +++++ ...etween-ExceptionHandler-SignalHandler-a.patch.1 | 33 +++ external/breakpad/ExternalProject_breakpad.mk | 31 +++ external/breakpad/Makefile | 14 ++ external/breakpad/Module_breakpad.mk | 26 +++ external/breakpad/README | 21 ++ external/breakpad/StaticLibrary_breakpad.mk | 37 ++++ external/breakpad/UnpackedTarball_breakpad.mk | 38 ++++ external/breakpad/breakpad-stackwalk.patch.1 | 32 +++ .../breakpad-use-correct-http-header.patch.1 | 14 ++ external/breakpad/breakpad-wshadow.patch.1 | 232 +++++++++++++++++++++ external/breakpad/breakpad-wshadow2.patch.1 | 144 +++++++++++++ external/breakpad/c++20-allocator.patch | 11 + external/breakpad/ubsan.patch | 21 ++ external/breakpad/ucontext.patch | 194 +++++++++++++++++ 15 files changed, 897 insertions(+) create mode 100644 external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 create mode 100644 external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 create mode 100644 external/breakpad/ExternalProject_breakpad.mk create mode 100644 external/breakpad/Makefile create mode 100644 external/breakpad/Module_breakpad.mk create mode 100644 external/breakpad/README create mode 100644 external/breakpad/StaticLibrary_breakpad.mk create mode 100644 external/breakpad/UnpackedTarball_breakpad.mk create mode 100644 external/breakpad/breakpad-stackwalk.patch.1 create mode 100644 external/breakpad/breakpad-use-correct-http-header.patch.1 create mode 100644 external/breakpad/breakpad-wshadow.patch.1 create mode 100644 external/breakpad/breakpad-wshadow2.patch.1 create mode 100644 external/breakpad/c++20-allocator.patch create mode 100644 external/breakpad/ubsan.patch create mode 100644 external/breakpad/ucontext.patch (limited to 'external/breakpad') diff --git a/external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 b/external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 new file mode 100644 index 000000000..7c8a68c24 --- /dev/null +++ b/external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 @@ -0,0 +1,49 @@ +From 7e3c165000d44fa153a3270870ed500bc8bbb461 Mon Sep 17 00:00:00 2001 +From: Nicholas Baldwin +Date: Fri, 27 Oct 2017 11:44:36 -0700 +Subject: [PATCH] Fix double declaration of tgkill when using Android NDK + Headers. + +As of Android API level 16 tgkill is declared in the NDK version of +signal.h, which conflicts with the static definition found in +src/client/linux/handler/exception_handler.cc. This change removes +the static tgkill definition and replaces its use with sys_tgkill +from the linux syscall support library. + +Bug: +Change-Id: Ic70addd8a064cfa36345d86b7e36409e2089e909 +Reviewed-on: https://chromium-review.googlesource.com/738912 +Reviewed-by: Mike Frysinger +--- + src/client/linux/handler/exception_handler.cc | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc +index 95005209..cd94e3b5 100644 +--- a/src/client/linux/handler/exception_handler.cc ++++ b/src/client/linux/handler/exception_handler.cc +@@ -105,12 +105,6 @@ + #define PR_SET_PTRACER 0x59616d61 + #endif + +-// A wrapper for the tgkill syscall: send a signal to a specific thread. +-static int tgkill(pid_t tgid, pid_t tid, int sig) { +- return syscall(__NR_tgkill, tgid, tid, sig); +- return 0; +-} +- + namespace google_breakpad { + + namespace { +@@ -400,7 +394,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { + // In order to retrigger it, we have to queue a new signal by calling + // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is + // due to the kernel sending a SIGABRT from a user request via SysRQ. +- if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) { ++ if (sys_tgkill(getpid(), syscall(__NR_gettid), sig) < 0) { + // If we failed to kill ourselves (e.g. because a sandbox disallows us + // to do so), we instead resort to terminating our process. This will + // result in an incorrect exit code. +-- +2.23.0 + diff --git a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 new file mode 100644 index 000000000..00762650f --- /dev/null +++ b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 @@ -0,0 +1,33 @@ +From caa6f1ea462d0f0c612b871106e3e309fe0290f5 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Thu, 16 Aug 2018 09:04:35 +0200 +Subject: [PATCH] Handle race between ExceptionHandler::SignalHandler and + ~ExceptionHandler + +...where thread A is blocked locking g_handler_stack_mutex_ in SignalHandler +while thread B executes ~ExceptionHandler and sets g_handler_stack to null, but +which thread A didn't expect to be null once it acquired the lock. +--- + src/client/linux/handler/exception_handler.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc +index b895f6d7..4d58e510 100644 +--- a/src/client/linux/handler/exception_handler.cc ++++ b/src/client/linux/handler/exception_handler.cc +@@ -372,8 +372,10 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { + } + + bool handled = false; +- for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) { +- handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc); ++ if (g_handler_stack_ != NULL) { ++ for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) { ++ handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc); ++ } + } + + // Upon returning from this signal handler, sig will become unmasked and then +-- +2.17.1 + diff --git a/external/breakpad/ExternalProject_breakpad.mk b/external/breakpad/ExternalProject_breakpad.mk new file mode 100644 index 000000000..9e7e72485 --- /dev/null +++ b/external/breakpad/ExternalProject_breakpad.mk @@ -0,0 +1,31 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,breakpad)) + +$(eval $(call gb_ExternalProject_register_targets,breakpad,\ + build \ +)) + + +ifeq ($(COM),MSC) + +else # !ifeq($(COM),MSC) + +$(call gb_ExternalProject_get_state_target,breakpad,build) : + $(call gb_Trace_StartRange,breakpad,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + ./configure CXXFLAGS="-O2 $(gb_VISIBILITY_FLAGS)" \ + && $(MAKE) \ + ) + $(call gb_Trace_EndRange,breakpad,EXTERNAL) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/breakpad/Makefile b/external/breakpad/Makefile new file mode 100644 index 000000000..569ad8a0b --- /dev/null +++ b/external/breakpad/Makefile @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/breakpad/Module_breakpad.mk b/external/breakpad/Module_breakpad.mk new file mode 100644 index 000000000..aeb3c42a9 --- /dev/null +++ b/external/breakpad/Module_breakpad.mk @@ -0,0 +1,26 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,breakpad)) + +$(eval $(call gb_Module_add_targets,breakpad,\ + UnpackedTarball_breakpad \ +)) + +ifneq ($(OS),WNT) +$(eval $(call gb_Module_add_targets,breakpad,\ + ExternalProject_breakpad \ +)) +else +$(eval $(call gb_Module_add_targets,breakpad,\ + StaticLibrary_breakpad \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/breakpad/README b/external/breakpad/README new file mode 100644 index 000000000..dfd2bf91c --- /dev/null +++ b/external/breakpad/README @@ -0,0 +1,21 @@ +Google breakpad crash-reporting library + +https://chromium.googlesource.com/breakpad/breakpad + +When this is enabled and soffice.bin crashes, a "mini-dump" file is written +as "instdir/crash/*.dmp". + +There is an UI to upload the mini-dump to a TDF server but of course +that only makes sense if the server has symbols available that match +the build, which is not the case if you have built LO yourself. + +If you want to get the backtrace from local mini-dump files: + +* with Visual Studio: + 1. open the *.dmp file from the Visual Studio IDE File->Open->File + 2. then click "Debug Native Only" + +* otherwise: + 1. run "make symbols" to extract the debuginfo from the binaries + 2. run "workdir/UnpackedTarball/breakpad/src/processor/minidump_stackwalk foo.dmp workdir/symbols" + diff --git a/external/breakpad/StaticLibrary_breakpad.mk b/external/breakpad/StaticLibrary_breakpad.mk new file mode 100644 index 000000000..fc5d3251f --- /dev/null +++ b/external/breakpad/StaticLibrary_breakpad.mk @@ -0,0 +1,37 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_StaticLibrary_StaticLibrary,breakpad)) + +$(eval $(call gb_StaticLibrary_set_warnings_disabled,breakpad)) + +$(eval $(call gb_StaticLibrary_use_unpacked,breakpad,breakpad)) + +$(eval $(call gb_StaticLibrary_set_include,breakpad,\ + -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \ + -I$(call gb_UnpackedTarball_get_dir,breakpad)/src/client/windows \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,breakpad,\ + -DUNICODE \ +)) + +$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,breakpad,cc)) + +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,breakpad,\ + UnpackedTarball/breakpad/src/common/windows/guid_string \ + UnpackedTarball/breakpad/src/client/windows/handler/exception_handler \ + UnpackedTarball/breakpad/src/client/windows/crash_generation/client_info \ + UnpackedTarball/breakpad/src/client/windows/crash_generation/crash_generation_client \ + UnpackedTarball/breakpad/src/client/windows/crash_generation/crash_generation_server \ + UnpackedTarball/breakpad/src/client/windows/crash_generation/minidump_generator \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/breakpad/UnpackedTarball_breakpad.mk b/external/breakpad/UnpackedTarball_breakpad.mk new file mode 100644 index 000000000..b9e14874d --- /dev/null +++ b/external/breakpad/UnpackedTarball_breakpad.mk @@ -0,0 +1,38 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,breakpad)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,breakpad,0)) + +$(eval $(call gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL))) + +# external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch upstreamed at +# "Handle race between +# ExceptionHandler::SignalHandler and ~ExceptionHandler": +$(eval $(call gb_UnpackedTarball_add_patches,breakpad,\ + external/breakpad/breakpad-use-correct-http-header.patch.1 \ + external/breakpad/breakpad-wshadow.patch.1 \ + external/breakpad/breakpad-wshadow2.patch.1 \ + external/breakpad/breakpad-stackwalk.patch.1 \ + external/breakpad/ucontext.patch \ + external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 \ + external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 \ + external/breakpad/c++20-allocator.patch \ +)) + +ifeq ($(COM_IS_CLANG),TRUE) +ifneq ($(filter -fsanitize=%,$(CC)),) +$(eval $(call gb_UnpackedTarball_add_patches,breakpad, \ + external/breakpad/ubsan.patch \ +)) +endif +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/breakpad/breakpad-stackwalk.patch.1 b/external/breakpad/breakpad-stackwalk.patch.1 new file mode 100644 index 000000000..8df1fa3e2 --- /dev/null +++ b/external/breakpad/breakpad-stackwalk.patch.1 @@ -0,0 +1,32 @@ +diff -ur breakpad.org/src/processor/stackwalk_common.cc breakpad/src/processor/stackwalk_common.cc +--- breakpad.org/src/processor/stackwalk_common.cc 2016-06-27 02:06:43.304932691 +0200 ++++ breakpad/src/processor/stackwalk_common.cc 2016-06-27 02:10:22.815642476 +0200 +@@ -750,7 +750,7 @@ + // one per line, in the following machine-readable pipe-delimited + // text format: + // Module|{Module Filename}|{Version}|{Debug Filename}|{Debug Identifier}| +-// {Base Address}|{Max Address}|{Main} ++// {Base Address}|{Max Address}|{Main}|{Code Identifier} + static void PrintModulesMachineReadable(const CodeModules *modules) { + if (!modules) + return; +@@ -767,7 +767,7 @@ + ++module_sequence) { + const CodeModule *module = modules->GetModuleAtSequence(module_sequence); + uint64_t base_address = module->base_address(); +- printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 "%c%d\n", ++ printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 "%c%d%c%s\n", + kOutputSeparator, + StripSeparator(PathnameStripper::File(module->code_file())).c_str(), + kOutputSeparator, StripSeparator(module->version()).c_str(), +@@ -778,7 +778,9 @@ + kOutputSeparator, base_address, + kOutputSeparator, base_address + module->size() - 1, + kOutputSeparator, +- main_module != NULL && base_address == main_address ? 1 : 0); ++ main_module != NULL && base_address == main_address ? 1 : 0, ++ kOutputSeparator, ++ StripSeparator(PathnameStripper::File(module->code_identifier())).c_str()); + } + } + diff --git a/external/breakpad/breakpad-use-correct-http-header.patch.1 b/external/breakpad/breakpad-use-correct-http-header.patch.1 new file mode 100644 index 000000000..257d5465b --- /dev/null +++ b/external/breakpad/breakpad-use-correct-http-header.patch.1 @@ -0,0 +1,14 @@ +diff -ur breakpad.org/src/tools/linux/symupload/minidump_upload.cc breakpad/src/tools/linux/symupload/minidump_upload.cc +--- breakpad.org/src/tools/linux/symupload/minidump_upload.cc 2015-11-23 17:37:53.830558138 +0100 ++++ breakpad/src/tools/linux/symupload/minidump_upload.cc 2015-11-23 17:38:59.559051874 +0100 +@@ -59,8 +59,8 @@ + static void Start(Options *options) { + std::map parameters; + // Add parameters +- parameters["prod"] = options->product; +- parameters["ver"] = options->version; ++ parameters["ProductName"] = options->product; ++ parameters["Version"] = options->version; + + std::map files; + files["upload_file_minidump"] = options->minidumpPath; diff --git a/external/breakpad/breakpad-wshadow.patch.1 b/external/breakpad/breakpad-wshadow.patch.1 new file mode 100644 index 000000000..d696e5bde --- /dev/null +++ b/external/breakpad/breakpad-wshadow.patch.1 @@ -0,0 +1,232 @@ +Only in breakpad: breakpad-client.pc +Only in breakpad: breakpad.pc +Only in breakpad: build.log +Only in breakpad: config.log +Only in breakpad: config.status +Only in breakpad: Makefile +Only in breakpad/src/client: .deps +Only in breakpad/src/client: .dirstamp +Only in breakpad/src/client/linux/crash_generation: crash_generation_client.o +Only in breakpad/src/client/linux/crash_generation: crash_generation_server.o +Only in breakpad/src/client/linux/crash_generation: .deps +Only in breakpad/src/client/linux/crash_generation: .dirstamp +Only in breakpad/src/client/linux: .dirstamp +Only in breakpad/src/client/linux/dump_writer_common: .deps +Only in breakpad/src/client/linux/dump_writer_common: .dirstamp +Only in breakpad/src/client/linux/dump_writer_common: thread_info.o +Only in breakpad/src/client/linux/dump_writer_common: ucontext_reader.o +Only in breakpad/src/client/linux/handler: .deps +Only in breakpad/src/client/linux/handler: .dirstamp +Only in breakpad/src/client/linux/handler: exception_handler.o +diff -ur breakpad.org/src/client/linux/handler/minidump_descriptor.h breakpad/src/client/linux/handler/minidump_descriptor.h +--- breakpad.org/src/client/linux/handler/minidump_descriptor.h 2016-02-07 19:22:24.329411023 +0100 ++++ breakpad/src/client/linux/handler/minidump_descriptor.h 2016-02-07 19:24:28.600438386 +0100 +@@ -55,18 +55,18 @@ + fd_(-1), + size_limit_(-1) {} + +- explicit MinidumpDescriptor(const string& directory) ++ explicit MinidumpDescriptor(const string& dir) + : mode_(kWriteMinidumpToFile), + fd_(-1), +- directory_(directory), ++ directory_(dir), + c_path_(NULL), + size_limit_(-1) { + assert(!directory.empty()); + } + +- explicit MinidumpDescriptor(int fd) ++ explicit MinidumpDescriptor(int file_descriptor) + : mode_(kWriteMinidumpToFd), +- fd_(fd), ++ fd_(file_descriptor), + c_path_(NULL), + size_limit_(-1) { + assert(fd != -1); +Only in breakpad/src/client/linux/handler: .minidump_descriptor.h.un~ +Only in breakpad/src/client/linux/handler: minidump_descriptor.o +Only in breakpad/src/client/linux: libbreakpad_client.a +Only in breakpad/src/client/linux: linux_dumper_unittest_helper +Only in breakpad/src/client/linux/log: .deps +Only in breakpad/src/client/linux/log: .dirstamp +Only in breakpad/src/client/linux/log: log.o +Only in breakpad/src/client/linux/microdump_writer: .deps +Only in breakpad/src/client/linux/microdump_writer: .dirstamp +Only in breakpad/src/client/linux/microdump_writer: microdump_writer.o +Only in breakpad/src/client/linux/minidump_writer: .deps +Only in breakpad/src/client/linux/minidump_writer: .dirstamp +Only in breakpad/src/client/linux/minidump_writer: linux_core_dumper.o +diff -ur breakpad.org/src/client/linux/minidump_writer/linux_dumper.h breakpad/src/client/linux/minidump_writer/linux_dumper.h +--- breakpad.org/src/client/linux/minidump_writer/linux_dumper.h 2016-02-07 19:22:24.330410999 +0100 ++++ breakpad/src/client/linux/minidump_writer/linux_dumper.h 2016-02-07 19:26:10.870017835 +0100 +@@ -130,15 +130,15 @@ + uint8_t identifier[sizeof(MDGUID)]); + + uintptr_t crash_address() const { return crash_address_; } +- void set_crash_address(uintptr_t crash_address) { +- crash_address_ = crash_address; ++ void set_crash_address(uintptr_t crash_addr) { ++ crash_address_ = crash_addr; + } + + int crash_signal() const { return crash_signal_; } +- void set_crash_signal(int crash_signal) { crash_signal_ = crash_signal; } ++ void set_crash_signal(int crash_sig) { crash_signal_ = crash_sig; } + + pid_t crash_thread() const { return crash_thread_; } +- void set_crash_thread(pid_t crash_thread) { crash_thread_ = crash_thread; } ++ void set_crash_thread(pid_t thread) { crash_thread_ = thread; } + + // Extracts the effective path and file name of from |mapping|. In most cases + // the effective name/path are just the mapping's path and basename. In some +Only in breakpad/src/client/linux/minidump_writer: .linux_dumper.h.un~ +Only in breakpad/src/client/linux/minidump_writer: linux_dumper.o +Only in breakpad/src/client/linux/minidump_writer: linux_ptrace_dumper.o +Only in breakpad/src/client/linux/minidump_writer: minidump_writer.o +Only in breakpad/src/client/linux/minidump_writer: src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.o +Only in breakpad/src/client: minidump_file_writer.o +Only in breakpad/src/common/android: .deps +Only in breakpad/src/common: convert_UTF.o +Only in breakpad/src/common: .deps +Only in breakpad/src/common: .dirstamp +Only in breakpad/src/common/dwarf: bytereader.o +Only in breakpad/src/common/dwarf: .deps +Only in breakpad/src/common/dwarf: .dirstamp +Only in breakpad/src/common/dwarf: dwarf2diehandler.o +Only in breakpad/src/common/dwarf: dwarf2reader.o +Only in breakpad/src/common/dwarf: src_tools_mac_dump_syms_dump_syms-bytereader.o +Only in breakpad/src/common/dwarf: src_tools_mac_dump_syms_dump_syms-dwarf2diehandler.o +Only in breakpad/src/common/dwarf: src_tools_mac_dump_syms_dump_syms-dwarf2reader.o +Only in breakpad/src/common: dwarf_cfi_to_module.o +Only in breakpad/src/common: dwarf_cu_to_module.o +Only in breakpad/src/common: dwarf_line_to_module.o +Only in breakpad/src/common: language.o +Only in breakpad/src/common/linux: crc32.o +Only in breakpad/src/common/linux: .deps +Only in breakpad/src/common/linux: .dirstamp +Only in breakpad/src/common/linux: dump_symbols.o +Only in breakpad/src/common/linux: elf_core_dump.o +Only in breakpad/src/common/linux: elf_symbols_to_module.o +Only in breakpad/src/common/linux: elfutils.o +Only in breakpad/src/common/linux: file_id.o +Only in breakpad/src/common/linux: guid_creator.o +Only in breakpad/src/common/linux: http_upload.o +Only in breakpad/src/common/linux: linux_libc_support.o +Only in breakpad/src/common/linux: memory_mapped_file.o +Only in breakpad/src/common/linux: safe_readlink.o +Only in breakpad/src/common/linux/tests: .deps +Only in breakpad/src/common/mac: .deps +Only in breakpad/src/common/mac: .dirstamp +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-arch_utilities.o +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-dump_syms.o +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-file_id.o +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-macho_id.o +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-macho_reader.o +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-macho_utilities.o +Only in breakpad/src/common/mac: src_tools_mac_dump_syms_dump_syms-macho_walker.o +Only in breakpad/src/common: md5.o +Only in breakpad/src/common: module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-dwarf_cfi_to_module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-dwarf_cu_to_module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-dwarf_line_to_module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-language.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-md5.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-stabs_reader.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-stabs_to_module.o +Only in breakpad/src/common: stabs_reader.o +Only in breakpad/src/common: stabs_to_module.o +Only in breakpad/src/common: string_conversion.o +Only in breakpad/src/common/tests: .deps +Only in breakpad/src: config.h +Only in breakpad/src: .dirstamp +Only in breakpad/src: libbreakpad.a +Only in breakpad/src/processor: basic_code_modules.o +Only in breakpad/src/processor: basic_source_line_resolver.o +Only in breakpad/src/processor: call_stack.o +Only in breakpad/src/processor: cfi_frame_info.o +Only in breakpad/src/processor: .deps +Only in breakpad/src/processor: .dirstamp +Only in breakpad/src/processor: disassembler_x86.o +Only in breakpad/src/processor: dump_context.o +Only in breakpad/src/processor: dump_object.o +Only in breakpad/src/processor: exploitability_linux.o +Only in breakpad/src/processor: exploitability.o +Only in breakpad/src/processor: exploitability_win.o +Only in breakpad/src/processor: fast_source_line_resolver.o +Only in breakpad/src/processor: logging.o +Only in breakpad/src/processor: microdump.o +Only in breakpad/src/processor: microdump_processor.o +Only in breakpad/src/processor: microdump_stackwalk +Only in breakpad/src/processor: microdump_stackwalk.o +Only in breakpad/src/processor: minidump_dump +Only in breakpad/src/processor: minidump_dump.o +Only in breakpad/src/processor: minidump.o +Only in breakpad/src/processor: minidump_processor.o +Only in breakpad/src/processor: minidump_stackwalk +Only in breakpad/src/processor: minidump_stackwalk.o +Only in breakpad/src/processor: module_comparer.o +Only in breakpad/src/processor: module_serializer.o +Only in breakpad/src/processor: pathname_stripper.o +Only in breakpad/src/processor: process_state.o +Only in breakpad/src/processor: proc_maps_linux.o +Only in breakpad/src/processor: simple_symbol_supplier.o +Only in breakpad/src/processor: source_line_resolver_base.o +Only in breakpad/src/processor: stack_frame_cpu.o +Only in breakpad/src/processor: stack_frame_symbolizer.o +Only in breakpad/src/processor: stackwalk_common.o +Only in breakpad/src/processor: stackwalker_address_list.o +Only in breakpad/src/processor: stackwalker_amd64.o +Only in breakpad/src/processor: stackwalker_arm64.o +Only in breakpad/src/processor: stackwalker_arm.o +Only in breakpad/src/processor: stackwalker_mips.o +Only in breakpad/src/processor: stackwalker.o +Only in breakpad/src/processor: stackwalker_ppc64.o +Only in breakpad/src/processor: stackwalker_ppc.o +Only in breakpad/src/processor: stackwalker_sparc.o +Only in breakpad/src/processor: stackwalker_x86.o +Only in breakpad/src/processor: symbolic_constants_win.o +Only in breakpad/src/processor: tokenize.o +Only in breakpad/src: stamp-h1 +Only in breakpad/src/testing/gtest/src: .deps +Only in breakpad/src/testing/src: .deps +Only in breakpad/src/third_party/libdisasm: .deps +Only in breakpad/src/third_party/libdisasm: .dirstamp +Only in breakpad/src/third_party/libdisasm: ia32_implicit.o +Only in breakpad/src/third_party/libdisasm: ia32_insn.o +Only in breakpad/src/third_party/libdisasm: ia32_invariant.o +Only in breakpad/src/third_party/libdisasm: ia32_modrm.o +Only in breakpad/src/third_party/libdisasm: ia32_opcode_tables.o +Only in breakpad/src/third_party/libdisasm: ia32_operand.o +Only in breakpad/src/third_party/libdisasm: ia32_reg.o +Only in breakpad/src/third_party/libdisasm: ia32_settings.o +Only in breakpad/src/third_party/libdisasm: libdisasm.a +Only in breakpad/src/third_party/libdisasm: x86_disasm.o +Only in breakpad/src/third_party/libdisasm: x86_format.o +Only in breakpad/src/third_party/libdisasm: x86_imm.o +Only in breakpad/src/third_party/libdisasm: x86_insn.o +Only in breakpad/src/third_party/libdisasm: x86_misc.o +Only in breakpad/src/third_party/libdisasm: x86_operand_list.o +Only in breakpad/src/tools/linux/core2md: core2md +Only in breakpad/src/tools/linux/core2md: core2md.o +Only in breakpad/src/tools/linux/core2md: .deps +Only in breakpad/src/tools/linux/core2md: .dirstamp +Only in breakpad/src/tools/linux/dump_syms: .deps +Only in breakpad/src/tools/linux/dump_syms: .dirstamp +Only in breakpad/src/tools/linux/dump_syms: dump_syms +Only in breakpad/src/tools/linux/dump_syms: dump_syms.o +Only in breakpad/src/tools/linux/md2core: .deps +Only in breakpad/src/tools/linux/md2core: .dirstamp +Only in breakpad/src/tools/linux/md2core: minidump-2-core +Only in breakpad/src/tools/linux/md2core: minidump-2-core.o +Only in breakpad/src/tools/linux/symupload: .deps +Only in breakpad/src/tools/linux/symupload: .dirstamp +Only in breakpad/src/tools/linux/symupload: minidump_upload +Only in breakpad/src/tools/linux/symupload: minidump_upload.o +Only in breakpad/src/tools/linux/symupload: sym_upload +Only in breakpad/src/tools/linux/symupload: sym_upload.o +Only in breakpad/src/tools/mac/dump_syms: .deps +Only in breakpad/src/tools/mac/dump_syms: .dirstamp +Only in breakpad/src/tools/mac/dump_syms: dump_syms +Only in breakpad/src/tools/mac/dump_syms: src_tools_mac_dump_syms_dump_syms-dump_syms_tool.o diff --git a/external/breakpad/breakpad-wshadow2.patch.1 b/external/breakpad/breakpad-wshadow2.patch.1 new file mode 100644 index 000000000..40267b3f7 --- /dev/null +++ b/external/breakpad/breakpad-wshadow2.patch.1 @@ -0,0 +1,144 @@ +Only in breakpad: breakpad-client.pc +Only in breakpad: breakpad.pc +Only in breakpad: build.log +Only in breakpad: config.log +Only in breakpad: config.status +Only in breakpad: Makefile +Only in breakpad/src/client: .deps +Only in breakpad/src/client: .dirstamp +Only in breakpad/src/client/linux/crash_generation: crash_generation_client.o +Only in breakpad/src/client/linux/crash_generation: .deps +Only in breakpad/src/client/linux/crash_generation: .dirstamp +Only in breakpad/src/client/linux: .dirstamp +Only in breakpad/src/client/linux/dump_writer_common: .deps +Only in breakpad/src/client/linux/dump_writer_common: .dirstamp +Only in breakpad/src/client/linux/dump_writer_common: thread_info.o +Only in breakpad/src/client/linux/dump_writer_common: ucontext_reader.o +Only in breakpad/src/client/linux/handler: .deps +Only in breakpad/src/client/linux/handler: .dirstamp +diff -ur breakpad.org/src/client/linux/handler/minidump_descriptor.h breakpad/src/client/linux/handler/minidump_descriptor.h +--- breakpad.org/src/client/linux/handler/minidump_descriptor.h 2016-02-07 19:28:40.335518286 +0100 ++++ breakpad/src/client/linux/handler/minidump_descriptor.h 2016-02-07 19:29:14.706713302 +0100 +@@ -61,7 +61,7 @@ + directory_(dir), + c_path_(NULL), + size_limit_(-1) { +- assert(!directory.empty()); ++ assert(!dir.empty()); + } + + explicit MinidumpDescriptor(int file_descriptor) +@@ -69,7 +69,7 @@ + fd_(file_descriptor), + c_path_(NULL), + size_limit_(-1) { +- assert(fd != -1); ++ assert(file_descriptor != -1); + } + + explicit MinidumpDescriptor(const MicrodumpOnConsole&) +Only in breakpad/src/client/linux/handler: .minidump_descriptor.h.un~ +Only in breakpad/src/client/linux/log: .deps +Only in breakpad/src/client/linux/log: .dirstamp +Only in breakpad/src/client/linux/log: log.o +Only in breakpad/src/client/linux/microdump_writer: .deps +Only in breakpad/src/client/linux/microdump_writer: .dirstamp +Only in breakpad/src/client/linux/minidump_writer: .deps +Only in breakpad/src/client/linux/minidump_writer: .dirstamp +Only in breakpad/src/client/linux/minidump_writer: linux_dumper.o +Only in breakpad/src/client/linux/minidump_writer: linux_ptrace_dumper.o +Only in breakpad/src/client: minidump_file_writer.o +Only in breakpad/src/common/android: .deps +Only in breakpad/src/common: convert_UTF.o +Only in breakpad/src/common: .deps +Only in breakpad/src/common: .dirstamp +Only in breakpad/src/common/dwarf: .deps +Only in breakpad/src/common/dwarf: .dirstamp +Only in breakpad/src/common/dwarf: src_tools_mac_dump_syms_dump_syms-bytereader.o +Only in breakpad/src/common/dwarf: src_tools_mac_dump_syms_dump_syms-dwarf2diehandler.o +Only in breakpad/src/common/dwarf: src_tools_mac_dump_syms_dump_syms-dwarf2reader.o +Only in breakpad/src/common: dwarf_cfi_to_module.o +Only in breakpad/src/common: dwarf_cu_to_module.o +Only in breakpad/src/common: dwarf_line_to_module.o +Only in breakpad/src/common: language.o +Only in breakpad/src/common/linux: crc32.o +Only in breakpad/src/common/linux: .deps +Only in breakpad/src/common/linux: .dirstamp +Only in breakpad/src/common/linux: dump_symbols.o +Only in breakpad/src/common/linux: elf_symbols_to_module.o +Only in breakpad/src/common/linux: http_upload.o +Only in breakpad/src/common/linux/tests: .deps +Only in breakpad/src/common/mac: .deps +Only in breakpad/src/common/mac: .dirstamp +Only in breakpad/src/common: module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-dwarf_cfi_to_module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-dwarf_cu_to_module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-dwarf_line_to_module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-language.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-md5.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-module.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-stabs_reader.o +Only in breakpad/src/common: src_tools_mac_dump_syms_dump_syms-stabs_to_module.o +Only in breakpad/src/common: stabs_reader.o +Only in breakpad/src/common: stabs_to_module.o +Only in breakpad/src/common/tests: .deps +Only in breakpad/src: config.h +Only in breakpad/src: .dirstamp +Only in breakpad/src/processor: basic_code_modules.o +Only in breakpad/src/processor: basic_source_line_resolver.o +Only in breakpad/src/processor: call_stack.o +Only in breakpad/src/processor: cfi_frame_info.o +Only in breakpad/src/processor: .deps +Only in breakpad/src/processor: .dirstamp +Only in breakpad/src/processor: disassembler_x86.o +Only in breakpad/src/processor: dump_context.o +Only in breakpad/src/processor: dump_object.o +Only in breakpad/src/processor: exploitability_linux.o +Only in breakpad/src/processor: exploitability.o +Only in breakpad/src/processor: exploitability_win.o +Only in breakpad/src/processor: fast_source_line_resolver.o +Only in breakpad/src/processor: logging.o +Only in breakpad/src/processor: microdump.o +Only in breakpad/src/processor: microdump_processor.o +Only in breakpad/src/processor: microdump_stackwalk.o +Only in breakpad/src/processor: minidump_dump.o +Only in breakpad/src/processor: minidump.o +Only in breakpad/src/processor: minidump_processor.o +Only in breakpad/src/processor: minidump_stackwalk.o +Only in breakpad/src/processor: module_comparer.o +Only in breakpad/src/processor: module_serializer.o +Only in breakpad/src/processor: pathname_stripper.o +Only in breakpad/src/processor: process_state.o +Only in breakpad/src/processor: proc_maps_linux.o +Only in breakpad/src/processor: simple_symbol_supplier.o +Only in breakpad/src/processor: source_line_resolver_base.o +Only in breakpad/src/processor: stack_frame_cpu.o +Only in breakpad/src/processor: stack_frame_symbolizer.o +Only in breakpad/src/processor: stackwalk_common.o +Only in breakpad/src/processor: stackwalker_address_list.o +Only in breakpad/src/processor: stackwalker_amd64.o +Only in breakpad/src/processor: stackwalker_arm64.o +Only in breakpad/src/processor: stackwalker_arm.o +Only in breakpad/src/processor: stackwalker_mips.o +Only in breakpad/src/processor: stackwalker.o +Only in breakpad/src/processor: stackwalker_ppc64.o +Only in breakpad/src/processor: stackwalker_ppc.o +Only in breakpad/src/processor: stackwalker_sparc.o +Only in breakpad/src/processor: stackwalker_x86.o +Only in breakpad/src/processor: symbolic_constants_win.o +Only in breakpad/src/processor: tokenize.o +Only in breakpad/src: stamp-h1 +Only in breakpad/src/testing/gtest/src: .deps +Only in breakpad/src/testing/src: .deps +Only in breakpad/src/third_party/libdisasm: .deps +Only in breakpad/src/third_party/libdisasm: .dirstamp +Only in breakpad/src/tools/linux/core2md: .deps +Only in breakpad/src/tools/linux/core2md: .dirstamp +Only in breakpad/src/tools/linux/dump_syms: .deps +Only in breakpad/src/tools/linux/dump_syms: .dirstamp +Only in breakpad/src/tools/linux/md2core: .deps +Only in breakpad/src/tools/linux/md2core: .dirstamp +Only in breakpad/src/tools/linux/symupload: .deps +Only in breakpad/src/tools/linux/symupload: .dirstamp +Only in breakpad/src/tools/mac/dump_syms: .deps +Only in breakpad/src/tools/mac/dump_syms: .dirstamp diff --git a/external/breakpad/c++20-allocator.patch b/external/breakpad/c++20-allocator.patch new file mode 100644 index 000000000..588d7db4d --- /dev/null +++ b/external/breakpad/c++20-allocator.patch @@ -0,0 +1,11 @@ +--- src/common/memory.h ++++ src/common/memory.h +@@ -162,7 +162,7 @@ + // Wrapper to use with STL containers + template + struct PageStdAllocator : public std::allocator { +- typedef typename std::allocator::pointer pointer; ++ typedef T* pointer; + typedef typename std::allocator::size_type size_type; + + explicit PageStdAllocator(PageAllocator& allocator): allocator_(allocator) {} diff --git a/external/breakpad/ubsan.patch b/external/breakpad/ubsan.patch new file mode 100644 index 000000000..f4204516e --- /dev/null +++ b/external/breakpad/ubsan.patch @@ -0,0 +1,21 @@ +--- src/client/linux/minidump_writer/directory_reader.h ++++ src/client/linux/minidump_writer/directory_reader.h +@@ -96,7 +96,7 @@ + const int fd_; + bool hit_eof_; + unsigned buf_used_; +- uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1]; ++ uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1] __attribute__ ((aligned (__BIGGEST_ALIGNMENT__))); + }; + + } // namespace google_breakpad +--- src/common/memory.h ++++ src/common/memory.h +@@ -75,6 +75,7 @@ + if (!bytes) + return NULL; + ++ bytes = (bytes + (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 1); + if (current_page_ && page_size_ - page_offset_ >= bytes) { + uint8_t *const ret = current_page_ + page_offset_; + page_offset_ += bytes; diff --git a/external/breakpad/ucontext.patch b/external/breakpad/ucontext.patch new file mode 100644 index 000000000..a108ae11c --- /dev/null +++ b/external/breakpad/ucontext.patch @@ -0,0 +1,194 @@ +--- src/client/linux/dump_writer_common/ucontext_reader.cc ++++ src/client/linux/dump_writer_common/ucontext_reader.cc +@@ -40,15 +40,15 @@ + + #if defined(__i386__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_ESP]; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_EIP]; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct _libc_fpstate* fp) { + const greg_t* regs = uc->uc_mcontext.gregs; + +@@ -88,15 +88,15 @@ + + #elif defined(__x86_64) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_RSP]; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_RIP]; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct _libc_fpstate* fpregs) { + const greg_t* regs = uc->uc_mcontext.gregs; + +@@ -145,15 +145,15 @@ + + #elif defined(__ARM_EABI__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.arm_sp; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.arm_pc; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { + out->context_flags = MD_CONTEXT_ARM_FULL; + + out->iregs[0] = uc->uc_mcontext.arm_r0; +@@ -184,15 +184,15 @@ + + #elif defined(__aarch64__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.sp; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.pc; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct fpsimd_context* fpregs) { + out->context_flags = MD_CONTEXT_ARM64_FULL; + +@@ -210,15 +210,15 @@ + + #elif defined(__mips__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.pc; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { + out->context_flags = MD_CONTEXT_MIPS_FULL; + + for (int i = 0; i < MD_CONTEXT_MIPS_GPR_COUNT; ++i) +--- src/client/linux/dump_writer_common/ucontext_reader.h ++++ src/client/linux/dump_writer_common/ucontext_reader.h +@@ -41,21 +41,21 @@ + + // Wraps platform-dependent implementations of accessors to ucontext structs. + struct UContextReader { +- static uintptr_t GetStackPointer(const struct ucontext* uc); ++ static uintptr_t GetStackPointer(const ucontext_t* uc); + +- static uintptr_t GetInstructionPointer(const struct ucontext* uc); ++ static uintptr_t GetInstructionPointer(const ucontext_t* uc); + + // Juggle a arch-specific ucontext into a minidump format + // out: the minidump structure + // info: the collection of register structures. + #if defined(__i386__) || defined(__x86_64) +- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, ++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct _libc_fpstate* fp); + #elif defined(__aarch64__) +- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, ++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct fpsimd_context* fpregs); + #else +- static void FillCPUContext(RawContextCPU *out, const ucontext *uc); ++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); + #endif + }; + +--- src/client/linux/handler/exception_handler.cc ++++ src/client/linux/handler/exception_handler.cc +@@ -439,9 +439,9 @@ + // Fill in all the holes in the struct to make Valgrind happy. + memset(&g_crash_context_, 0, sizeof(g_crash_context_)); + memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); +- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); ++ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t)); + #if defined(__aarch64__) +- struct ucontext* uc_ptr = (struct ucontext*)uc; ++ ucontext_t* uc_ptr = (ucontext_t*)uc; + struct fpsimd_context* fp_ptr = + (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; + if (fp_ptr->head.magic == FPSIMD_MAGIC) { +@@ -450,9 +450,9 @@ + } + #elif !defined(__ARM_EABI__) && !defined(__mips__) + // FP state is not part of user ABI on ARM Linux. +- // In case of MIPS Linux FP state is already part of struct ucontext ++ // In case of MIPS Linux FP state is already part of ucontext_t + // and 'float_state' is not a member of CrashContext. +- struct ucontext* uc_ptr = (struct ucontext*)uc; ++ ucontext_t* uc_ptr = (ucontext_t*)uc; + if (uc_ptr->uc_mcontext.fpregs) { + memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, + sizeof(g_crash_context_.float_state)); +@@ -476,7 +476,7 @@ + // ExceptionHandler::HandleSignal(). + siginfo.si_code = SI_USER; + siginfo.si_pid = getpid(); +- struct ucontext context; ++ ucontext_t context; + getcontext(&context); + return HandleSignal(sig, &siginfo, &context); + } +--- src/client/linux/handler/exception_handler.h ++++ src/client/linux/handler/exception_handler.h +@@ -191,7 +191,7 @@ + struct CrashContext { + siginfo_t siginfo; + pid_t tid; // the crashing thread. +- struct ucontext context; ++ ucontext_t context; + #if !defined(__ARM_EABI__) && !defined(__mips__) + // #ifdef this out because FP state is not part of user ABI for Linux ARM. + // In case of MIPS Linux FP state is already part of struct +--- src/client/linux/microdump_writer/microdump_writer.cc ++++ src/client/linux/microdump_writer/microdump_writer.cc +@@ -395,7 +395,7 @@ + + void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } + +- const struct ucontext* const ucontext_; ++ const ucontext_t* const ucontext_; + #if !defined(__ARM_EABI__) && !defined(__mips__) + const google_breakpad::fpstate_t* const float_state_; + #endif +--- src/client/linux/minidump_writer/minidump_writer.cc ++++ src/client/linux/minidump_writer/minidump_writer.cc +@@ -1238,7 +1238,7 @@ + const int fd_; // File descriptor where the minidum should be written. + const char* path_; // Path to the file where the minidum should be written. + +- const struct ucontext* const ucontext_; // also from the signal handler ++ const ucontext_t* const ucontext_; // also from the signal handler + #if !defined(__ARM_EABI__) && !defined(__mips__) + const google_breakpad::fpstate_t* const float_state_; // ditto + #endif -- cgit v1.2.3