diff options
-rw-r--r-- | community/chromium/APKBUILD | 24 | ||||
-rw-r--r-- | community/chromium/chromium-73-gcc-1.patch | 99 | ||||
-rw-r--r-- | community/chromium/chromium-73-gcc-2.patch | 51 | ||||
-rw-r--r-- | community/chromium/chromium-73-gcc-3.patch | 69 | ||||
-rw-r--r-- | community/chromium/chromium-73-gcc-4.patch | 59 | ||||
-rw-r--r-- | community/chromium/chromium-73-gcc-5.patch | 65 | ||||
-rw-r--r-- | community/chromium/chromium-73-gcc-6.patch | 88 | ||||
-rw-r--r-- | community/chromium/gcc-arm.patch | 12 | ||||
-rw-r--r-- | community/chromium/musl-fixes.patch | 4 | ||||
-rw-r--r-- | community/chromium/musl-sandbox.patch | 133 | ||||
-rw-r--r-- | community/chromium/no-execinfo.patch | 28 |
11 files changed, 578 insertions, 54 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD index 9d4d31a792..664e3ca884 100644 --- a/community/chromium/APKBUILD +++ b/community/chromium/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=chromium -pkgver=72.0.3626.121 +pkgver=73.0.3683.103 pkgrel=0 pkgdesc="chromium web browser" url="http://www.chromium.org/" @@ -100,6 +100,12 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn chromium-use-alpine-target.patch chromium-gcc-r1.patch + chromium-73-gcc-1.patch + chromium-73-gcc-2.patch + chromium-73-gcc-3.patch + chromium-73-gcc-4.patch + chromium-73-gcc-5.patch + chromium-73-gcc-6.patch media-base.patch musl-crashpad.patch musl-v8-fix-deadlock.patch @@ -333,32 +339,38 @@ chromedriver() { mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin } -sha512sums="0bbeba7fa662d92ad60fdb56b3a73b79fc40ecb1499bb3b9a50b78ab7900b7a4de83f271c1c299e386dc9f72bfb2cbf71f83a388c6e14e288ab42b2b673fce96 chromium-72.0.3626.121.tar.xz +sha512sums="917ba026abcab9e016cf3aab931da8baefd652858115dc96d1037d5c96ed5a0a9e0cb9a4d23d3fa35c85d25b2deca44032f7313f84a2a74bf0abb2c22250b04c chromium-73.0.3683.103.tar.xz a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop 2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys 230d1819b9d644ebaa6e194e948d662add8d237a99cc3d6b0f8a2fc2b331b43a3cd0766746f1c76c1a114f1730b40504c532d0c40aafa8cbc45022663cbcc245 default-pthread-stacksize.patch -9cd1defffb55cd1290e82b233a623e962775e19f001b26ae8f74330f3467499fd16067d607ca8e2b0b9b8d8988cd7ea2af93df65d7cc3d9299b8bc2b472c712e musl-fixes.patch +ef31809702ef020e02445ac36857c621cf852dea14c2fdf291ea0700b6fc6d94e3704726a051e95d193aa10fe74ca53a870848fec5f8153fb262f2e184affe7f musl-fixes.patch 90efbc89151c77f32434364dcbaabaf9d9a207f4a77f147cd51b3fe100832fbfb3a9fb665303a79a3d788e400f4f41890de202ccbb7bd1fc6252e33c6e74e429 musl-fixes-breakpad.patch 0aa3176f1021332088740d6e4fe2eadbe375240df0690c8449426a42a674fdf58e8a1fda85ca527dc1b4451e964d54564283fd81e3b7df059f5bcfccb8e07e84 musl-hacks.patch 95ead57f7338649351948d100e32e5ec1eeadb02bffa136ff15c6c515eceb8013c444be092d777c1b62b945bfb83b97778ba4d3a0ccc2d7c2c9a0a8cd8ee0f01 musl-libc++.patch -9b75d6ac720d1b8ddc597f0f472bc400ff866a733f12b3a4cd3e7e18e724549c5f8e056c7e0d0462ef083bff5e677f8cef6b89b22f4740a40ad6398978269373 musl-sandbox.patch -6403abf957e3497c19578c19567582d65846d532e071211421166944614219dad21e31a3589b484836919d7c1e5904d4dd8c6faf40dc514c043fe14a2ff718ef no-execinfo.patch +952a73da0ed01d40e2422cababa84224782b76a3f57d6b3de0b2d69690acc24c6fb0755991d32d31cea590cc3b8c71357160a0231f820dbf15a48155496a7a14 musl-sandbox.patch +1024bc66b74053611d46e2222a6b4954b045812a505187130a500f0cce731beaf61c098f441f7ad676711fef0b12f439436a7ce538bcb284d4e5e3d11cf53580 no-execinfo.patch db7f676d3476820c29f234b1f8f17a74e82b72d67fc727c715307734fd238e3cb0f99d8b5320d45f820b62c01163283c4829caa37afd6a9ca7592a54d3c65819 no-mallinfo.patch 6833054ef89da20c0de63faac2f87ff250b5aca3ac785fc404da4a9e03c4e00df9d7da009788e611d113cdf3be2ba50f933d85d6baf20f2df6a3711cceff5152 resolver.patch 6b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch 1b8647ab4081ec27f142eb564841b603dbf4c41118502e43b061d06f8866ebd1418d676457ed9ee0dc0a759e0369a29219bea98e74f687ddcba5d4513ca460ba secure_getenv.patch 246c43a0ab557671119ebc4ecb292925ebfee25312fb50e739a179dc085d23b9623bec2d7baecdd37ebd9318f8770664f20c12de6383def74cd89b7845d149ce chromium-use-alpine-target.patch 6e2bcbed44786c6c0d3beda935269f30fdcdf07c400defa6bf73f8359a60b1d59cc2f80dbc106be651a535635995641321d9e524b18919d3975bd6008a641d59 chromium-gcc-r1.patch +d1f1323d2347769777c67c045f4dbd331ec96788b1319f7880e780dc1cbec4306e5eff45b7d4322fcb0792acf28e58da43bfb9125052848e536f5ca7515861e3 chromium-73-gcc-1.patch +be327cbb60d31589cb32f296b4d1b3f537c0c86ad4e6928ff23254c75c858251fa3d23ad7a7a0f8ed827b6a3aa76199b8b385a5c2202ee0ce4ce73d22e9348cf chromium-73-gcc-2.patch +0be2923f9d4c5263740d54f091339e4ccc4eab7159cd7e0a0c90c9f8740698f5b85e1e825a045e556dd6b535831ac3d5fa56093eb63f8e4ceefd9917d4e5fa86 chromium-73-gcc-3.patch +e7382bdc5d365bcc4d1e9331f01f12598bd1b5d0e66183f09b176caa0d3aa7a03c1cbddd31a565203fe851b09408de5be17894216fffa57fa3d4ed0903e87710 chromium-73-gcc-4.patch +628dee3c491e5f9d2d70f8a6f9b43e1b4002f79678f30a8293f728942e7bf186ba5636fb0eac544f40002e761235fb7239e22afe0251e2de2f98ae06e2bcd4b6 chromium-73-gcc-5.patch +80d89c711c4ada2a7d1d3757fea88b7f1f75cf6105ee83e275be4fe74689f58729a1c157b69744cd0c76bd6c3055386f4f7567aa9219e70baafe2f9330ff87d8 chromium-73-gcc-6.patch 589a7acf149d44db081da2dd24a7769f2b9572a8cc64d2aad78577a64768d3b6fb2bfa02292b5260acd2c4a28c3ae9b82847ff901ce8a21baeca0b46dcda0ca9 media-base.patch 05c1af43038f76014f5f8b605085310414242f2bfad0e3258ddb29a08e7f4307de31b2d551b0a291986cc7d5a01cf3a003ac864216877195bb4310fd33193f0f musl-crashpad.patch 2c22e0d56b2557bafc842043911ecd0f8f70589013aeb7d3e8c7c8a5622bdbfe1f249e7223991ebf6130c7a45c7771a02dcc096dd03c48e2559ea4741147cfce musl-v8-fix-deadlock.patch 6953e83d4034f7a016dd055fed152a8a448f741a4c4f7a8f3b03cc7a4589d3d3c03775f844d76d6d4478ac15c655fee0be7355f0d5062ddc7fa9f6ce4b011116 musl-v8-monotonic-pthread-cont_timedwait.patch 9bfc532fd1e84e30362ac41fcd68253e17ee4cb5e986ceb5bb122e3235e4617e295ce9dddfdfbbd0b9d3e67267096152da2a19e3bb4bb9111c7fdb22fa398872 gcc8-alignof.patch bb0f3dc1ade429a398d487ae190a278948533398c4a1085aeb35ff57fefb90a1e598008ba839423ca0acd30ba4c992950f395dba3b9994d3c7187fe68b9a93d7 gcc-fno-delete-null-pointer-checks.patch -9f4a555b98ca47063fd5a90d119686de09d5c8ecdec2ef936f42cf45d3ba012e91a6455d3d550b3c90da15ca9b085238afd442a21ce47bea571ff356b74620f8 gcc-arm.patch +ebfa795879130226d5d3601901df9c3a119b4f7342c12b7a24cb1697a4fa535c9a9cc4a11d30085df569a7337846c0e26b78928fd78f53c98e5773978621753d gcc-arm.patch 3bcffb36f28a01d8bb91f1c1ee1e327caebb1e139d4e8772ad15460ee69cb5ea3307a235dc83184a9e09b687882d9617f3a3ce1a7b07cbd6e11b0a5d6a6ace81 musl-arm-limits.patch d4d46ea95ed8d47cd4b09f27d99df61cc6b72b4cb92b865310f245259d5adf02cd136888cd44ad12aeba3fd4d638982437fdf230e817d0188cc5ea76fec82cd1 chromium-71.0.3578.98-skia-aarch64-buildfix.patch 229a0c04ebd7465fabe3268959c386e63ac9e272a0506bb65785f6f9532a9f88bee436287fbcfc63e5fd9d85fb4f68f73a79475b6e6cc53dc58d715d40cd0ed2 aarch64-fixes.patch" diff --git a/community/chromium/chromium-73-gcc-1.patch b/community/chromium/chromium-73-gcc-1.patch new file mode 100644 index 0000000000..d7b5793ad4 --- /dev/null +++ b/community/chromium/chromium-73-gcc-1.patch @@ -0,0 +1,99 @@ +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 + diff --git a/community/chromium/chromium-73-gcc-2.patch b/community/chromium/chromium-73-gcc-2.patch new file mode 100644 index 0000000000..facd3fcfa2 --- /dev/null +++ b/community/chromium/chromium-73-gcc-2.patch @@ -0,0 +1,51 @@ +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 + diff --git a/community/chromium/chromium-73-gcc-3.patch b/community/chromium/chromium-73-gcc-3.patch new file mode 100644 index 0000000000..73ab49c542 --- /dev/null +++ b/community/chromium/chromium-73-gcc-3.patch @@ -0,0 +1,69 @@ +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 + diff --git a/community/chromium/chromium-73-gcc-4.patch b/community/chromium/chromium-73-gcc-4.patch new file mode 100644 index 0000000000..be5c668c12 --- /dev/null +++ b/community/chromium/chromium-73-gcc-4.patch @@ -0,0 +1,59 @@ +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 + diff --git a/community/chromium/chromium-73-gcc-5.patch b/community/chromium/chromium-73-gcc-5.patch new file mode 100644 index 0000000000..b0c814180b --- /dev/null +++ b/community/chromium/chromium-73-gcc-5.patch @@ -0,0 +1,65 @@ +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 + diff --git a/community/chromium/chromium-73-gcc-6.patch b/community/chromium/chromium-73-gcc-6.patch new file mode 100644 index 0000000000..40d85eb7af --- /dev/null +++ b/community/chromium/chromium-73-gcc-6.patch @@ -0,0 +1,88 @@ +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; diff --git a/community/chromium/gcc-arm.patch b/community/chromium/gcc-arm.patch index 4d917ff4a1..fdbb4bb7be 100644 --- a/community/chromium/gcc-arm.patch +++ b/community/chromium/gcc-arm.patch @@ -1,13 +1,11 @@ -diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index b44bda6..1d159d8 100644 ---- ./third_party/zlib/BUILD.gn +--- ./third_party/zlib/BUILD.gn.orig +++ ./third_party/zlib/BUILD.gn -@@ -63,7 +63,7 @@ config("zlib_arm_crc32_config") { - # - ChromeOS has wrapper scripts that are borking the compiler flags. +@@ -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_chromeos && !is_fuchsia) { -+ if (is_clang && !is_ios && !is_chromeos && !is_fuchsia) { +- if (!is_ios && !is_fuchsia) { ++ if (is_clang && !is_ios && !is_fuchsia) { defines = [ "CRC32_ARMV8_CRC32" ] if (is_android) { defines += [ "ARMV8_OS_ANDROID" ] diff --git a/community/chromium/musl-fixes.patch b/community/chromium/musl-fixes.patch index 30334dcbf8..7f851971ca 100644 --- a/community/chromium/musl-fixes.patch +++ b/community/chromium/musl-fixes.patch @@ -74,8 +74,8 @@ index 9067e84..1c47b2a 100644 base::Version version(gnu_get_libc_version()); UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; ---- ./device/serial/serial_io_handler_posix.cc.orig -+++ ./device/serial/serial_io_handler_posix.cc +--- ./services/device/serial/serial_io_handler_posix.cc.orig ++++ ./services/device/serial/serial_io_handler_posix.cc @@ -6,6 +6,7 @@ #include <sys/ioctl.h> diff --git a/community/chromium/musl-sandbox.patch b/community/chromium/musl-sandbox.patch index 5c4674f3c0..34717ec82c 100644 --- a/community/chromium/musl-sandbox.patch +++ b/community/chromium/musl-sandbox.patch @@ -1,6 +1,8 @@ ---- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -@@ -114,23 +114,13 @@ +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. ResultExpr RestrictCloneToThreadsAndEPERMFork() { const Arg<unsigned long> flags(0); @@ -30,29 +32,11 @@ .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM)) .Else(CrashSIGSYSClone()); } ---- ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.orig -+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -494,6 +494,7 @@ - case __NR_mlock: - case __NR_munlock: - case __NR_munmap: -+ case __NR_mremap: - return true; - case __NR_madvise: - case __NR_mincore: -@@ -509,7 +510,6 @@ - case __NR_modify_ldt: - #endif - case __NR_mprotect: -- case __NR_mremap: - case __NR_msync: - case __NR_munlockall: - case __NR_readahead: -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index 80f02c0..21fbe21 100644 +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 -@@ -373,6 +373,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { +@@ -391,6 +391,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { #if defined(__i386__) case __NR_waitpid: #endif @@ -60,7 +44,7 @@ index 80f02c0..21fbe21 100644 return true; case __NR_clone: // Should be parameter-restricted. case __NR_setns: // Privileged. -@@ -385,7 +386,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { +@@ -403,7 +404,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) case __NR_set_thread_area: #endif @@ -68,3 +52,102 @@ index 80f02c0..21fbe21 100644 case __NR_unshare: #if !defined(__mips__) && !defined(__aarch64__) case __NR_vfork: +@@ -513,6 +513,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { + case __NR_mlock: + case __NR_munlock: + case __NR_munmap: ++ case __NR_mremap: ++ case __NR_membarrier: + return true; + case __NR_madvise: + case __NR_mincore: +@@ -530,7 +532,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { + case __NR_modify_ldt: + #endif + case __NR_mprotect: +- case __NR_mremap: + 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 +index 59d0eab..7ae7002 100644 +--- 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 + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 283 ++#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 +index 1addd53..7843b5e 100644 +--- 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 + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier (__NR_SYSCALL_BASE+389) ++#endif ++ + // 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 +index ec75815..612fcfa 100644 +--- 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 + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier (__NR_Linux + 318) ++#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 +index ddbf97f..1742acd 100644 +--- 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 + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier (__NR_Linux + 358) ++#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 +index a6afc62..7ed0a3b 100644 +--- 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 + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 375 ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_ + +diff --git sandbox/linux/system_headers/x86_64_linux_syscalls.h sandbox/linux/system_headers/x86_64_linux_syscalls.h +index 349504a..ea3c7c9 100644 +--- sandbox/linux/system_headers/x86_64_linux_syscalls.h ++++ sandbox/linux/system_headers/x86_64_linux_syscalls.h +@@ -1290,5 +1290,9 @@ + #define __NR_memfd_create 319 + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 324 ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_ + diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch index 95451f256b..8610ecc23d 100644 --- a/community/chromium/no-execinfo.patch +++ b/community/chromium/no-execinfo.patch @@ -1,6 +1,6 @@ ---- base/debug/stack_trace_posix.cc.orig 2017-07-27 14:05:05.534241443 +0000 -+++ base/debug/stack_trace_posix.cc 2017-07-27 14:07:54.669231362 +0000 -@@ -26,7 +26,7 @@ +--- ./base/debug/stack_trace_posix.cc.orig ++++ ./base/debug/stack_trace_posix.cc +@@ -27,7 +27,7 @@ #if !defined(USE_SYMBOLIZE) #include <cxxabi.h> #endif @@ -9,7 +9,7 @@ #include <execinfo.h> #endif -@@ -80,7 +80,7 @@ +@@ -86,7 +86,7 @@ // Note: code in this function is NOT async-signal safe (std::string uses // malloc internally). @@ -18,7 +18,7 @@ std::string::size_type search_from = 0; while (search_from < text->size()) { // Look for the start of a mangled symbol, from search_from. -@@ -115,7 +115,7 @@ +@@ -121,7 +121,7 @@ search_from = mangled_start + 2; } } @@ -27,8 +27,8 @@ } #endif // !defined(USE_SYMBOLIZE) -@@ -127,7 +127,7 @@ - virtual ~BacktraceOutputHandler() {} +@@ -133,7 +133,7 @@ + virtual ~BacktraceOutputHandler() = default; }; -#if !defined(__UCLIBC__) && !defined(_AIX) @@ -36,7 +36,7 @@ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { // This should be more than enough to store a 64-bit number in hex: // 16 hex digits + 1 for null-terminator. -@@ -204,7 +204,7 @@ +@@ -216,7 +216,7 @@ } #endif // defined(USE_SYMBOLIZE) } @@ -45,16 +45,16 @@ void PrintToStderr(const char* output) { // NOTE: This code MUST be async-signal safe (it's used by in-process -@@ -721,7 +721,7 @@ - // NOTE: This code MUST be async-signal safe (it's used by in-process - // stack dumping signal handler). NO malloc or stdio is allowed here. +@@ -812,7 +812,7 @@ + // NOTE: This code MUST be async-signal safe (it's used by in-process + // stack dumping signal handler). NO malloc or stdio is allowed here. -#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) && !defined(_AIX) - count = std::min(arraysize(trace_), count); - // Though the backtrace API man page does not list any possible negative -@@ -827,13 +827,13 @@ + // return values, we take no chance. + return base::saturated_cast<size_t>(backtrace(trace, count)); +@@ -825,13 +825,13 @@ // NOTE: This code MUST be async-signal safe (it's used by in-process // stack dumping signal handler). NO malloc or stdio is allowed here. |