community/chromium: upgrade to 63.0.3239.108

This commit is contained in:
Natanael Copa 2017-12-20 10:13:05 +00:00
parent bf9c09bac7
commit 72f1de5cd8
10 changed files with 144 additions and 290 deletions

View File

@ -1,7 +1,7 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=chromium
pkgver=61.0.3163.100
pkgver=63.0.3239.108
pkgrel=0
pkgdesc="chromium web browser"
url="http://www.chromium.org/"
@ -74,7 +74,7 @@ install=""
# explicit depends for --headless
depends="eudev-libs ttf-opensans"
options=suid
subpackages="$pkgname-doc $pkgname-chromedriver"
subpackages="$pkgname-chromedriver"
source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
pstables-2.8.h::http://git.savannah.gnu.org/cgit/freetype/freetype2.git/plain/src/psnames/pstables.h?h=VER-2-8
chromium-launcher.sh
@ -88,25 +88,22 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
gn_bootstrap.patch
last-commit-position.patch
musl-fixes.patch
musl-fixes-breakpad.patch
musl-hacks.patch
musl-libc++.patch
musl-sandbox.patch
no-execinfo.patch
no-getcontext.patch
no-mallinfo.patch
resolver.patch
unset-madv_free.patch
swiftshader.patch
secure_getenv.patch
gcc-fixes.patch
fix-atk.patch
chromium-webrtc-r0.patch
chromium-48.0.2564.116-libusb_interrupt_event_handler.patch
chromium-60.0.3112.78-gn-system.patch
chromium-60.0.3112.78-jpeg-nomangle.patch
chromium-60.0.3112.78-no-libpng-prefix.patch
chromium-60.0.3112.78-no-zlib-mangle.patch
chromium-61.0.3163.79-gcc5-r1.patch
chromium-61.0.3163.79-gtk2fix.patch
"
builddir="$srcdir"/$pkgname-$pkgver
@ -155,8 +152,6 @@ build() {
# reusable system library settings
local use_system="
flac
freetype
harfbuzz-ng
libdrm
libjpeg
libpng
@ -244,6 +239,9 @@ build() {
# build mksnapshot and paxmark it
ninja -C out/$_buildtype mksnapshot
paxmark -m out/$_buildtype/mksnapshot
ninja -C out/$_buildtype v8_context_snapshot_generator
paxmark -m out/Release/v8_context_snapshot_generator \
out/Release/obj/tools/v8_context_snapshot/v8_context_snapshot_generator
# finish rest of the build
ninja -C out/$_buildtype chrome chrome_sandbox chromedriver
@ -277,12 +275,6 @@ package() {
cp -r out/$_buildtype/locales "$pkgdir"/usr/lib/$pkgname/
install -Dm644 out/$_buildtype/chrome.1 \
"$pkgdir"/usr/share/man/man1/chrome.1
install -Dm644 out/$_buildtype/chrome.1 \
"$pkgdir"/usr/share/man/man1/chromium.1
# It is important that we name the target "chromium-browser",
# xdg-utils expect it; bug #355517.
mkdir -p "$pkgdir"/usr/bin
@ -319,7 +311,7 @@ chromedriver() {
mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin
}
sha512sums="4dfd3a493ceb7c605eeab6f387541273d529e8b935a6104927e34836469aedcfcbb4a1154591585621d5c2e842e68701d32328acba842f840a20498822165f78 chromium-61.0.3163.100.tar.xz
sha512sums="3cb7c8569d2d061f5abf4ad68d9ea1716a1b07bdf8dfa7b600d558d308374ff5dbda9f947e67e21186e3e716fe9524fc63e8eabd9eac1fa805f0eb7d994c32c8 chromium-63.0.3239.108.tar.xz
a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h
b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh
f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf
@ -328,25 +320,22 @@ e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b3
55921cc33d623e0751e94d4fef2ddd69afb57381da6115995b1f318e2398978b9173e80f6ffbc6e6c0c0c55a04e934e0e34a46c32e03947cc31f0f5a226e7725 chromium-widevine.patch
05fb6d9434565a7a73f5c18d470ae600bf4afbe15d0e4a7c2770bf2596a0bd2788cdfeb37e0b566fc3d26ff2d0791b70488b2c184e3286cff5a1fa25e17582cd default-pthread-stacksize.patch
88928afcc33843e17daa082435a4b88c2106b0252a202ad19f684021c027859366a0c12970700c0d1b010211eef95d295362dc6afdea1b00199dd8d2efbdcfe7 gcc6.patch
902aeffaf0a755dd856a7d96c390adafd53ff23aed0a3693acc86a680d8c001f0f565f50caafd8bac4bba6f5e04011ebd9c27cda3264fd2ffc27df2803b738b1 gn_bootstrap.patch
f420f6b4827da4dbd416b2de094452917313cb79e01d33a07029589066a0b79e06446882f1ade5ac418f180ae581937d620d1d48698df77b5c5ddb4a3d6cf680 gn_bootstrap.patch
8fbfd67a0b6bbdf08364e810bd85b4a80dda9af73fefe3aba8010d9b33022d458a785c628515bbda9c743b8a0293d57cfe18fcc5aa2313c845c6fb948c2335f9 last-commit-position.patch
c78e868ec5b902e5fd5febca8aaf9649bd598c747d8e260683552d29bb322e2e4cb1e71d92750e3209096e24416297396cca47a6a855b657cb7685b39d06b0f0 musl-fixes.patch
ca73f4912c4e41a235821fba5f3a7a5266739ce86dc1b27bc07d6bc2f97dc97b15b2fa47dc95c7a82a7e0b8fa1e6a17071f6dc06ddf47f65a56f216c0aaaf054 musl-fixes.patch
90efbc89151c77f32434364dcbaabaf9d9a207f4a77f147cd51b3fe100832fbfb3a9fb665303a79a3d788e400f4f41890de202ccbb7bd1fc6252e33c6e74e429 musl-fixes-breakpad.patch
507a8db2317f1f6ec18dec6cb5894b716e9b2542b58887bab9319bc6d4c66fe4a4d09b200ca8e3f11b32e380b282442a27e7a1b358d3c25eef0fa7655e9dc134 musl-hacks.patch
c38e3e30512f6f5d494bcd905b314dea52e09214f8fc779b66193f5eb3af8f1afb5cdf2d096aa4590e6a1dd28c289d26812d7268abf4459209fb8bdc8806a0be musl-libc++.patch
9b75d6ac720d1b8ddc597f0f472bc400ff866a733f12b3a4cd3e7e18e724549c5f8e056c7e0d0462ef083bff5e677f8cef6b89b22f4740a40ad6398978269373 musl-sandbox.patch
fe2cee01d07e5dc638dad0c5453397eb03e30867c1e54591d7f612034366c96ccaa35216d2bcedbe796863eeb5b90dcf71c75e5391c266df4cb27b44e59bb040 no-execinfo.patch
a57858e45cfbb7e97f77b3b308502e377543d61d3d0085798ed73bc53da456828f5e010308d0de05fee4fe52071362d074f5af205f98f41d67222d997857d626 no-getcontext.patch
7a3a4ba4479a22a13126a78ad3d9991188ef030389026c4293d45b4440711751d68e43d28687653d5670d7f00ed5f1b820a8df50a3a08ce06e454f0cad9dbd3c no-mallinfo.patch
ac0c9d7780ac897ea8ad5d909616d3aa29eed720353c7a660c850ee1404c80f51f5db274b3c5d3c730561a7c3cd138624e1901ece329926b5dc5ca15195d9abf resolver.patch
27dd7916be3324294a0a913c43c856e9c00be767a2aec4f3da2455fb84e74ebb0017d1aa586b40dd9d989ada6b60fc531522f503d57e04324726a2171bf3a85e unset-madv_free.patch
6b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch
67eea8e13c85aca7db5c85f5b0d33e5798e8063ab7f5b2f0a5c7f6fee8266e58bee4e72f4542472ef6634634ca0f4359a2d1113fa310a991373404320c784730 secure_getenv.patch
0d6935117e3531a33aab5d09093e854c7e82e799340222cd75e3a1d7e054fbe02524f59c56d01a36649da5c89042a6ce7af2313917d3d5a3947ee7c890b99ba6 gcc-fixes.patch
aa44cbc1857f407d897fba8c64faa6401aa9c30f4de0a6c79e0fb63086b0ee518e411335a53c0bd75c3023f3f064aff57270a47ffe4f8f31c251aa318570e0c2 fix-atk.patch
e4963e60d46eba748ab5b54d08fe0ca5469d2db7b985f11fd3f4fc334608b84aae3da46eeaff8c1734ff35792c06dc42cdda6610c86dd0eff28465cf7c146bca chromium-webrtc-r0.patch
2e9496aa9ccd6fed2d0df4b659d55e87abb67b1be4e3cc7cb0483ccb458b9071bed9939132a2345bf15192b4dcfe5da9474d7f653ae2f4b4d46d2f3c032b3a3f chromium-48.0.2564.116-libusb_interrupt_event_handler.patch
197ca3fd315e15c3e0b796615afbd01f65e2040027a2cde6304dea500cfaf18372ce2be88f4030bcd26651b913dd4af741a4df8803cdf9ff062a8eef9ab6c5db chromium-60.0.3112.78-gn-system.patch
e9fcc976d2ac1b2e73d310790e76dae15111e78cd8e3efa5febd702fd9492d7d68b1b57d95bca88d5e16c0627594a00ebdeaf570df52be6e9b23a4212906c141 chromium-60.0.3112.78-jpeg-nomangle.patch
9b08e895826fdd14fd6334662b8d07807beabab7368f3fcff3fcebe76baba4c7714c55042b379da6dab1ea0b1c4e5d657bf972b644089f00b418b7c2f5b6ef1b chromium-60.0.3112.78-no-libpng-prefix.patch
87a0c6ff4906f0c4b6f6b471ec9bf0b2e2d28431122e99a68f957474cf27ec6b073ebca14660c8858817219521d74a184b8444cf2885db21d28fa4599fcaa66f chromium-60.0.3112.78-no-zlib-mangle.patch
b39701c208d2786cc4b68ea033807a8663358173442ce0884dbfdebaa4b784d3eae8d7c1fe96c71ce8919fea35c50e1951c6a12193c23ae3e520604b3374ca38 chromium-61.0.3163.79-gcc5-r1.patch
3820f10d6c857d2727bcb862745d4f00b217c585e7a19db56c390c3331939fdf22bee758c3ccfb4b360d75a1c05b65e3406fd27a23d69492f86d907830223063 chromium-61.0.3163.79-gtk2fix.patch"
87a0c6ff4906f0c4b6f6b471ec9bf0b2e2d28431122e99a68f957474cf27ec6b073ebca14660c8858817219521d74a184b8444cf2885db21d28fa4599fcaa66f chromium-60.0.3112.78-no-zlib-mangle.patch"

View File

@ -1,67 +0,0 @@
diff -up chromium-61.0.3163.79/chrome/browser/devtools/devtools_file_system_indexer.cc.gcc5fix chromium-61.0.3163.79/chrome/browser/devtools/devtools_file_system_indexer.cc
--- chrome/browser/devtools/devtools_file_system_indexer.cc.gcc5fix 2017-09-06 16:32:34.496782451 -0400
+++ chrome/browser/devtools/devtools_file_system_indexer.cc 2017-09-06 16:33:22.053865242 -0400
@@ -34,7 +34,6 @@ using base::TimeDelta;
using base::TimeTicks;
using content::BrowserThread;
using std::map;
-using std::set;
using std::string;
using std::vector;
@@ -191,7 +190,7 @@ vector<FilePath> Index::Search(const str
if (trigram != kUndefinedTrigram)
trigrams.push_back(trigram);
}
- set<FileId> file_ids;
+ std::set<FileId> file_ids;
bool first = true;
vector<Trigram>::const_iterator it = trigrams.begin();
for (; it != trigrams.end(); ++it) {
@@ -203,7 +202,7 @@ vector<FilePath> Index::Search(const str
first = false;
continue;
}
- set<FileId> intersection = base::STLSetIntersection<set<FileId> >(
+ std::set<FileId> intersection = base::STLSetIntersection<std::set<FileId> >(
file_ids, index_[trigram]);
file_ids.swap(intersection);
}
diff -up chromium-61.0.3163.79/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h.gcc5fix chromium-61.0.3163.79/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
--- third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h.gcc5fix 2017-09-06 16:33:35.213611900 -0400
+++ third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h 2017-09-06 16:34:34.471469606 -0400
@@ -63,7 +63,7 @@ class WTF_EXPORT ArrayBufferContents {
allocation_length_(0),
data_(data),
data_length_(0),
- kind_(AllocationKind::kNormal),
+ kind_(WTF::ArrayBufferContents::AllocationKind::kNormal),
deleter_(deleter) {}
DataHandle(void* allocation_base,
size_t allocation_length,
@@ -94,11 +94,11 @@ class WTF_EXPORT ArrayBufferContents {
reinterpret_cast<uintptr_t>(allocation_base_) +
allocation_length_);
switch (kind_) {
- case AllocationKind::kNormal:
+ case WTF::ArrayBufferContents::AllocationKind::kNormal:
DCHECK(deleter_);
deleter_(data_);
return;
- case AllocationKind::kReservation:
+ case WTF::ArrayBufferContents::AllocationKind::kReservation:
ReleaseReservedMemory(allocation_base_, allocation_length_);
return;
}
diff -up chromium-61.0.3163.79/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc.gcc5fix chromium-61.0.3163.79/third_party/webrtc/modules/audio_processing/aec3/aec_state.cc
--- third_party/webrtc/modules/audio_processing/aec3/aec_state.cc.gcc5fix 2017-09-06 16:34:51.959131969 -0400
+++ third_party/webrtc/modules/audio_processing/aec3/aec_state.cc 2017-09-06 16:35:03.027919336 -0400
@@ -10,7 +10,7 @@
#include "webrtc/modules/audio_processing/aec3/aec_state.h"
-#include <math.h>
+#include <cmath>
#include <numeric>
#include <vector>

View File

@ -1,23 +0,0 @@
diff -up chromium-61.0.3163.79/chrome/browser/ui/libgtkui/gtk_ui.cc.gtk2fix chromium-61.0.3163.79/chrome/browser/ui/libgtkui/gtk_ui.cc
--- chromium-61.0.3163.79/chrome/browser/ui/libgtkui/gtk_ui.cc.gtk2fix 2017-09-07 15:40:40.904966476 -0400
+++ chrome/browser/ui/libgtkui/gtk_ui.cc 2017-09-07 15:42:23.829987464 -0400
@@ -1052,11 +1052,19 @@ float GtkUi::GetRawDeviceScaleFactor() {
if (display::Display::HasForceDeviceScaleFactor())
return display::Display::GetForcedDeviceScaleFactor();
+#if GTK_MAJOR_VERSION == 2
+ GtkSettings* gtk_settings = gtk_settings_get_default();
+ gint gtk_dpi = -1;
+ g_object_get(gtk_settings, "gtk-xft-dpi", &gtk_dpi, nullptr);
+ const float scale_factor = gtk_dpi / (1024 * kDefaultDPI);
+#else
GdkScreen* screen = gdk_screen_get_default();
gint scale = gtk_widget_get_scale_factor(fake_window_);
gdouble resolution = gdk_screen_get_resolution(screen);
const float scale_factor =
resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
+#endif
+
// Blacklist scaling factors <120% (crbug.com/484400) and round
// to 1 decimal to prevent rendering problems (crbug.com/485183).
return scale_factor < 1.2f ? 1.0f : roundf(scale_factor * 10) / 10;

View File

@ -0,0 +1,34 @@
From 7f90e2cceda0458cf56026eb6ccffb961a47804b Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri, 13 Oct 2017 15:49:32 +0200
Subject: [PATCH] IWYU: Include math.h for round(3).
math.h was being implicitly included, which can break the build with
alternative libc implementations.
Bug: None
Change-Id: I969b320b65d0f44abb33d3e1036cfbcb859a4952
Reviewed-on: https://webrtc-review.googlesource.com/9384
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#20292}
---
p2p/base/port.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/p2p/base/port.cc b/p2p/base/port.cc
index a1b478d11..81aa0aadb 100644
--- third_party/webrtc/p2p/base/port.cc
+++ third_party/webrtc/p2p/base/port.cc
@@ -10,6 +10,8 @@
#include "p2p/base/port.h"
+#include <math.h>
+
#include <algorithm>
#include <vector>
--
2.15.0.rc2

View File

@ -1,12 +0,0 @@
diff -up chromium-61.0.3163.79/content/browser/accessibility/browser_accessibility_auralinux.cc.fixvarname chromium-61.0.3163.79/content/browser/accessibility/browser_accessibility_auralinux.cc
--- content/browser/accessibility/browser_accessibility_auralinux.cc.fixvarname 2017-09-08 13:36:14.985804754 -0400
+++ content/browser/accessibility/browser_accessibility_auralinux.cc 2017-09-08 13:36:25.050611274 -0400
@@ -571,7 +571,7 @@ static AtkStateSet* browser_accessibilit
// it's best to leave this out rather than break people's builds:
#if defined(ATK_CHECK_VERSION)
#if ATK_CHECK_VERSION(2, 16, 0)
- atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY);
+ atk_state_set_add_state(state_set, ATK_STATE_READ_ONLY);
#endif
#endif
break;

View File

@ -1,48 +0,0 @@
diff -up chromium-61.0.3163.79/base/numerics/safe_math_clang_gcc_impl.h.fixgccagain chromium-61.0.3163.79/base/numerics/safe_math_clang_gcc_impl.h
--- chromium-61.0.3163.79/base/numerics/safe_math_clang_gcc_impl.h.fixgccagain 2017-09-06 15:48:27.560803028 -0400
+++ base/numerics/safe_math_clang_gcc_impl.h 2017-09-06 15:50:08.715853695 -0400
@@ -126,6 +126,7 @@ struct ClampedAddFastOp {
}
};
+#if defined(__clang__) // Not supported on GCC.
// This is the fastest negation on Intel, and a decent fallback on arm.
__attribute__((always_inline)) inline int8_t ClampedNegate(uint8_t value) {
uint8_t carry;
@@ -169,6 +170,7 @@ __attribute__((always_inline)) inline in
__attribute__((always_inline)) inline int64_t ClampedNegate(int64_t value) {
return ClampedNegate(static_cast<uint64_t>(value));
}
+#endif
template <typename T, typename U>
struct ClampedSubFastOp {
@@ -180,6 +182,7 @@ struct ClampedSubFastOp {
return ClampedSubFastAsmOp<T, U>::template Do<V>(x, y);
}
+#if defined(__clang__) // Not supported on GCC.
// Fast path for generic clamped negation.
if (std::is_same<T, U>::value && std::is_same<U, V>::value &&
IsCompileTimeConstant(x) && x == 0 && !IsCompileTimeConstant(y)) {
@@ -190,6 +193,7 @@ struct ClampedSubFastOp {
IntegerBitsPlusSign<T>::value, std::is_signed<T>::value>::type>(
y));
}
+#endif
V result;
return !__builtin_sub_overflow(x, y, &result)
diff -up chromium-61.0.3163.79/base/numerics/safe_math_shared_impl.h.fixgcc3 chromium-61.0.3163.79/base/numerics/safe_math_shared_impl.h
--- base/numerics/safe_math_shared_impl.h.fixgcc3 2017-09-06 16:30:15.898454585 -0400
+++ base/numerics/safe_math_shared_impl.h 2017-09-06 16:30:27.570229539 -0400
@@ -21,8 +21,7 @@
#if !defined(__native_client__) && \
((defined(__clang__) && \
((__clang_major__ > 3) || \
- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
- (defined(__GNUC__) && __GNUC__ >= 5))
+ (__clang_major__ == 3 && __clang_minor__ >= 4))))
#include "base/numerics/safe_math_clang_gcc_impl.h"
#define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
#else

View File

@ -2,14 +2,6 @@ diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index 1390560..5ce7832 100755
--- tools/gn/bootstrap/bootstrap.py
+++ tools/gn/bootstrap/bootstrap.py
@@ -20,6 +20,7 @@ import errno
import logging
import optparse
import os
+import platform
import shutil
import subprocess
import sys
@@ -31,6 +32,7 @@ SRC_ROOT = os.path.dirname(os.path.dirname(GN_ROOT))
is_win = sys.platform.startswith('win')
@ -36,23 +28,6 @@ index 1390560..5ce7832 100755
'base/at_exit.cc',
'base/base_paths.cc',
'base/base_switches.cc',
@@ -449,6 +449,7 @@ def write_gn_ninja(path, root_gen_dir, options):
'base/metrics/histogram_base.cc',
'base/metrics/histogram_functions.cc',
'base/metrics/histogram_samples.cc',
+ 'base/metrics/histogram_snapshot_manager.cc',
'base/metrics/metrics_hashes.cc',
'base/metrics/persistent_histogram_allocator.cc',
'base/metrics/persistent_memory_allocator.cc',
@@ -534,7 +535,7 @@ def write_gn_ninja(path, root_gen_dir, options):
'base/trace_event/heap_profiler_allocation_context_tracker.cc',
'base/trace_event/heap_profiler_allocation_register.cc',
'base/trace_event/heap_profiler_event_filter.cc',
- 'base/trace_event/heap_profiler_event_writer.cc',
+ 'base/trace_event/heap_profiler_heap_dump_writer.cc',
'base/trace_event/heap_profiler_serialization_state.cc',
'base/trace_event/heap_profiler_stack_frame_deduplicator.cc',
'base/trace_event/heap_profiler_type_name_deduplicator.cc',
@@ -653,10 +654,11 @@ def write_gn_ninja(path, root_gen_dir, options):
'base/threading/platform_thread_linux.cc',
])

View File

@ -0,0 +1,97 @@
diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
index 052ce37..95b0fb4 100644
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fp) {
+ const struct _fpstate* fp) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_X86_FULL |
@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fpregs) {
+ const struct _fpstate* fpregs) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_AMD64_FULL;
diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
index 2de80b7..4cf1377 100644
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
@@ -50,7 +50,7 @@ struct UContextReader {
// info: the collection of register structures.
#if defined(__i386__) || defined(__x86_64)
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fp);
+ const struct _fpstate* fp);
#elif defined(__aarch64__)
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct fpsimd_context* fpregs);
diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
index d1dc331..d1cc562 100644
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ ./third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
@@ -48,7 +48,7 @@ class ExceptionHandler;
#if defined(__aarch64__)
typedef struct fpsimd_context fpstate_t;
#elif !defined(__ARM_EABI__) && !defined(__mips__)
-typedef struct _libc_fpstate fpstate_t;
+typedef struct _fpstate fpstate_t;
#endif
// These entries store a list of memory regions that the client wants included
--- ./breakpad/src/common/linux/elf_core_dump.h.orig
+++ ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
@@ -36,6 +36,7 @@
#include <elf.h>
#include <link.h>
#include <stddef.h>
+#include <limits.h>
#include "common/memory_range.h"
@@ -51,9 +52,9 @@
typedef ElfW(Phdr) Phdr;
typedef ElfW(Word) Word;
typedef ElfW(Addr) Addr;
-#if __WORDSIZE == 32
+#if ULONG_MAX == 0xffffffff
static const int kClass = ELFCLASS32;
-#elif __WORDSIZE == 64
+#elif ULONG_MAX == 0xffffffffffffffff
static const int kClass = ELFCLASS64;
#else
#error "Unsupported __WORDSIZE for ElfCoreDump."
--- ./third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.orig
+++ ./third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -495,7 +495,9 @@
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
ucontext_t context;
+#if defined(__GLIBC__)
getcontext(&context);
+#endif
return HandleSignal(sig, &siginfo, &context);
}
@@ -680,9 +682,14 @@
sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
CrashContext context;
+
+#if defined(__GLIBC__)
int getcontext_result = getcontext(&context.context);
if (getcontext_result)
return false;
+#else
+ return false;
+#endif
#if defined(__i386__)
// In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved

View File

@ -13,70 +13,6 @@
/* End of x86-64 definitions */
#elif defined(__mips__)
#if _MIPS_SIM == _MIPS_SIM_ABI32
--- ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc.orig
+++ ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -49,7 +49,7 @@
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
- const struct _libc_fpstate* fp) {
+ const struct _fpstate* fp) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_X86_FULL |
@@ -97,7 +97,7 @@
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
- const struct _libc_fpstate* fpregs) {
+ const struct _fpstate* fpregs) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_AMD64_FULL;
--- ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.h.orig
+++ ./breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
@@ -50,7 +50,7 @@
// info: the collection of register structures.
#if defined(__i386__) || defined(__x86_64)
static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
- const struct _libc_fpstate* fp);
+ const struct _fpstate* fp);
#elif defined(__aarch64__)
static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
const struct fpsimd_context* fpregs);
--- ./breakpad/src/client/linux/minidump_writer/minidump_writer.h.orig
+++ ./breakpad/src/client/linux/minidump_writer/minidump_writer.h
@@ -48,7 +48,7 @@
#if defined(__aarch64__)
typedef struct fpsimd_context fpstate_t;
#elif !defined(__ARM_EABI__) && !defined(__mips__)
-typedef struct _libc_fpstate fpstate_t;
+typedef struct _fpstate fpstate_t;
#endif
// These entries store a list of memory regions that the client wants included
--- ./breakpad/src/common/linux/elf_core_dump.h.orig
+++ ./breakpad/src/common/linux/elf_core_dump.h
@@ -36,6 +36,7 @@
#include <elf.h>
#include <link.h>
#include <stddef.h>
+#include <limits.h>
#include "common/memory_range.h"
@@ -51,9 +52,9 @@
typedef ElfW(Phdr) Phdr;
typedef ElfW(Word) Word;
typedef ElfW(Addr) Addr;
-#if __WORDSIZE == 32
+#if ULONG_MAX == 0xffffffff
static const int kClass = ELFCLASS32;
-#elif __WORDSIZE == 64
+#elif ULONG_MAX == 0xffffffffffffffff
static const int kClass = ELFCLASS64;
#else
#error "Unsupported __WORDSIZE for ElfCoreDump."
--- ./sandbox/linux/suid/process_util.h.orig
+++ ./sandbox/linux/suid/process_util.h
@@ -11,6 +11,14 @@

View File

@ -1,27 +0,0 @@
--- breakpad/src/client/linux/handler/exception_handler.cc.orig 2015-12-06 09:59:55.554536646 +0100
+++ breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 10:01:16.818238035 +0100
@@ -477,7 +477,9 @@ bool ExceptionHandler::SimulateSignalDel
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
struct ucontext context;
+#if defined(__GLIBC__)
getcontext(&context);
+#endif
return HandleSignal(sig, &siginfo, &context);
}
@@ -647,9 +649,14 @@ bool ExceptionHandler::WriteMinidump() {
sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
CrashContext context;
+
+#if defined(__GLIBC__)
int getcontext_result = getcontext(&context.context);
if (getcontext_result)
return false;
+#else
+ return false;
+#endif
#if defined(__i386__)
// In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved