...
 
Commits (525)
<!-- Attention Required
Dear Contributor,
Alpine Linux has moved its development to its own GitLab instance located at
https://gitlab.alpinelinux.org/alpine. To submit your code changes for aports
please create an account on our GitLab instance by registering or logging in
with your GitHub account and submit it as a Merge Request (also known as a MR).
This GitHub repository will be kept operational as a git mirror. Pull request
made in this repository will automatically be closed by our GitHub bot.
Sorry for the inconvenience and happy hacking!
-->
stages:
- lint
- build
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "0"
default:
# Make sure master points to the correct upstream commit
before_script:
- >
git fetch $CI_MERGE_REQUEST_PROJECT_URL
+refs/heads/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME:refs/heads/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
lint:
stage: lint
image: alpinelinux/apkbuild-lint-tools:latest
script:
- changed-aports $CI_MERGE_REQUEST_TARGET_BRANCH_NAME | lint
allow_failure: true
only:
- merge_requests
tags:
- docker-alpine
- x86_64
.build:
stage: build
image: alpinelinux/alpine-gitlab-ci:latest
script:
- build.sh
- cp -ar ~/packages packages/
- mkdir -p keys
- cp ~/.abuild/*.rsa.pub keys/
artifacts:
paths:
- packages/
- keys/
expire_in: 1 day
only:
- merge_requests
build-x86_64:
extends: .build
artifacts:
name: MR${CI_MERGE_REQUEST_ID}_x86_64
tags:
- docker-alpine
- ci-build
- x86_64
build-x86:
extends: .build
image:
name: alpinelinux/alpine-gitlab-ci:latest-x86
entrypoint: ["linux32", "sh", "-c"]
artifacts:
name: MR${CI_MERGE_REQUEST_ID}_x86
tags:
- docker-alpine
- ci-build
- x86
build-s390x:
extends: .build
artifacts:
name: MR${CI_MERGE_REQUEST_ID}_s390x
tags:
- docker-alpine
- ci-build
- s390x
build-ppc64le:
extends: .build
artifacts:
name: MR${CI_MERGE_REQUEST_ID}_ppc64le
tags:
- docker-alpine
- ci-build
- ppc64le
build-aarch64:
extends: .build
artifacts:
name: MR${CI_MERGE_REQUEST_ID}_aarch64
tags:
- docker-alpine
- ci-build
- aarch64
build-armv7:
extends: .build
artifacts:
name: MR${CI_MERGE_REQUEST_ID}_armv7
tags:
- docker-alpine
- ci-build
- armv7
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=alpine-make-rootfs
pkgver=0.3.0
pkgver=0.3.1
pkgrel=0
pkgdesc="Make customized Alpine Linux rootfs (base image) for containers"
url="https://github.com/alpinelinux/alpine-make-rootfs"
......@@ -17,4 +17,4 @@ package() {
make install DESTDIR="$pkgdir" PREFIX=/usr
}
sha512sums="1c595dac5f09f4bd74f16a16f771944972fa466ab22f69c9627d32b6a3edf776aa3133e327ad398ccd91fe0331a9ebeca1aaa220062531cbdbb8927afd2c79f1 alpine-make-rootfs-0.3.0.tar.gz"
sha512sums="7971ac0275e4d2e9bdc3ea29197b40a66e493bf9977249922418f06e1bd9434a62a4ffa0cc637839ae1837f2f8916535977e695cb959288213ce1fee90cc3b44 alpine-make-rootfs-0.3.1.tar.gz"
......@@ -5,7 +5,7 @@ pkgver=1.22.1
pkgrel=0
pkgdesc="A document viewer for MATE"
url="https://github.com/mate-desktop/atril"
arch="all"
arch="all !s390x" # webkit2gtk
license="GPL-2.0-or-later"
depends="mate-icon-theme"
# make check is broken: https://github.com/mate-desktop/atril/issues/167
......
......@@ -2,7 +2,7 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Jeff Bilyk <jbilyk@gmail.com>
pkgname=cacti
pkgver=1.2.3
pkgver=1.2.8
pkgrel=0
pkgdesc="The complete rrdtool-based graphing solution"
url="https://www.cacti.net"
......@@ -20,6 +20,10 @@ source="https://www.cacti.net/downloads/$pkgname-$pkgver.tar.gz
$pkgname.php-fpm.conf
"
# secfixes:
# 1.2.8-r0:
# - CVE-2019-17358
package() {
mkdir -p "$pkgdir"/usr/share/webapps/$pkgname \
"$pkgdir"/var/lib/$pkgname \
......@@ -131,7 +135,7 @@ _php() {
"$subpkgdir"/etc/$php/php-fpm.d/$pkgname.conf
}
sha512sums="195d71a6eb08770211c30985ea3b96e2c4f84d91f16617a15e84fab0959a91f1f7923462ea931724a60580757662e01b335490f563d50e6e938c313dcf2044d0 cacti-1.2.3.tar.gz
sha512sums="e24d9de47a06c1741c7bcfe5c5f68a5a0f0cc2eb859fc930ced28f797f84ad537ff1a0a703dc8c26735cc4b54ba09699e33a30ac666e1f8ec2ec26ae4ceccde3 cacti-1.2.8.tar.gz
70f47dbbca76489fc3a84452ee8065f9571ee627b3e346cd3c866501d723a609372c4fbd7e53c4bdcdb22439d876d78847f8902dfa43f3f66b2329639e795ab9 cacti.crontab
9b3fe765c6196c0e4988efaa7236d8a8b945725548371b4a0e2a371de374c9577a908d58dcef5a4e59e089ca923cfeb7c5ddea9ee983a5115239052cf9b8ab59 cacti.nginx.conf
056358fc69752fb5129729db91a22d06c97ca452068017ccfe0ede8f2bf42f62e5072415c7db2eb5b9346d6bc54092bc147044e40b2156d8037dfee4a7e55e5b cacti.php-fpm.conf"
# Contributor: John Coyle <dx9err@gmail.com>
# Maintainer: John Coyle <dx9err@gmail.com>
pkgname=ceph
pkgver=14.2.1
pkgver=14.2.3
pkgrel=0
pkgdesc="Ceph is a distributed object store and file system"
pkgusers="ceph"
pkggroups="ceph"
url="http://ceph.com"
url="https://ceph.com/"
arch="x86_64"
# https://github.com/ceph/ceph/blob/master/COPYING
license="LGPL-2.1-only AND LGPL-2.0-or-later AND GPL-2.0-only AND GPL-3.0-only AND CC-BY-SA-1.0 AND BSL-1.0 AND GPL-2.0 WITH Autoconf-exception-2.0 AND BSD-3-Clause AND MIT AND custom"
......@@ -81,7 +81,7 @@ makedepends="
$_ceph_test_deps
"
source="http://download.ceph.com/tarballs/ceph_$pkgver.orig.tar.gz
source="https://download.ceph.com/tarballs/ceph_$pkgver.orig.tar.gz
allperms.patch
musl-fixes.patch
"
......@@ -109,6 +109,10 @@ subpackages="
py2-cephfs:_py2_cephfs
"
# secfixes:
# 14.2.3-r0:
# - CVE-2019-10222
_ceph_uid=167
_ceph_gid=167
......@@ -444,6 +448,6 @@ _pkg() {
done
}
sha512sums="fccde341344c721fbfc7f7cb73db4f65933d7fcacc9495398b55b37d1e208f0bad0cd78a4da08a3b5e26cca3175e7707f7dfb76fae5aa094f58afaed8603c866 ceph_14.2.1.orig.tar.gz
sha512sums="3d02e766a1d53d39355ee88738dd0233dc02f8a3cb44935194cb538b888507de8f8acdd99bf7890895f68795a310f53e2a8652305d5f2be5212efbd9046bd3a9 ceph_14.2.3.orig.tar.gz
e1becd813ed3f28e2e4a6bef78b3b5117c1c0bb9cabe0ba9c912e0a20b551b6b2667495cddb94acd64192e287144911ff1c11e0d636fe04cc458146cfb0daca8 allperms.patch
35722b11ad52a3145153635b6a96abda2a23ae9c7e63e2eac006c1e5b8014452c4a1a11bbe0292fd731e4c43aa38e27dd75d2ff9d25bcf52290278f71e868570 musl-fixes.patch"
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=cesnet-tcs-cli
pkgver=0.1.1
pkgver=0.2.0
pkgrel=0
pkgdesc="Client utility for CESNET TCS API"
url="https://github.com/jirutka/cesnet-tcs-cli"
......@@ -16,4 +16,4 @@ package() {
make install DESTDIR="$pkgdir" prefix=/usr
}
sha512sums="21ca4939369237d82083d623be20177056ba01c924c93183f869ad9b97d4162bdaf973976aaa7a61ab80eac58683d959781c723310be1f4fbb941b35870bd4db cesnet-tcs-cli-0.1.1.tar.gz"
sha512sums="006015d8f0ba0f2696c6801258afe9ef62c4a2d55cfa1a1300e9d1a80fef6f5bc62f283e5f8deffe48773b1ac9369c59bacf6ab9a127c152133ecfc314ed52e8 cesnet-tcs-cli-0.2.0.tar.gz"
This diff is collapsed.
diff --git a/third_party/swiftshader/third_party/llvm-7.0/BUILD.gn b/third_party/swiftshader/third_party/llvm-7.0/BUILD.gn
index 744b0eb..32ff5a8 100644
--- ./third_party/swiftshader/third_party/llvm-7.0/BUILD.gn
+++ ./third_party/swiftshader/third_party/llvm-7.0/BUILD.gn
@@ -55,7 +55,10 @@ config("swiftshader_llvm_private_config") {
}
if (is_clang) {
- cflags += [ "-Wno-header-hygiene" ]
+ cflags += [
+ "-Wno-header-hygiene",
+ "-Wno-error=header-hygiene",
+ ]
if (target_cpu == "x86" || target_cpu == "x64") {
cflags += [ "-msse2" ]
}
@@ -70,7 +73,6 @@ config("swiftshader_llvm_private_config") {
"-Wno-unused-private-field",
"-Wno-unused-result",
"-Wno-unused-variable",
- "-Wno-error=header-hygiene",
]
defines = [
diff --git a/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h
index ff20611..ec22982 100644
--- ./third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h
......
This diff is collapsed.
diff -up chromium-71.0.3578.98/third_party/skia/src/opts/SkRasterPipeline_opts.h.aarch64fix chromium-71.0.3578.98/third_party/skia/src/opts/SkRasterPipeline_opts.h
--- third_party/skia/src/opts/SkRasterPipeline_opts.h.aarch64fix 2018-12-14 11:17:43.249121756 -0500
+++ third_party/skia/src/opts/SkRasterPipeline_opts.h 2018-12-14 11:20:07.770030234 -0500
@@ -658,7 +658,7 @@ SI F approx_powf(F x, F y) {
}
SI F from_half(U16 h) {
-#if defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
+#if defined(JUMPER_IS_NEON) && defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
return vcvt_f32_f16(h);
#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
@@ -678,7 +678,7 @@ SI F from_half(U16 h) {
}
SI U16 to_half(F f) {
-#if defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
+#if defined(JUMPER_IS_NEON) && defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
return vcvt_f16_f32(f);
#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
From 130a5ae24a02daba8729ba2216bcaf3dbfacea69 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri, 8 Feb 2019 16:58:38 +0000
Subject: [PATCH] media::learning: Make LabelledExample's move assignment
operator noexcept
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The GCC build is currently broken with an error like this:
../../media/learning/common/labelled_example.cc:20:1: error: function ‘media::learning::LabelledExample::LabelledExample(media::learning::LabelledExample&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
LabelledExample::LabelledExample(LabelledExample&& rhs) noexcept = default;
^~~~~~~~~~~~~~~
With GCC, having that noexcept marker requires all members to be marked with
noexcept themselves, and TargetValue was missing some assignment operators
and noexcept markers.
clang is fine because we pass -fno-exceptions and it disables the same error
there, while GCC continues to raise it (bug 843143 and its corresponding CL
have a longer discussion on this issue).
Bug: 819294
Change-Id: Ide30932fc466ccb52d6883a82777e703dae48798
Reviewed-on: https://chromium-review.googlesource.com/c/1458210
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#630355}
---
media/learning/common/labelled_example.cc | 3 ++-
media/learning/common/labelled_example.h | 2 +-
media/learning/common/value.cc | 6 ++++++
media/learning/common/value.h | 4 ++++
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/media/learning/common/labelled_example.cc b/media/learning/common/labelled_example.cc
index 76d08509298e..43e834f9f3cf 100644
--- ./media/learning/common/labelled_example.cc
+++ ./media/learning/common/labelled_example.cc
@@ -59,7 +59,8 @@ bool LabelledExample::operator<(const LabelledExample& rhs) const {
LabelledExample& LabelledExample::operator=(const LabelledExample& rhs) =
default;
-LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) = default;
+LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) noexcept =
+ default;
TrainingData::TrainingData() = default;
diff --git a/media/learning/common/labelled_example.h b/media/learning/common/labelled_example.h
index 4f43c54e7a76..365abc3c0ebf 100644
--- ./media/learning/common/labelled_example.h
+++ ./media/learning/common/labelled_example.h
@@ -40,7 +40,7 @@ struct COMPONENT_EXPORT(LEARNING_COMMON) LabelledExample {
bool operator<(const LabelledExample& rhs) const;
LabelledExample& operator=(const LabelledExample& rhs);
- LabelledExample& operator=(LabelledExample&& rhs);
+ LabelledExample& operator=(LabelledExample&& rhs) noexcept;
// Observed feature values.
// Note that to interpret these values, you probably need to have the
diff --git a/media/learning/common/value.cc b/media/learning/common/value.cc
index 9c9395c25d4e..12ea399d24c3 100644
--- ./media/learning/common/value.cc
+++ ./media/learning/common/value.cc
@@ -23,6 +23,12 @@ Value::Value(const std::string& x) : value_(base::PersistentHash(x)) {}
Value::Value(const Value& other) : value_(other.value_) {}
+Value::Value(Value&& rhs) noexcept = default;
+
+Value& Value::operator=(const Value& rhs) = default;
+
+Value& Value::operator=(Value&& rhs) noexcept = default;
+
bool Value::operator==(const Value& rhs) const {
return value_ == rhs.value_;
}
diff --git a/media/learning/common/value.h b/media/learning/common/value.h
index 0e64da961f34..62f4953f691c 100644
--- ./media/learning/common/value.h
+++ ./media/learning/common/value.h
@@ -38,6 +38,10 @@ class COMPONENT_EXPORT(LEARNING_COMMON) Value {
explicit Value(const std::string& x);
Value(const Value& other);
+ Value(Value&&) noexcept;
+
+ Value& operator=(const Value&);
+ Value& operator=(Value&&) noexcept;
bool operator==(const Value& rhs) const;
bool operator!=(const Value& rhs) const;
--
2.20.1
From a5ba6f9bb7665040045dc0f8087407096630ad7b Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri, 8 Feb 2019 02:57:28 +0000
Subject: [PATCH] color_utils: Use std::sqrt() instead of std::sqrtf()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes the build with libstdc++:
../../ui/gfx/color_utils.cc: In function ‘SkColor color_utils::SetDarkestColorForTesting(SkColor)’:
../../ui/gfx/color_utils.cc:434:12: error: ‘sqrtf’ is not a member of ‘std’
std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
^~~~~
../../ui/gfx/color_utils.cc:434:12: note: suggested alternative: ‘sqrt’
std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
^~~~~
sqrt
sqrtf() is not formally part of C++14 as far as I can see even though libc++
has it in <cmath>. Additionally, we're only dealing with floats in all parts
of the expression above, so using the float sqrt() overload should be
harmless anyway.
Bug: 819294
Change-Id: If6c7bf31819df97a761e6963def6d6506154c34d
Reviewed-on: https://chromium-review.googlesource.com/c/1458193
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#630140}
---
ui/gfx/color_utils.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc
index c868cd54bac3..92ba1407d594 100644
--- ./ui/gfx/color_utils.cc
+++ ./ui/gfx/color_utils.cc
@@ -431,7 +431,7 @@ SkColor SetDarkestColorForTesting(SkColor color) {
// GetContrastRatio(kWhiteLuminance, g_luminance_midpoint). The formula below
// can be verified by plugging it into how GetContrastRatio() operates.
g_luminance_midpoint =
- std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
+ std::sqrt((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
return previous_darkest_color;
}
--
2.20.1
From c33e832cc145c696d2157796c7640e659740dafa Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri, 8 Feb 2019 08:44:00 +0000
Subject: [PATCH] quic_flags_impl: Fix GCC build after #618558
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having
base::NoDestructor<T<U>> and passing an initializer list of Us does not
work if this is not done explicitly, as GCC incorrectly fails to determine
which constructor overload to use:
../../net/third_party/quic/platform/impl/quic_flags_impl.cc: In member function ‘bool quic::TypedQuicFlagHelper<T>::SetFlag(const string&) const [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
../../net/third_party/quic/platform/impl/quic_flags_impl.cc:156:41: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous
{"", "1", "t", "true", "y", "yes"});
^
In file included from ../../net/third_party/quic/platform/impl/quic_flags_impl.h:16,
from ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:5:
../../base/no_destructor.h:62:3: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = std::set<std::__cxx11::basic_string<char> >]’ <deleted>
NoDestructor(const NoDestructor&) = delete;
^~~~~~~~~~~~
../../base/no_destructor.h:60:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(T&&) [with T = std::set<std::__cxx11::basic_string<char> >]’
explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); }
^~~~~~~~~~~~
../../base/no_destructor.h:59:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const T&) [with T = std::set<std::__cxx11::basic_string<char> >]’
explicit NoDestructor(const T& x) { new (storage_) T(x); }
^~~~~~~~~~~~
Explicitly use an std::initializer_list to make the build work everywhere.
Bug: 819294
Change-Id: I775be20e3766a88a656b58c94c40869cb1bee2a8
Reviewed-on: https://chromium-review.googlesource.com/c/1458214
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#630249}
---
net/third_party/quic/platform/impl/quic_flags_impl.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/third_party/quic/platform/impl/quic_flags_impl.cc b/net/third_party/quic/platform/impl/quic_flags_impl.cc
index 5e6962d1e770..3fa45fc6892d 100644
--- ./net/third_party/quic/platform/impl/quic_flags_impl.cc
+++ ./net/third_party/quic/platform/impl/quic_flags_impl.cc
@@ -5,6 +5,7 @@
#include "net/third_party/quic/platform/impl/quic_flags_impl.h"
#include <algorithm>
+#include <initializer_list>
#include <iostream>
#include <set>
@@ -153,9 +154,9 @@ std::string QuicFlagRegistry::GetHelp() const {
template <>
bool TypedQuicFlagHelper<bool>::SetFlag(const std::string& s) const {
static const base::NoDestructor<std::set<std::string>> kTrueValues(
- {"", "1", "t", "true", "y", "yes"});
+ std::initializer_list<std::string>({"", "1", "t", "true", "y", "yes"}));
static const base::NoDestructor<std::set<std::string>> kFalseValues(
- {"0", "f", "false", "n", "no"});
+ std::initializer_list<std::string>({"0", "f", "false", "n", "no"}));
if (kTrueValues->find(base::ToLowerASCII(s)) != kTrueValues->end()) {
*flag_ = true;
return true;
--
2.20.1
From bdd76190e54e6a0e11343dd19e4bf1d06956fa48 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Wed, 13 Feb 2019 01:02:27 +0000
Subject: [PATCH] BaseRenderingContext2D: Use base::CheckMul and simplify code
in putImageData()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Follow-up to commit e0b3253a56 ("Fix image conversion truncation issues").
The current code does not build with GCC due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89287:
../../third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc: In member function ‘void blink::BaseRenderingContext2D::putImageData(blink::ImageData*, int, int, int, int, int, int, blink::ExceptionState&)’:
../../third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc:1777:44: error: default type conversion can't deduce template argument for ‘template<class Dst, typename std::enable_if<base::internal::IsNumericRangeContained<Dst, long unsigned int, void>::value, void>::type* <anonymous> > constexpr base::internal::StrictNumeric<T>::operator Dst() const [with Dst = Dst; typename std::enable_if<base::internal::IsNumericRangeContained<Dst, T>::value>::type* <anonymous> = <enumerator>; T = long unsigned int]’
new uint8_t[data_length.ValueOrDie()]);
^
Work around it by using the more idiomatic base::CheckMul() with
AssignIfValid, so that we can have |data_length| be a size_t again and not
leave it to the compiler to figure out the type we want when creating the
|converted_pixels| array.
Bug: 819294
Change-Id: Id124cc4f3d749b45def4708e21e4badafd708578
Reviewed-on: https://chromium-review.googlesource.com/c/1467201
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631472}
---
.../canvas/canvas2d/base_rendering_context_2d.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
index d9fa696c9a9d..34a8a202bfd3 100644
--- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
+++ ./third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
@@ -1769,12 +1769,12 @@ void BaseRenderingContext2D::putImageData(ImageData* data,
CanvasColorParams(ColorParams().ColorSpace(), PixelFormat(), kNonOpaque);
if (data_color_params.NeedsColorConversion(context_color_params) ||
PixelFormat() == kF16CanvasPixelFormat) {
- base::CheckedNumeric<size_t> data_length = data->Size().Area();
- data_length *= context_color_params.BytesPerPixel();
- if (!data_length.IsValid())
+ size_t data_length;
+ if (!base::CheckMul(data->Size().Area(),
+ context_color_params.BytesPerPixel())
+ .AssignIfValid(&data_length))
return;
- std::unique_ptr<uint8_t[]> converted_pixels(
- new uint8_t[data_length.ValueOrDie()]);
+ std::unique_ptr<uint8_t[]> converted_pixels(new uint8_t[data_length]);
if (data->ImageDataInCanvasColorSettings(
ColorParams().ColorSpace(), PixelFormat(), converted_pixels.get(),
kRGBAColorType)) {
--
2.20.1
From 78b0f0dfa9e6f3c37b71102c01def92f1ab8c330 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Wed, 13 Feb 2019 23:28:46 +0000
Subject: [PATCH] CastActivityManager: Do not make DoLaunchSessionParams' move
constructor noexcept
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes the GCC build:
../../chrome/browser/media/router/providers/cast/cast_activity_manager.cc:806:1: error: function ‘media_router::CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(media_router::CastActivityManager::DoLaunchSessionParams&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
^~~~~~~~~~~~~~~~~~~
With GCC, having that noexcept marker requires all members to be marked with
noexcept themselves, and MediaRoute, CastMediaSource and url::Origin need
the right annotations. Just making DoLaunchSessionParams not noexcept is the
least intrusive solution for now.
clang is fine because we pass -fno-exceptions and it disables the same error
there, while GCC continues to raise it (bug 843143 and its corresponding CL
have a longer discussion on this issue).
Bug: 819294
Change-Id: Ia3a5fb60b5e74e68bd35cfa50e2fcc728b64e5eb
Reviewed-on: https://chromium-review.googlesource.com/c/1469942
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631962}
---
.../media/router/providers/cast/cast_activity_manager.cc | 2 +-
.../browser/media/router/providers/cast/cast_activity_manager.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc b/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
index b7ee9695f69a..8569e0cd30a3 100644
--- a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
+++ ./chrome/browser/media/router/providers/cast/cast_activity_manager.cc
@@ -804,7 +804,7 @@ CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
callback(std::move(callback)) {}
CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
- DoLaunchSessionParams&& other) noexcept = default;
+ DoLaunchSessionParams&& other) = default;
CastActivityManager::DoLaunchSessionParams::~DoLaunchSessionParams() = default;
diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.h b/chrome/browser/media/router/providers/cast/cast_activity_manager.h
index 325bffc725ee..08fe0ccca603 100644
--- a/chrome/browser/media/router/providers/cast/cast_activity_manager.h
+++ ./chrome/browser/media/router/providers/cast/cast_activity_manager.h
@@ -295,7 +295,7 @@ class CastActivityManager : public cast_channel::CastMessageHandler::Observer,
const url::Origin& origin,
int tab_id,
mojom::MediaRouteProvider::CreateRouteCallback callback);
- DoLaunchSessionParams(DoLaunchSessionParams&& other) noexcept;
+ DoLaunchSessionParams(DoLaunchSessionParams&& other);
~DoLaunchSessionParams();
DoLaunchSessionParams& operator=(DoLaunchSessionParams&&) = delete;
--
2.20.1
From cf4c534f04c223f8a9d65407852e2a531a6d7fb6 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Thu, 14 Feb 2019 22:22:21 +0000
Subject: [PATCH] chrome/browser: Replace some forward declarations with actual
includes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes the GCC build which was failing like this:
../../base/scoped_observer.h: In instantiation of ‘void ScopedObserver<Source, Observer>::RemoveAll() [with Source = TabStripModel; Observer = TabStripModelObserver]’:
../../base/scoped_observer.h:26:5: required from ‘ScopedObserver<Source, Observer>::~ScopedObserver() [with Source = TabStripModel; Observer = TabStripModelObserver]’
../../chrome/browser/ui/views/extensions/extension_popup.h:115:70: required from here
../../base/scoped_observer.h:45:20: error: invalid use of incomplete type ‘class TabStripModel’
sources_[i]->RemoveObserver(observer_);
~~~~~~~~~~~~~^~~~~~~~~~~~~~
This is caused by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89311 ("Brace
initialization needlessly invokes destructor"), i.e. having something like
ScopedObserver<T, U> observer_{this};
in a header declaration requires T and U to be fully declared because
ScopedObserver's destructor references them. In a few cases, T was only
forward-declared.
Bug: 819294
Change-Id: Ie5b9dc2745e27d4532c5539e3845a8c9147a0595
Reviewed-on: https://chromium-review.googlesource.com/c/1472576
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632385}
---
chrome/browser/ui/views/extensions/extension_popup.cc | 1 -
chrome/browser/ui/views/extensions/extension_popup.h | 1 +
chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc | 1 -
chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h | 2 +-
.../web_applications/extensions/bookmark_app_tab_helper.cc | 1 -
.../web_applications/extensions/bookmark_app_tab_helper.h | 2 +-
6 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
index 3f0985d383dd..57d16aba9e9f 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.cc
+++ ./chrome/browser/ui/views/extensions/extension_popup.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/extensions/extension_view_host.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h
index 3661b5bda950..9018efa0fea5 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.h
+++ ./chrome/browser/ui/views/extensions/extension_popup.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/scoped_observer.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/views/extensions/extension_view_views.h"
#include "content/public/browser/devtools_agent_host_observer.h"
diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
index 2a3ea8e4f91f..ac44a4f05dec 100644
--- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
+++ ./chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
+#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h"
#include "chrome/browser/ui/views/toolbar/app_menu_observer.h"
#include "ui/views/controls/scroll_view.h"
@@ -15,7 +16,6 @@ class AppMenu;
class AppMenu;
class Browser;
class BrowserActionsContainer;
-class ToolbarActionsBar;
namespace views {
class MenuItemView;
From 27e25336b8316ff3ec4e464058682ed85801fd06 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Mon, 29 Jul 2019 10:54:28 +0000
Subject: [PATCH] Also link against libharfbuzz-subset when use_system_harfbuzz is true
When building HarfBuzz as part of Chromium, there is a single source set
with all the files we need in the build.
Upstream HarfBuzz, on the other hand, produces a few different libraries:
harfbuzz, harfbuzz-icu and harfbuzz-subset. When |use_system_harfbuzz| is
true, we were only looking for (and using) harfbuzz.pc with pkg-config even
though we also use symbols from libharfbuzz-subset.so. This resulted in
errors when linking:
ld: obj/skia/skia/SkPDFSubsetFont.o: in function `SkPDFSubsetFont(sk_sp<SkData>, SkPDFGlyphUse const&, SkPDF::Metadata::Subsetter, char const*, int)':
SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x48a): undefined reference to `hb_subset_input_create_or_fail'
ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x4af): undefined reference to `hb_subset_input_glyph_set'
ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5d7): undefined reference to `hb_subset_input_set_retain_gids'
ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5e4): undefined reference to `hb_subset_input_set_drop_hints'
ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5f3): undefined reference to `hb_subset'
ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x66f): undefined reference to `hb_subset_input_destroy'
as reported in
https://groups.google.com/a/chromium.org/d/msg/chromium-packagers/UyJsVJ5QqWo/jSv5z7-rEQAJ
Change-Id: I997af075c7b7263cd7cc71a63db5b0f93bd1ab59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715288
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681760}
---
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
index 37d8e33..72013eb1d 100644
--- ./third_party/harfbuzz-ng/BUILD.gn
+++ ./third_party/harfbuzz-ng/BUILD.gn
@@ -16,7 +16,10 @@
"//third_party:freetype_harfbuzz",
"//third_party/freetype:freetype_source",
]
- packages = [ "harfbuzz" ]
+ packages = [
+ "harfbuzz",
+ "harfbuzz-subset",
+ ]
}
} else {
config("harfbuzz_config") {
From 74138b9febd37eac0fc26b8efb110014a83a52c6 Mon Sep 17 00:00:00 2001
From: Jeremy Roman <jbroman@chromium.org>
Date: Wed, 07 Aug 2019 13:26:48 +0000
Subject: [PATCH] WTF: Make LinkedHashSet understand values for which memset initialization would be bad.
Includes a unit test which fails before, and uses this to fix FontCacheKeyTraits.
Bug: 980025
Change-Id: If41f97444c7fd37b9b95d6dadaf3da5689079e9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1739948
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684731}
---
diff --git a/third_party/blink/renderer/platform/fonts/font_cache_key.h b/third_party/blink/renderer/platform/fonts/font_cache_key.h
index 0efc8fb..90063cb 100644
--- ./third_party/blink/renderer/platform/fonts/font_cache_key.h
+++ ./third_party/blink/renderer/platform/fonts/font_cache_key.h
@@ -133,6 +133,10 @@
struct FontCacheKeyTraits : WTF::SimpleClassHashTraits<FontCacheKey> {
STATIC_ONLY(FontCacheKeyTraits);
+
+ // std::string's empty state need not be zero in all implementations,
+ // and it is held within FontFaceCreationParams.
+ static const bool kEmptyValueIsZero = false;
};
} // namespace blink
diff --git a/third_party/blink/renderer/platform/wtf/linked_hash_set.h b/third_party/blink/renderer/platform/wtf/linked_hash_set.h
index b35b6e9..77e524c 100644
--- ./third_party/blink/renderer/platform/wtf/linked_hash_set.h
+++ ./third_party/blink/renderer/platform/wtf/linked_hash_set.h
@@ -146,6 +146,11 @@
LinkedHashSetNodeBase* next)
: LinkedHashSetNodeBase(prev, next), value_(value) {}
+ LinkedHashSetNode(ValueArg&& value,
+ LinkedHashSetNodeBase* prev,
+ LinkedHashSetNodeBase* next)
+ : LinkedHashSetNodeBase(prev, next), value_(std::move(value)) {}
+
LinkedHashSetNode(LinkedHashSetNode&& other)
: LinkedHashSetNodeBase(std::move(other)),
value_(std::move(other.value_)) {}
@@ -445,10 +450,13 @@
// The slot is empty when the next_ field is zero so it's safe to zero
// the backing.
- static const bool kEmptyValueIsZero = true;
+ static const bool kEmptyValueIsZero = ValueTraits::kEmptyValueIsZero;
static const bool kHasIsEmptyValueFunction = true;
static bool IsEmptyValue(const Node& node) { return !node.next_; }
+ static Node EmptyValue() {
+ return Node(ValueTraits::EmptyValue(), nullptr, nullptr);
+ }
static const int kDeletedValue = -1;
diff --git a/third_party/blink/renderer/platform/wtf/list_hash_set_test.cc b/third_party/blink/renderer/platform/wtf/list_hash_set_test.cc
index 4c3f899..cd1be00 100644
--- ./third_party/blink/renderer/platform/wtf/list_hash_set_test.cc
+++ ./third_party/blink/renderer/platform/wtf/list_hash_set_test.cc
@@ -487,6 +487,7 @@
};
struct Complicated {
+ Complicated() : Complicated(0) {}
Complicated(int value) : simple_(value) { objects_constructed_++; }
Complicated(const Complicated& other) : simple_(other.simple_) {
@@ -495,9 +496,6 @@
Simple simple_;
static int objects_constructed_;
-
- private:
- Complicated() = delete;
};
int Complicated::objects_constructed_ = 0;
@@ -731,4 +729,45 @@
} // anonymous namespace
+// A unit type which objects to its state being initialized wrong.
+struct InvalidZeroValue {
+ InvalidZeroValue() = default;
+ InvalidZeroValue(WTF::HashTableDeletedValueType) : deleted_(true) {}
+ ~InvalidZeroValue() { CHECK(ok_); }
+ bool IsHashTableDeletedValue() const { return deleted_; }
+
+ bool ok_ = true;
+ bool deleted_ = false;
+};
+
+template <>
+struct HashTraits<InvalidZeroValue> : SimpleClassHashTraits<InvalidZeroValue> {
+ static const bool kEmptyValueIsZero = false;
+};
+
+template <>
+struct DefaultHash<InvalidZeroValue> {
+ struct Hash {
+ static unsigned GetHash(const InvalidZeroValue&) { return 0; }
+ static bool Equal(const InvalidZeroValue&, const InvalidZeroValue&) {
+ return true;
+ }
+ };
+};
+
+template <typename Set>
+class ListOrLinkedHashSetInvalidZeroTest : public testing::Test {};
+
+using InvalidZeroValueSetTypes =
+ testing::Types<ListHashSet<InvalidZeroValue>,
+ ListHashSet<InvalidZeroValue, 1>,
+ LinkedHashSet<InvalidZeroValue>>;
+TYPED_TEST_SUITE(ListOrLinkedHashSetInvalidZeroTest, InvalidZeroValueSetTypes);
+
+TYPED_TEST(ListOrLinkedHashSetInvalidZeroTest, InvalidZeroValue) {
+ using Set = TypeParam;
+ Set set;
+ set.insert(InvalidZeroValue());
+}
+
} // namespace WTF
diff --git a/base/numerics/safe_math_shared_impl.h b/base/numerics/safe_math_shared_impl.h
index 99f230ce7e9a..de2415d402f5 100644
--- base/numerics/safe_math_shared_impl.h
+++ base/numerics/safe_math_shared_impl.h
@@ -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
......@@ -6,8 +6,8 @@
if (is_clang && !is_android && !is_nacl) {
- cflags += [ "--target=arm-linux-gnueabihf" ]
- ldflags += [ "--target=arm-linux-gnueabihf" ]
+ cflags += [ "--target=armv6-alpine-linux-musleabihf" ]
+ ldflags += [ "--target=armv6-alpine-linux-musleabihf" ]
+ cflags += [ "--target=armv7-alpine-linux-musleabihf" ]
+ ldflags += [ "--target=armv7-alpine-linux-musleabihf" ]
}
if (!is_nacl) {
cflags += [
......
--- ./third_party/zlib/BUILD.gn.orig
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index 1a9cd3b..728a011 100644
--- ./third_party/zlib/BUILD.gn
+++ ./third_party/zlib/BUILD.gn
@@ -67,7 +67,7 @@
# implement the CRC32* instructions. These are optional in ARMv8.0."
# - Fuchsia just added a syscall for feature detection.
# TODO(cavalcantii): crbug.com/810125.
- if (!is_ios && !is_fuchsia) {
+ if (is_clang && !is_ios && !is_fuchsia) {
defines = [ "CRC32_ARMV8_CRC32" ]
if (is_android) {
defines += [ "ARMV8_OS_ANDROID" ]
@@ -16,7 +16,7 @@ config("zlib_internal_config") {
use_arm_neon_optimizations = false
if (current_cpu == "arm" || current_cpu == "arm64") {
- if (arm_use_neon) {
+ if (arm_use_neon && is_clang) {
use_arm_neon_optimizations = true
}
}
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 45fee9a..0769c41 100644
--- build/config/linux/BUILD.gn
+++ build/config/linux/BUILD.gn
@@ -13,6 +13,7 @@ group("linux") {
# is applied to all targets. It is here to separate out the logic that is
# Linux-only. This is not applied to Android, but is applied to ChromeOS.
config("compiler") {
+ cflags_cc = [ "-fno-delete-null-pointer-checks" ]
}
# This is included by reference in the //build/config/compiler:runtime_library
--- mojo/public/c/system/macros.h.orig 2018-09-06 10:11:54.336432699 -0400
+++ mojo/public/c/system/macros.h 2018-09-06 10:13:56.555727572 -0400
@@ -27,7 +27,13 @@
(sizeof(void*) == 4 ? 32 : 0)
// Like the C++11 |alignof| operator.
-#if __cplusplus >= 201103L
+#if defined(__GNUC__) && __GNUC__ >= 8
+// GCC 8 has changed the alignof operator to return the minimal alignment
+// required by the target ABI, instead of the preferred alignment.
+// This means that on 32-bit x86, it will return 4 instead of 8.
+// Use __alignof__ instead to avoid this.
+#define MOJO_ALIGNOF(type) __alignof__(type)
+#elif __cplusplus >= 201103L
#define MOJO_ALIGNOF(type) alignof(type)
#elif defined(__GNUC__)
#define MOJO_ALIGNOF(type) __alignof__(type)
--- base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100
+++ base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100
--- ./base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100
+++ ./base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100
@@ -229,7 +229,7 @@
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
......@@ -9,3 +9,14 @@
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();
--- ./net/socket/udp_socket_posix.cc.orig 2019-07-03 13:13:46.034342649 -0400
+++ ./net/socket/udp_socket_posix.cc 2019-07-03 13:23:53.117081909 -0400
@@ -1194,7 +1194,7 @@
msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
msgvec->reserve(buffers.size());
for (size_t j = 0; j < buffers.size(); j++)
- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
+ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
SendResult send_result(0, 0, std::move(buffers));
if (result < 0) {
diff --git sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
index 68ce32a..bb779c2 100644
--- sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -137,23 +137,13 @@ namespace sandbox {
// CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations.
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
index 348ab6e..4550f9e 100644
--- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -139,21 +139,11 @@ namespace sandbox {
// present (as in newer versions of posix_spawn).
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
const Arg<unsigned long> flags(0);
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_THREAD | CLONE_SYSVSEM;
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
+ CLONE_DETACHED;
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
-
- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
- CLONE_SIGHAND | CLONE_THREAD |
......@@ -26,16 +21,27 @@ index 68ce32a..bb779c2 100644
- const BoolExpr android_test =
- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
- flags == kGlibcPthreadFlags);
-
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_THREAD | CLONE_SYSVSEM;
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
+ CLONE_DETACHED;
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
// The following two flags are the two important flags in any vfork-emulating
// clone call. EPERM any clone call that contains both of them.
@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
(flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
- return If(IsAndroid() ? android_test : glibc_test, Allow())
+ return If(thread_clone_ok, Allow())
.ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
.ElseIf(is_fork_or_clone_vfork, Error(EPERM))
.Else(CrashSIGSYSClone());
}
diff --git sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index 7dbcc87..782be78 100644
--- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index 7dbcc87..589262f 100644
--- ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -391,6 +391,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
#if defined(__i386__)
case __NR_waitpid:
......@@ -69,10 +75,10 @@ index 7dbcc87..782be78 100644
case __NR_msync:
case __NR_munlockall:
case __NR_readahead:
diff --git sandbox/linux/system_headers/arm64_linux_syscalls.h sandbox/linux/system_headers/arm64_linux_syscalls.h
diff --git a/sandbox/linux/system_headers/arm64_linux_syscalls.h b/sandbox/linux/system_headers/arm64_linux_syscalls.h
index 59d0eab..7ae7002 100644
--- sandbox/linux/system_headers/arm64_linux_syscalls.h
+++ sandbox/linux/system_headers/arm64_linux_syscalls.h
--- ./sandbox/linux/system_headers/arm64_linux_syscalls.h
+++ ./sandbox/linux/system_headers/arm64_linux_syscalls.h
@@ -1063,4 +1063,8 @@
#define __NR_memfd_create 279
#endif
......@@ -82,10 +88,10 @@ index 59d0eab..7ae7002 100644
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
diff --git sandbox/linux/system_headers/arm_linux_syscalls.h sandbox/linux/system_headers/arm_linux_syscalls.h
diff --git a/sandbox/linux/system_headers/arm_linux_syscalls.h b/sandbox/linux/system_headers/arm_linux_syscalls.h
index 1addd53..7843b5e 100644
--- sandbox/linux/system_headers/arm_linux_syscalls.h
+++ sandbox/linux/system_headers/arm_linux_syscalls.h
--- ./sandbox/linux/system_headers/arm_linux_syscalls.h
+++ ./sandbox/linux/system_headers/arm_linux_syscalls.h
@@ -1385,6 +1385,10 @@
#define __NR_memfd_create (__NR_SYSCALL_BASE+385)
#endif
......@@ -97,10 +103,10 @@ index 1addd53..7843b5e 100644
// ARM private syscalls.
#if !defined(__ARM_NR_BASE)
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
diff --git sandbox/linux/system_headers/mips64_linux_syscalls.h sandbox/linux/system_headers/mips64_linux_syscalls.h
diff --git a/sandbox/linux/system_headers/mips64_linux_syscalls.h b/sandbox/linux/system_headers/mips64_linux_syscalls.h
index ec75815..612fcfa 100644
--- sandbox/linux/system_headers/mips64_linux_syscalls.h
+++ sandbox/linux/system_headers/mips64_linux_syscalls.h
--- ./sandbox/linux/system_headers/mips64_linux_syscalls.h
+++ ./sandbox/linux/system_headers/mips64_linux_syscalls.h
@@ -1271,4 +1271,8 @@
#define __NR_memfd_create (__NR_Linux + 314)
#endif
......@@ -110,10 +116,10 @@ index ec75815..612fcfa 100644
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS64_LINUX_SYSCALLS_H_
diff --git sandbox/linux/system_headers/mips_linux_syscalls.h sandbox/linux/system_headers/mips_linux_syscalls.h
diff --git a/sandbox/linux/system_headers/mips_linux_syscalls.h b/sandbox/linux/system_headers/mips_linux_syscalls.h
index ddbf97f..1742acd 100644
--- sandbox/linux/system_headers/mips_linux_syscalls.h
+++ sandbox/linux/system_headers/mips_linux_syscalls.h
--- ./sandbox/linux/system_headers/mips_linux_syscalls.h
+++ ./sandbox/linux/system_headers/mips_linux_syscalls.h
@@ -1433,4 +1433,8 @@
#define __NR_memfd_create (__NR_Linux + 354)
#endif
......@@ -123,10 +129,10 @@ index ddbf97f..1742acd 100644
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
diff --git sandbox/linux/system_headers/x86_32_linux_syscalls.h sandbox/linux/system_headers/x86_32_linux_syscalls.h
diff --git a/sandbox/linux/system_headers/x86_32_linux_syscalls.h b/sandbox/linux/system_headers/x86_32_linux_syscalls.h
index a6afc62..7ed0a3b 100644
--- sandbox/linux/system_headers/x86_32_linux_syscalls.h
+++ sandbox/linux/system_headers/x86_32_linux_syscalls.h
--- ./sandbox/linux/system_headers/x86_32_linux_syscalls.h
+++ ./sandbox/linux/system_headers/x86_32_linux_syscalls.h
@@ -1422,5 +1422,9 @@
#define __NR_memfd_create 356
#endif
......@@ -137,10 +143,10 @@ index a6afc62..7ed0a3b 100644