Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] chromium: update to 111.0.5563.64.
@ 2023-03-18 15:51 Duncaen
  2023-03-18 23:53 ` [PR PATCH] [Updated] " Duncaen
  2023-03-18 23:54 ` [PR PATCH] [Merged]: " Duncaen
  0 siblings, 2 replies; 3+ messages in thread
From: Duncaen @ 2023-03-18 15:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

There is a new pull request by Duncaen against master on the void-packages repository

https://github.com/Duncaen/void-packages chromium-111
https://github.com/void-linux/void-packages/pull/42842

chromium: update to 111.0.5563.64.
[ci skip]

* [x] x86_64-glibc
* [ ] x86_64-musl
* [ ] aarch64-musl
* [ ] i686

A patch file from https://github.com/void-linux/void-packages/pull/42842.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chromium-111-42842.patch --]
[-- Type: text/x-diff, Size: 37757 bytes --]

From 56dcf1dfd2cb950b75d512e2147b337540cbcc74 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sat, 18 Mar 2023 00:41:37 +0100
Subject: [PATCH] chromium: update to 111.0.5563.64.

---
 .../patches/build-add-use_cxx17.patch         |  22 --
 ...hromium-103-VirtualCursor-std-layout.patch | 231 ------------------
 ...chromium-110-CredentialUIEntry-const.patch |  41 ----
 ...romium-110-DarkModeLABColorSpace-pow.patch |  37 ---
 .../chromium-110-NativeThemeBase-fabs.patch   |  29 ---
 .../patches/fix-gnu-libc-version-usage.patch  |  21 --
 .../patches/fix-libc-version-include.patch    |  15 ++
 .../chromium/patches/fix-narrowing-cast.patch |  16 --
 .../patches/fix-stack-utils-with-musl.patch   |  20 --
 srcpkgs/chromium/patches/musl-stat.patch      |  12 -
 srcpkgs/chromium/patches/no-execinfo.patch    |  54 ----
 ...-constraints-on-VirtualCursor-layout.patch |  48 ++++
 ...the-Stack-object-from-ThreadLocalTop.patch | 205 ----------------
 srcpkgs/chromium/template                     |   6 +-
 14 files changed, 66 insertions(+), 691 deletions(-)
 delete mode 100644 srcpkgs/chromium/patches/build-add-use_cxx17.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
 create mode 100644 srcpkgs/chromium/patches/fix-libc-version-include.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-narrowing-cast.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
 delete mode 100644 srcpkgs/chromium/patches/musl-stat.patch
 create mode 100644 srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch
 delete mode 100644 srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch

diff --git a/srcpkgs/chromium/patches/build-add-use_cxx17.patch b/srcpkgs/chromium/patches/build-add-use_cxx17.patch
deleted file mode 100644
index b50825fb7e2c..000000000000
--- a/srcpkgs/chromium/patches/build-add-use_cxx17.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/build/config/compiler/BUILD.gn
-+++ b/build/config/compiler/BUILD.gn
-@@ -191,6 +191,10 @@
-                                                        current_cpu == "x64"))))
- }
- 
-+declare_args() {
-+  use_cxx17 = false
-+}
-+
- if (is_android || (is_chromeos_ash && is_chromeos_device)) {
-   # Set the path to use orderfile for linking Chrome
-   # Note that this is for using only one orderfile for linking
-@@ -605,7 +609,7 @@
-         cflags_cc += [ "-fno-trigraphs" ]
-       }
-     } else if (is_clang) {
--      if (is_chromeos_device) {
-+      if (is_chromeos_device || use_cxx17) {
-         # TODO(crbug.com/1392471): Support C++20 in CrOS toolchain.
-         cflags_cc += [ "-std=${standard_prefix}++17" ]
-       } else {
diff --git a/srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch b/srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch
deleted file mode 100644
index be0502e991be..000000000000
--- a/srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Sun, 16 Jan 2022 19:15:26 +0000
-Subject: [PATCH] sql: make VirtualCursor standard layout type
-
-sql::recover::VirtualCursor needs to be a standard layout type, but
-has members of type std::unique_ptr. However, std::unique_ptr is not
-guaranteed to be standard layout. Compiling with clang combined with
-gcc-11 libstdc++ fails because of this.
-
-Bug: 1189788
-Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
----
-
-diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
-index cc9420e5..f12d8fa 100644
---- a/sql/recover_module/btree.cc
-+++ b/sql/recover_module/btree.cc
-@@ -136,16 +136,22 @@
-               "Move the destructor to the .cc file if it's non-trival");
- #endif  // !DCHECK_IS_ON()
- 
--LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
--    : page_id_(db_reader->page_id()),
--      db_reader_(db_reader),
--      cell_count_(ComputeCellCount(db_reader)),
--      next_read_index_(0),
--      last_record_size_(0) {
-+LeafPageDecoder::LeafPageDecoder() noexcept = default;
-+
-+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
-+  page_id_ = db_reader->page_id();
-+  db_reader_ = db_reader;
-+  cell_count_ = ComputeCellCount(db_reader);
-+  next_read_index_ = 0;
-+  last_record_size_ = 0;
-   DCHECK(IsOnValidPage(db_reader));
-   DCHECK(DatabasePageReader::IsValidPageId(page_id_));
- }
- 
-+void LeafPageDecoder::Reset() {
-+  db_reader_ = nullptr;
-+}
-+
- bool LeafPageDecoder::TryAdvance() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(CanAdvance());
-diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
-index eaa087a5..df0e0c9 100644
---- a/sql/recover_module/btree.h
-+++ b/sql/recover_module/btree.h
-@@ -101,9 +101,7 @@
-  public:
-   // Creates a decoder for a DatabasePageReader's last read page.
-   //
--  // |db_reader| must have been used to read an inner page of a table B-tree.
--  // |db_reader| must outlive this instance.
--  explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
-+  LeafPageDecoder() noexcept;
-   ~LeafPageDecoder() noexcept = default;
- 
-   LeafPageDecoder(const LeafPageDecoder&) = delete;
-@@ -151,6 +149,17 @@
-   // read as long as CanAdvance() returns true.
-   bool TryAdvance();
- 
-+  // Initialize with DatabasePageReader
-+  // |db_reader| must have been used to read an inner page of a table B-tree.
-+  // |db_reader| must outlive this instance.
-+  void Initialize(DatabasePageReader* db_reader);
-+
-+  // Reset internal DatabasePageReader
-+  void Reset();
-+
-+  // True if DatabasePageReader is valid
-+  bool IsValid() { return (db_reader_ != nullptr); }
-+
-   // True if the given reader may point to an inner page in a table B-tree.
-   //
-   // The last ReadPage() call on |db_reader| must have succeeded.
-@@ -164,14 +173,14 @@
-   static int ComputeCellCount(DatabasePageReader* db_reader);
- 
-   // The number of the B-tree page this reader is reading.
--  const int64_t page_id_;
-+  int64_t page_id_;
-   // Used to read the tree page.
-   //
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the DatabasePageReader outlives this.
--  DatabasePageReader* const db_reader_;
-+  DatabasePageReader* db_reader_;
-   // Caches the ComputeCellCount() value for this reader's page.
--  const int cell_count_ = ComputeCellCount(db_reader_);
-+  int cell_count_;
- 
-   // The reader's cursor state.
-   //
-diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
-index 4f827ed..240de499 100644
---- a/sql/recover_module/cursor.cc
-+++ b/sql/recover_module/cursor.cc
-@@ -28,7 +28,7 @@
- int VirtualCursor::First() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   inner_decoders_.clear();
--  leaf_decoder_ = nullptr;
-+  leaf_decoder_.Reset();
- 
-   AppendPageDecoder(table_->root_page_id());
-   return Next();
-@@ -38,18 +38,18 @@
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   record_reader_.Reset();
- 
--  while (!inner_decoders_.empty() || leaf_decoder_.get()) {
--    if (leaf_decoder_.get()) {
--      if (!leaf_decoder_->CanAdvance()) {
-+  while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
-+    if (leaf_decoder_.IsValid()) {
-+      if (!leaf_decoder_.CanAdvance()) {
-         // The leaf has been exhausted. Remove it from the DFS stack.
--        leaf_decoder_ = nullptr;
-+        leaf_decoder_.Reset();
-         continue;
-       }
--      if (!leaf_decoder_->TryAdvance())
-+      if (!leaf_decoder_.TryAdvance())
-         continue;
- 
--      if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
--                                      leaf_decoder_->last_record_offset())) {
-+      if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
-+                                      leaf_decoder_.last_record_offset())) {
-         continue;
-       }
-       if (!record_reader_.Initialize())
-@@ -101,13 +101,13 @@
- int64_t VirtualCursor::RowId() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(record_reader_.IsInitialized());
--  DCHECK(leaf_decoder_.get());
--  return leaf_decoder_->last_record_rowid();
-+  DCHECK(leaf_decoder_.IsValid());
-+  return leaf_decoder_.last_record_rowid();
- }
- 
- void VirtualCursor::AppendPageDecoder(int page_id) {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
--  DCHECK(leaf_decoder_.get() == nullptr)
-+  DCHECK(!leaf_decoder_.IsValid())
-       << __func__
-       << " must only be called when the current path has no leaf decoder";
- 
-@@ -115,7 +115,7 @@
-     return;
- 
-   if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
--    leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
-+    leaf_decoder_.Initialize(&db_reader_);
-     return;
-   }
- 
-diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
-index 845b785..cc4e85f8 100644
---- a/sql/recover_module/cursor.h
-+++ b/sql/recover_module/cursor.h
-@@ -130,7 +130,7 @@
-   std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
- 
-   // Decodes the leaf page containing records.
--  std::unique_ptr<LeafPageDecoder> leaf_decoder_;
-+  LeafPageDecoder leaf_decoder_;
- 
-   SEQUENCE_CHECKER(sequence_checker_);
- };
-diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
-index 58e75de..69d98cef 100644
---- a/sql/recover_module/pager.cc
-+++ b/sql/recover_module/pager.cc
-@@ -23,8 +23,7 @@
-               "ints are not appropriate for representing page IDs");
- 
- DatabasePageReader::DatabasePageReader(VirtualTable* table)
--    : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
--      table_(table) {
-+    : page_data_(table->page_size()), table_(table) {
-   DCHECK(table != nullptr);
-   DCHECK(IsValidPageSize(table->page_size()));
- }
-@@ -58,7 +57,7 @@
-                 "The |read_offset| computation above may overflow");
- 
-   int sqlite_status =
--      RawRead(sqlite_file, read_size, read_offset, page_data_.get());
-+      RawRead(sqlite_file, read_size, read_offset, page_data_.data());
- 
-   // |page_id_| needs to be set to kInvalidPageId if the read failed.
-   // Otherwise, future ReadPage() calls with the previous |page_id_| value
-diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
-index 07cac3cb..d08f093 100644
---- a/sql/recover_module/pager.h
-+++ b/sql/recover_module/pager.h
-@@ -6,8 +6,8 @@
- #define SQL_RECOVER_MODULE_PAGER_H_
- 
- #include <cstdint>
--#include <memory>
- #include <ostream>
-+#include <vector>
- 
- #include "base/check_op.h"
- #include "base/memory/raw_ptr.h"
-@@ -72,7 +72,7 @@
-     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-     DCHECK_NE(page_id_, kInvalidPageId)
-         << "Successful ReadPage() required before accessing pager state";
--    return page_data_.get();
-+    return page_data_.data();
-   }
- 
-   // The number of bytes in the page read by the last ReadPage() call.
-@@ -139,7 +139,7 @@
-   int page_id_ = kInvalidPageId;
-   // Stores the bytes of the last page successfully read by ReadPage().
-   // The content is undefined if the last call to ReadPage() did not succeed.
--  const std::unique_ptr<uint8_t[]> page_data_;
-+  std::vector<uint8_t> page_data_;
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the VirtualTable outlives this.
-   const raw_ptr<VirtualTable> table_;
diff --git a/srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch b/srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch
deleted file mode 100644
index eb68aa27aca4..000000000000
--- a/srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b4e56d22275cae5a910463a966a96345430a83ea Mon Sep 17 00:00:00 2001
-From: Ivan Murashov <ivan.murashov@lge.com>
-Date: Sat, 17 Dec 2022 12:06:01 +0000
-Subject: [PATCH] libstdc++: Don't use const members in std::vector in password_manager::CredentialUIEntry
-
-Otherwise build fails when building with use_custom_libcxx=false.
-The error example:
-std::vector must have a non-const, non-volatile value_type
-
-Implementation of std::vector in libstdc++ does not allow const.
-
-Bug: 957519
-Change-Id: I089de2d52df25138d74dbf01fdf61d6301b4d871
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111037
-Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
-Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
-Cr-Commit-Position: refs/heads/main@{#1084697}
----
-
-diff --git a/components/password_manager/core/browser/ui/credential_ui_entry.cc b/components/password_manager/core/browser/ui/credential_ui_entry.cc
-index 1e0766a..a9a34f7 100644
---- a/components/password_manager/core/browser/ui/credential_ui_entry.cc
-+++ b/components/password_manager/core/browser/ui/credential_ui_entry.cc
-@@ -97,7 +97,7 @@
-   // For cases when the notes differ within grouped passwords (e.g: a
-   // credential exists in both account and profile stores), respective notes
-   // should be concatenated and linebreak used as a delimiter.
--  std::vector<const std::u16string> notes_with_duplicates;
-+  std::vector<std::u16string> notes_with_duplicates;
-   for (const auto& form : forms) {
-     // Only notes with an empty `unique_display_name` are supported in the
-     // settings UI.
-@@ -109,7 +109,7 @@
-   }
-   auto unique_notes =
-       base::MakeFlatSet<std::u16string>(std::move(notes_with_duplicates));
--  note = base::JoinString(std::vector<const std::u16string>(
-+  note = base::JoinString(std::vector<std::u16string>(
-                               unique_notes.begin(), unique_notes.end()),
-                           u"\n");
- 
diff --git a/srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch b/srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch
deleted file mode 100644
index 91f1aee073e6..000000000000
--- a/srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 795c311aae4b718585bc6194189f061000c823a1 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Fri, 23 Dec 2022 14:28:55 +0000
-Subject: [PATCH] libstdc++: fix narrowing in blink::DarkModeLABColorSpace
-
-Clang-14 errors out with narrowing from double to float. Use std::pow
-instead.
----
- .../renderer/platform/graphics/dark_mode_lab_color_space.h   | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h b/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
-index 999c3e5..c18ea7b 100644
---- a/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
-+++ b/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
-@@ -125,7 +125,7 @@ class DarkModeLABColorSpace {
-   // https://en.wikipedia.org/wiki/CIELAB_color_space#Reverse_transformation.
-   SkV3 FromXYZ(const SkV3& v) const {
-     auto f = [](float x) {
--      return x > kSigma3 ? pow(x, 1.0f / 3.0f)
-+      return x > kSigma3 ? std::pow(x, 1.0f / 3.0f)
-                          : x / (3 * kSigma2) + 4.0f / 29.0f;
-     };
- 
-@@ -145,7 +145,8 @@ class DarkModeLABColorSpace {
-   // https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation.
-   SkV3 ToXYZ(const SkV3& lab) const {
-     auto invf = [](float x) {
--      return x > kSigma ? pow(x, 3.0f) : 3.0f * kSigma2 * (x - 4.0f / 29.0f);
-+      return x > kSigma ? std::pow(x, 3.0f)
-+                        : 3.0f * kSigma2 * (x - 4.0f / 29.0f);
-     };
- 
-     SkV3 v = {Clamp(lab.x, 0.0f, 100.0f), Clamp(lab.y, -128.0f, 128.0f),
--- 
-2.38.2
-
diff --git a/srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch b/srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch
deleted file mode 100644
index c7d0e8b1de8d..000000000000
--- a/srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 07f0a87e4409f27854b3a1d17f270a3497f38947 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Mon, 19 Dec 2022 19:07:37 +0000
-Subject: [PATCH] GCC: use fabsf in ui::NativeThemeBase::OutlineColor
-
-Template deduction fails for base::clamp, because return type of
-fabs is double and all other parameters are float.
-
-Bug: 819294
-Change-Id: I34f1c9c99d13f69097d899bfcb0526cbdf4fe1c1
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4110869
-Reviewed-by: Peter Kasting <pkasting@chromium.org>
-Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
-Cr-Commit-Position: refs/heads/main@{#1085034}
----
-
-diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
-index 169c60c..36db49a 100644
---- a/ui/native_theme/native_theme_base.cc
-+++ b/ui/native_theme/native_theme_base.cc
-@@ -1336,7 +1336,7 @@
-   // The following code has been tested to look OK with all of the
-   // default GTK themes.
-   SkScalar min_diff = base::clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f);
--  SkScalar diff = base::clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
-+  SkScalar diff = base::clamp(fabsf(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
- 
-   if (hsv1[2] + hsv2[2] > 1.0)
-     diff = -diff;
diff --git a/srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch b/srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
deleted file mode 100644
index 2522294f75ea..000000000000
--- a/srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
-+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
-@@ -59,7 +59,9 @@
- // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
- // of lacros-chrome is complete.
- #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
-+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
- #include <gnu/libc-version.h>
-+#endif  // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
- 
- #include "base/linux_util.h"
- #include "base/strings/string_split.h"
-@@ -323,7 +323,7 @@
- void RecordLinuxGlibcVersion() {
- // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
- // of lacros-chrome is complete.
--#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
-+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
-   base::Version version(gnu_get_libc_version());
- 
-   UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
diff --git a/srcpkgs/chromium/patches/fix-libc-version-include.patch b/srcpkgs/chromium/patches/fix-libc-version-include.patch
new file mode 100644
index 000000000000..d94dcf6deac5
--- /dev/null
+++ b/srcpkgs/chromium/patches/fix-libc-version-include.patch
@@ -0,0 +1,15 @@
+--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
++++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -61,8 +61,11 @@
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++
++#if defined(__GLIBC__)
+ #include <gnu/libc-version.h>
++#endif
+ 
+ #include "base/linux_util.h"
+ #include "base/strings/string_split.h"
diff --git a/srcpkgs/chromium/patches/fix-narrowing-cast.patch b/srcpkgs/chromium/patches/fix-narrowing-cast.patch
deleted file mode 100644
index 1a247e54fe7c..000000000000
--- a/srcpkgs/chromium/patches/fix-narrowing-cast.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/base/system/sys_info_posix.cc
-+++ b/base/system/sys_info_posix.cc
-@@ -62,10 +62,10 @@
-   if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
-     return false;
- 
--  switch (stats.f_type) {
-+  switch (static_cast<uintmax_t>(stats.f_type)) {
-     case TMPFS_MAGIC:
--    case static_cast<int>(HUGETLBFS_MAGIC):
--    case static_cast<int>(RAMFS_MAGIC):
-+    case HUGETLBFS_MAGIC:
-+    case RAMFS_MAGIC:
-       return true;
-   }
-   return false;
diff --git a/srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch b/srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
deleted file mode 100644
index 7936aa6e0db4..000000000000
--- a/srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/third_party/blink/renderer/platform/wtf/stack_util.cc.orig
-+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc
-@@ -29,7 +29,7 @@
- // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
- // correctly for the main thread.
- 
--#elif defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-     BUILDFLAG(IS_FUCHSIA)
-   // pthread_getattr_np() can fail if the thread is not invoked by
-   // pthread_create() (e.g., the main thread of blink_unittests).
-@@ -97,7 +97,7 @@
- }
- 
- void* GetStackStart() {
--#if defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-     BUILDFLAG(IS_FUCHSIA)
-   pthread_attr_t attr;
-   int error;
diff --git a/srcpkgs/chromium/patches/musl-stat.patch b/srcpkgs/chromium/patches/musl-stat.patch
deleted file mode 100644
index b25e3c062172..000000000000
--- a/srcpkgs/chromium/patches/musl-stat.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/base/files/file.h.orig
-+++ b/base/files/file.h
-@@ -19,7 +19,8 @@
- #include "build/build_config.h"
- 
- #if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NACL) || \
--    BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21)
-+    BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) || \
-+    (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
- struct stat;
- namespace base {
- typedef struct stat stat_wrapper_t;
diff --git a/srcpkgs/chromium/patches/no-execinfo.patch b/srcpkgs/chromium/patches/no-execinfo.patch
index 6e67182b21b6..747476d75b15 100644
--- a/srcpkgs/chromium/patches/no-execinfo.patch
+++ b/srcpkgs/chromium/patches/no-execinfo.patch
@@ -1,57 +1,3 @@
---- a/base/debug/stack_trace_posix.cc
-+++ b/base/debug/stack_trace_posix.cc
-@@ -27,7 +27,7 @@
- #if !defined(USE_SYMBOLIZE)
- #include <cxxabi.h>
- #endif
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- #include <execinfo.h>
- #endif
- 
-@@ -89,7 +89,7 @@
-   // Note: code in this function is NOT async-signal safe (std::string uses
-   // malloc internally).
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
-   std::string::size_type search_from = 0;
-   while (search_from < text->size()) {
-     // Look for the start of a mangled symbol, from search_from.
-@@ -136,7 +136,7 @@
-   virtual ~BacktraceOutputHandler() = default;
- };
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- 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.
-@@ -839,7 +839,7 @@
-   // If we do not have unwind tables, then try tracing using frame pointers.
-   return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
-                                               count, 0);
--#elif !defined(__UCLIBC__) && !defined(_AIX)
-+#elif defined(__GLIBC__) && !defined(_AIX)
-   // Though the backtrace API man page does not list any possible negative
-   // return values, we take no chance.
-   return base::saturated_cast<size_t>(backtrace(trace, count));
-@@ -852,13 +852,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.
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
-   PrintBacktraceOutputHandler handler;
-   ProcessBacktrace(trace_, count_, prefix_string, &handler);
- #endif
- }
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
-                                           const char* prefix_string) const {
-   StreamBacktraceOutputHandler handler(os);
 --- a/v8/src/codegen/external-reference-table.cc.orig
 +++ b/v8/src/codegen/external-reference-table.cc
 @@ -11,7 +11,9 @@
diff --git a/srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch b/srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch
new file mode 100644
index 000000000000..d1e65ee1561c
--- /dev/null
+++ b/srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch
@@ -0,0 +1,48 @@
+From 7d1394bd639e3bcf68082ac3fc33eeed6a00d2e6 Mon Sep 17 00:00:00 2001
+From: Elly Fong-Jones <ellyjones@chromium.org>
+Date: Thu, 2 Mar 2023 00:15:11 +0000
+Subject: [PATCH] sql: relax constraints on VirtualCursor layout
+
+VirtualCursor::FromSqliteCursor required that VirtualCursor had a
+standard layout, but in fact VirtualCursor shouldn't have a standard
+layout, and the fact that it does with libc++ is a deviation from the
+C++ standard. This change:
+
+1. Relaxes the requirement that VirtualCursor has a standard layout, and
+2. Relaxes the requirement that the sqlite_cursor_ field has to be at
+   offset 0
+
+by use of offsetof() and pointer subtraction. This change both improves
+standards compliance and makes this code build with libstdc++.
+
+Bug: 1380656
+Change-Id: I9c47abd9197b187da0360ca5619ccf7dadab4f33
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4292313
+Reviewed-by: Austin Sullivan <asully@chromium.org>
+Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1111925}
+---
+ sql/recover_module/cursor.h | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
+index 1970bdca8c6..4cb06557009 100644
+--- a/sql/recover_module/cursor.h
++++ b/sql/recover_module/cursor.h
+@@ -63,12 +63,10 @@ class VirtualCursor {
+   // |sqlite_cursor| must have been returned by VirtualTable::SqliteCursor().
+   static inline VirtualCursor* FromSqliteCursor(
+       sqlite3_vtab_cursor* sqlite_cursor) {
+-    static_assert(std::is_standard_layout<VirtualCursor>::value,
+-                  "needed for the reinterpret_cast below");
+-    static_assert(offsetof(VirtualCursor, sqlite_cursor_) == 0,
+-                  "sqlite_cursor_ must be the first member of the class");
+-    VirtualCursor* result = reinterpret_cast<VirtualCursor*>(sqlite_cursor);
+-    DCHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
++    VirtualCursor* result = reinterpret_cast<VirtualCursor*>(
++        (reinterpret_cast<char*>(sqlite_cursor) -
++         offsetof(VirtualCursor, sqlite_cursor_)));
++    CHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
+     return result;
+   }
+ 
diff --git a/srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch b/srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch
deleted file mode 100644
index 73e042cf5562..000000000000
--- a/srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From 7b6fbcd0a6700db498ad55db046ecda92c8ee8c1 Mon Sep 17 00:00:00 2001
-From: Nikolaos Papaspyrou <nikolaos@chromium.org>
-Date: Sun, 29 Jan 2023 17:18:08 +0100
-Subject: [PATCH] Merge: [heap] Move the Stack object from ThreadLocalTop to
- Isolate
-
-This is just for nodejs, do not backmerge to 11.0.
-(cherry picked from commit 1e4b71d99fea5ea6bb4bf6420585a7819872bb0f)
-
-> Change-Id: I026a35af3bc6999a09b21f277756d4454c086343
-> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152476
-> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
-> Reviewed-by: Omer Katz <omerkatz@chromium.org>
-> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
-> Cr-Commit-Position: refs/heads/main@{#85445}
-
-Stack information is thread-specific and, until now, it was stored in a
-field in ThreadLocalTop. This CL moves stack information to the isolate
-and makes sure to update the stack start whenever a main thread enters
-the isolate. At the same time, the Stack object is refactored and
-simplified.
-
-As a side effect, after removing the Stack object, ThreadLocalTop
-satisfies the std::standard_layout trait; this fixes some issues
-observed with different C++ compilers.
-
-Bug: v8:13630
-Bug: v8:13257
-Change-Id: I4be1f04fe90699e1a6e456dad3e0dd623851acce
----
- src/execution/isolate.cc          | 36 +++++++++++++++----------------
- src/execution/isolate.h           |  6 ++++++
- src/execution/thread-local-top.cc |  2 --
- src/execution/thread-local-top.h  |  6 +-----
- src/heap/heap.cc                  |  4 +---
- 5 files changed, 25 insertions(+), 29 deletions(-)
-
-diff --git a/src/execution/isolate.cc b/src/execution/isolate.cc
-index 4edf364e0a..be4fd400d2 100644
---- a/v8/src/execution/isolate.cc
-+++ b/v8/src/execution/isolate.cc
-@@ -3074,22 +3074,23 @@ void Isolate::AddSharedWasmMemory(Handle<WasmMemoryObject> memory_object) {
- void Isolate::RecordStackSwitchForScanning() {
-   Object current = root(RootIndex::kActiveContinuation);
-   DCHECK(!current.IsUndefined());
--  thread_local_top()->stack_.ClearStackSegments();
--  wasm::StackMemory* stack = Managed<wasm::StackMemory>::cast(
--                                 WasmContinuationObject::cast(current).stack())
--                                 .get()
--                                 .get();
-+  stack().ClearStackSegments();
-+  wasm::StackMemory* wasm_stack =
-+      Managed<wasm::StackMemory>::cast(
-+          WasmContinuationObject::cast(current).stack())
-+          .get()
-+          .get();
-   current = WasmContinuationObject::cast(current).parent();
--  thread_local_top()->stack_.SetStackStart(
--      reinterpret_cast<void*>(stack->base()));
-+  heap()->SetStackStart(reinterpret_cast<void*>(wasm_stack->base()));
-   // We don't need to add all inactive stacks. Only the ones in the active chain
-   // may contain cpp heap pointers.
-   while (!current.IsUndefined()) {
-     auto cont = WasmContinuationObject::cast(current);
--    auto* stack = Managed<wasm::StackMemory>::cast(cont.stack()).get().get();
--    thread_local_top()->stack_.AddStackSegment(
--        reinterpret_cast<const void*>(stack->base()),
--        reinterpret_cast<const void*>(stack->jmpbuf()->sp));
-+    auto* wasm_stack =
-+        Managed<wasm::StackMemory>::cast(cont.stack()).get().get();
-+    stack().AddStackSegment(
-+        reinterpret_cast<const void*>(wasm_stack->base()),
-+        reinterpret_cast<const void*>(wasm_stack->jmpbuf()->sp));
-     current = cont.parent();
-   }
- }
-@@ -3377,20 +3378,13 @@ void Isolate::Delete(Isolate* isolate) {
-   Isolate* saved_isolate = isolate->TryGetCurrent();
-   SetIsolateThreadLocals(isolate, nullptr);
-   isolate->set_thread_id(ThreadId::Current());
--  isolate->thread_local_top()->stack_ =
--      saved_isolate ? std::move(saved_isolate->thread_local_top()->stack_)
--                    : ::heap::base::Stack(base::Stack::GetStackStart());
-+  isolate->heap()->SetStackStart(base::Stack::GetStackStart());
- 
-   bool owns_shared_isolate = isolate->owns_shared_isolate_;
-   Isolate* maybe_shared_isolate = isolate->shared_isolate_;
- 
-   isolate->Deinit();
- 
--  // Restore the saved isolate's stack.
--  if (saved_isolate)
--    saved_isolate->thread_local_top()->stack_ =
--        std::move(isolate->thread_local_top()->stack_);
--
- #ifdef DEBUG
-   non_disposed_isolates_--;
- #endif  // DEBUG
-@@ -4647,6 +4641,10 @@ bool Isolate::Init(SnapshotData* startup_snapshot_data,
- void Isolate::Enter() {
-   Isolate* current_isolate = nullptr;
-   PerIsolateThreadData* current_data = CurrentPerIsolateThreadData();
-+
-+  // Set the stack start for the main thread that enters the isolate.
-+  heap()->SetStackStart(base::Stack::GetStackStart());
-+
-   if (current_data != nullptr) {
-     current_isolate = current_data->isolate_;
-     DCHECK_NOT_NULL(current_isolate);
-diff --git a/src/execution/isolate.h b/src/execution/isolate.h
-index a32f999fe5..1cb6e10661 100644
---- a/v8/src/execution/isolate.h
-+++ b/v8/src/execution/isolate.h
-@@ -32,6 +32,7 @@
- #include "src/execution/stack-guard.h"
- #include "src/handles/handles.h"
- #include "src/handles/traced-handles.h"
-+#include "src/heap/base/stack.h"
- #include "src/heap/factory.h"
- #include "src/heap/heap.h"
- #include "src/heap/read-only-heap.h"
-@@ -2022,6 +2023,8 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
-   SimulatorData* simulator_data() { return simulator_data_; }
- #endif
- 
-+  ::heap::base::Stack& stack() { return stack_; }
-+
- #ifdef V8_ENABLE_WEBASSEMBLY
-   wasm::StackMemory*& wasm_stacks() { return wasm_stacks_; }
-   // Update the thread local's Stack object so that it is aware of the new stack
-@@ -2520,6 +2523,9 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
-   // The mutex only guards adding pages, the retrieval is signal safe.
-   base::Mutex code_pages_mutex_;
- 
-+  // Stack information for the main thread.
-+  ::heap::base::Stack stack_;
-+
- #ifdef V8_ENABLE_WEBASSEMBLY
-   wasm::StackMemory* wasm_stacks_;
- #endif
-diff --git a/src/execution/thread-local-top.cc b/src/execution/thread-local-top.cc
-index 0d7071ddda..05cc20b8e4 100644
---- a/v8/src/execution/thread-local-top.cc
-+++ b/v8/src/execution/thread-local-top.cc
-@@ -37,14 +37,12 @@ void ThreadLocalTop::Clear() {
-   current_embedder_state_ = nullptr;
-   failed_access_check_callback_ = nullptr;
-   thread_in_wasm_flag_address_ = kNullAddress;
--  stack_ = ::heap::base::Stack();
- }
- 
- void ThreadLocalTop::Initialize(Isolate* isolate) {
-   Clear();
-   isolate_ = isolate;
-   thread_id_ = ThreadId::Current();
--  stack_.SetStackStart(base::Stack::GetStackStart());
- #if V8_ENABLE_WEBASSEMBLY
-   thread_in_wasm_flag_address_ = reinterpret_cast<Address>(
-       trap_handler::GetThreadInWasmThreadLocalAddress());
-diff --git a/src/execution/thread-local-top.h b/src/execution/thread-local-top.h
-index 43fec0a7df..989c817f31 100644
---- a/v8/src/execution/thread-local-top.h
-+++ b/v8/src/execution/thread-local-top.h
-@@ -10,7 +10,6 @@
- #include "include/v8-unwinder.h"
- #include "src/common/globals.h"
- #include "src/execution/thread-id.h"
--#include "src/heap/base/stack.h"
- #include "src/objects/contexts.h"
- #include "src/utils/utils.h"
- 
-@@ -30,7 +29,7 @@ class ThreadLocalTop {
-   // TODO(all): This is not particularly beautiful. We should probably
-   // refactor this to really consist of just Addresses and 32-bit
-   // integer fields.
--  static constexpr uint32_t kSizeInBytes = 30 * kSystemPointerSize;
-+  static constexpr uint32_t kSizeInBytes = 25 * kSystemPointerSize;
- 
-   // Does early low-level initialization that does not depend on the
-   // isolate being present.
-@@ -147,9 +146,6 @@ class ThreadLocalTop {
- 
-   // Address of the thread-local "thread in wasm" flag.
-   Address thread_in_wasm_flag_address_;
--
--  // Stack information.
--  ::heap::base::Stack stack_;
- };
- 
- }  // namespace internal
-diff --git a/src/heap/heap.cc b/src/heap/heap.cc
-index 51a90ddcab..b5722ab6ec 100644
---- a/v8/src/heap/heap.cc
-+++ b/v8/src/heap/heap.cc
-@@ -5851,9 +5851,7 @@ void Heap::SetStackStart(void* stack_start) {
-   stack().SetStackStart(stack_start);
- }
- 
--::heap::base::Stack& Heap::stack() {
--  return isolate_->thread_local_top()->stack_;
--}
-+::heap::base::Stack& Heap::stack() { return isolate_->stack(); }
- 
- void Heap::RegisterExternallyReferencedObject(Address* location) {
-   Object object = TracedHandles::Mark(location, TracedHandles::MarkMode::kAll);
diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index b4b03f3b1410..3c1c1caf3765 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -1,7 +1,7 @@
 # Template file for 'chromium'
 pkgname=chromium
 # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
-version=110.0.5481.77
+version=111.0.5563.64
 revision=1
 archs="i686* x86_64* aarch64* armv7l*"
 hostmakedepends="
@@ -28,12 +28,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://www.chromium.org/"
 distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
-checksum=e348ab2dc4311083e729d714a81e95dd9db108ff71437dde451c97ac939881ce
+checksum=7d5ca0e2bdb22a97713e6bfce74c651006d71aa883056c8e2c2a148039fe4074
 
 lib32disabled=yes
 
 build_options="clang debug js_optimize vaapi pulseaudio sndio pipewire"
-build_options_default="clang js_optimize vaapi pulseaudio pipewire"
+build_options_default="clang vaapi pulseaudio pipewire"
 desc_option_clang="Use clang to build"
 desc_option_debug="Build with debug symbols"
 desc_option_js_optimize="Optimize the JS used for Chromium's UI"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] chromium: update to 111.0.5563.64.
  2023-03-18 15:51 [PR PATCH] chromium: update to 111.0.5563.64 Duncaen
@ 2023-03-18 23:53 ` Duncaen
  2023-03-18 23:54 ` [PR PATCH] [Merged]: " Duncaen
  1 sibling, 0 replies; 3+ messages in thread
From: Duncaen @ 2023-03-18 23:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

There is an updated pull request by Duncaen against master on the void-packages repository

https://github.com/Duncaen/void-packages chromium-111
https://github.com/void-linux/void-packages/pull/42842

chromium: update to 111.0.5563.64.
[ci skip]

* [x] x86_64-glibc
* [x] x86_64-musl
* [x] aarch64-musl
* [ ] i686

A patch file from https://github.com/void-linux/void-packages/pull/42842.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chromium-111-42842.patch --]
[-- Type: text/x-diff, Size: 37757 bytes --]

From 1aac8398c7bb01ee3828b79757ab71fef07ebf26 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sat, 18 Mar 2023 00:41:37 +0100
Subject: [PATCH] chromium: update to 111.0.5563.64.

---
 .../patches/build-add-use_cxx17.patch         |  22 --
 ...hromium-103-VirtualCursor-std-layout.patch | 231 ------------------
 ...chromium-110-CredentialUIEntry-const.patch |  41 ----
 ...romium-110-DarkModeLABColorSpace-pow.patch |  37 ---
 .../chromium-110-NativeThemeBase-fabs.patch   |  29 ---
 .../patches/fix-gnu-libc-version-usage.patch  |  21 --
 .../patches/fix-libc-version-include.patch    |  15 ++
 .../chromium/patches/fix-narrowing-cast.patch |  16 --
 .../patches/fix-stack-utils-with-musl.patch   |  20 --
 srcpkgs/chromium/patches/musl-stat.patch      |  12 -
 srcpkgs/chromium/patches/no-execinfo.patch    |  54 ----
 ...-constraints-on-VirtualCursor-layout.patch |  48 ++++
 ...the-Stack-object-from-ThreadLocalTop.patch | 205 ----------------
 srcpkgs/chromium/template                     |   6 +-
 14 files changed, 66 insertions(+), 691 deletions(-)
 delete mode 100644 srcpkgs/chromium/patches/build-add-use_cxx17.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch
 delete mode 100644 srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
 create mode 100644 srcpkgs/chromium/patches/fix-libc-version-include.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-narrowing-cast.patch
 delete mode 100644 srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
 delete mode 100644 srcpkgs/chromium/patches/musl-stat.patch
 create mode 100644 srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch
 delete mode 100644 srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch

diff --git a/srcpkgs/chromium/patches/build-add-use_cxx17.patch b/srcpkgs/chromium/patches/build-add-use_cxx17.patch
deleted file mode 100644
index b50825fb7e2c..000000000000
--- a/srcpkgs/chromium/patches/build-add-use_cxx17.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/build/config/compiler/BUILD.gn
-+++ b/build/config/compiler/BUILD.gn
-@@ -191,6 +191,10 @@
-                                                        current_cpu == "x64"))))
- }
- 
-+declare_args() {
-+  use_cxx17 = false
-+}
-+
- if (is_android || (is_chromeos_ash && is_chromeos_device)) {
-   # Set the path to use orderfile for linking Chrome
-   # Note that this is for using only one orderfile for linking
-@@ -605,7 +609,7 @@
-         cflags_cc += [ "-fno-trigraphs" ]
-       }
-     } else if (is_clang) {
--      if (is_chromeos_device) {
-+      if (is_chromeos_device || use_cxx17) {
-         # TODO(crbug.com/1392471): Support C++20 in CrOS toolchain.
-         cflags_cc += [ "-std=${standard_prefix}++17" ]
-       } else {
diff --git a/srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch b/srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch
deleted file mode 100644
index be0502e991be..000000000000
--- a/srcpkgs/chromium/patches/chromium-103-VirtualCursor-std-layout.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Sun, 16 Jan 2022 19:15:26 +0000
-Subject: [PATCH] sql: make VirtualCursor standard layout type
-
-sql::recover::VirtualCursor needs to be a standard layout type, but
-has members of type std::unique_ptr. However, std::unique_ptr is not
-guaranteed to be standard layout. Compiling with clang combined with
-gcc-11 libstdc++ fails because of this.
-
-Bug: 1189788
-Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
----
-
-diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
-index cc9420e5..f12d8fa 100644
---- a/sql/recover_module/btree.cc
-+++ b/sql/recover_module/btree.cc
-@@ -136,16 +136,22 @@
-               "Move the destructor to the .cc file if it's non-trival");
- #endif  // !DCHECK_IS_ON()
- 
--LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
--    : page_id_(db_reader->page_id()),
--      db_reader_(db_reader),
--      cell_count_(ComputeCellCount(db_reader)),
--      next_read_index_(0),
--      last_record_size_(0) {
-+LeafPageDecoder::LeafPageDecoder() noexcept = default;
-+
-+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
-+  page_id_ = db_reader->page_id();
-+  db_reader_ = db_reader;
-+  cell_count_ = ComputeCellCount(db_reader);
-+  next_read_index_ = 0;
-+  last_record_size_ = 0;
-   DCHECK(IsOnValidPage(db_reader));
-   DCHECK(DatabasePageReader::IsValidPageId(page_id_));
- }
- 
-+void LeafPageDecoder::Reset() {
-+  db_reader_ = nullptr;
-+}
-+
- bool LeafPageDecoder::TryAdvance() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(CanAdvance());
-diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
-index eaa087a5..df0e0c9 100644
---- a/sql/recover_module/btree.h
-+++ b/sql/recover_module/btree.h
-@@ -101,9 +101,7 @@
-  public:
-   // Creates a decoder for a DatabasePageReader's last read page.
-   //
--  // |db_reader| must have been used to read an inner page of a table B-tree.
--  // |db_reader| must outlive this instance.
--  explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
-+  LeafPageDecoder() noexcept;
-   ~LeafPageDecoder() noexcept = default;
- 
-   LeafPageDecoder(const LeafPageDecoder&) = delete;
-@@ -151,6 +149,17 @@
-   // read as long as CanAdvance() returns true.
-   bool TryAdvance();
- 
-+  // Initialize with DatabasePageReader
-+  // |db_reader| must have been used to read an inner page of a table B-tree.
-+  // |db_reader| must outlive this instance.
-+  void Initialize(DatabasePageReader* db_reader);
-+
-+  // Reset internal DatabasePageReader
-+  void Reset();
-+
-+  // True if DatabasePageReader is valid
-+  bool IsValid() { return (db_reader_ != nullptr); }
-+
-   // True if the given reader may point to an inner page in a table B-tree.
-   //
-   // The last ReadPage() call on |db_reader| must have succeeded.
-@@ -164,14 +173,14 @@
-   static int ComputeCellCount(DatabasePageReader* db_reader);
- 
-   // The number of the B-tree page this reader is reading.
--  const int64_t page_id_;
-+  int64_t page_id_;
-   // Used to read the tree page.
-   //
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the DatabasePageReader outlives this.
--  DatabasePageReader* const db_reader_;
-+  DatabasePageReader* db_reader_;
-   // Caches the ComputeCellCount() value for this reader's page.
--  const int cell_count_ = ComputeCellCount(db_reader_);
-+  int cell_count_;
- 
-   // The reader's cursor state.
-   //
-diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
-index 4f827ed..240de499 100644
---- a/sql/recover_module/cursor.cc
-+++ b/sql/recover_module/cursor.cc
-@@ -28,7 +28,7 @@
- int VirtualCursor::First() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   inner_decoders_.clear();
--  leaf_decoder_ = nullptr;
-+  leaf_decoder_.Reset();
- 
-   AppendPageDecoder(table_->root_page_id());
-   return Next();
-@@ -38,18 +38,18 @@
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   record_reader_.Reset();
- 
--  while (!inner_decoders_.empty() || leaf_decoder_.get()) {
--    if (leaf_decoder_.get()) {
--      if (!leaf_decoder_->CanAdvance()) {
-+  while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
-+    if (leaf_decoder_.IsValid()) {
-+      if (!leaf_decoder_.CanAdvance()) {
-         // The leaf has been exhausted. Remove it from the DFS stack.
--        leaf_decoder_ = nullptr;
-+        leaf_decoder_.Reset();
-         continue;
-       }
--      if (!leaf_decoder_->TryAdvance())
-+      if (!leaf_decoder_.TryAdvance())
-         continue;
- 
--      if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
--                                      leaf_decoder_->last_record_offset())) {
-+      if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
-+                                      leaf_decoder_.last_record_offset())) {
-         continue;
-       }
-       if (!record_reader_.Initialize())
-@@ -101,13 +101,13 @@
- int64_t VirtualCursor::RowId() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(record_reader_.IsInitialized());
--  DCHECK(leaf_decoder_.get());
--  return leaf_decoder_->last_record_rowid();
-+  DCHECK(leaf_decoder_.IsValid());
-+  return leaf_decoder_.last_record_rowid();
- }
- 
- void VirtualCursor::AppendPageDecoder(int page_id) {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
--  DCHECK(leaf_decoder_.get() == nullptr)
-+  DCHECK(!leaf_decoder_.IsValid())
-       << __func__
-       << " must only be called when the current path has no leaf decoder";
- 
-@@ -115,7 +115,7 @@
-     return;
- 
-   if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
--    leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
-+    leaf_decoder_.Initialize(&db_reader_);
-     return;
-   }
- 
-diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
-index 845b785..cc4e85f8 100644
---- a/sql/recover_module/cursor.h
-+++ b/sql/recover_module/cursor.h
-@@ -130,7 +130,7 @@
-   std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
- 
-   // Decodes the leaf page containing records.
--  std::unique_ptr<LeafPageDecoder> leaf_decoder_;
-+  LeafPageDecoder leaf_decoder_;
- 
-   SEQUENCE_CHECKER(sequence_checker_);
- };
-diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
-index 58e75de..69d98cef 100644
---- a/sql/recover_module/pager.cc
-+++ b/sql/recover_module/pager.cc
-@@ -23,8 +23,7 @@
-               "ints are not appropriate for representing page IDs");
- 
- DatabasePageReader::DatabasePageReader(VirtualTable* table)
--    : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
--      table_(table) {
-+    : page_data_(table->page_size()), table_(table) {
-   DCHECK(table != nullptr);
-   DCHECK(IsValidPageSize(table->page_size()));
- }
-@@ -58,7 +57,7 @@
-                 "The |read_offset| computation above may overflow");
- 
-   int sqlite_status =
--      RawRead(sqlite_file, read_size, read_offset, page_data_.get());
-+      RawRead(sqlite_file, read_size, read_offset, page_data_.data());
- 
-   // |page_id_| needs to be set to kInvalidPageId if the read failed.
-   // Otherwise, future ReadPage() calls with the previous |page_id_| value
-diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
-index 07cac3cb..d08f093 100644
---- a/sql/recover_module/pager.h
-+++ b/sql/recover_module/pager.h
-@@ -6,8 +6,8 @@
- #define SQL_RECOVER_MODULE_PAGER_H_
- 
- #include <cstdint>
--#include <memory>
- #include <ostream>
-+#include <vector>
- 
- #include "base/check_op.h"
- #include "base/memory/raw_ptr.h"
-@@ -72,7 +72,7 @@
-     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-     DCHECK_NE(page_id_, kInvalidPageId)
-         << "Successful ReadPage() required before accessing pager state";
--    return page_data_.get();
-+    return page_data_.data();
-   }
- 
-   // The number of bytes in the page read by the last ReadPage() call.
-@@ -139,7 +139,7 @@
-   int page_id_ = kInvalidPageId;
-   // Stores the bytes of the last page successfully read by ReadPage().
-   // The content is undefined if the last call to ReadPage() did not succeed.
--  const std::unique_ptr<uint8_t[]> page_data_;
-+  std::vector<uint8_t> page_data_;
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the VirtualTable outlives this.
-   const raw_ptr<VirtualTable> table_;
diff --git a/srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch b/srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch
deleted file mode 100644
index eb68aa27aca4..000000000000
--- a/srcpkgs/chromium/patches/chromium-110-CredentialUIEntry-const.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b4e56d22275cae5a910463a966a96345430a83ea Mon Sep 17 00:00:00 2001
-From: Ivan Murashov <ivan.murashov@lge.com>
-Date: Sat, 17 Dec 2022 12:06:01 +0000
-Subject: [PATCH] libstdc++: Don't use const members in std::vector in password_manager::CredentialUIEntry
-
-Otherwise build fails when building with use_custom_libcxx=false.
-The error example:
-std::vector must have a non-const, non-volatile value_type
-
-Implementation of std::vector in libstdc++ does not allow const.
-
-Bug: 957519
-Change-Id: I089de2d52df25138d74dbf01fdf61d6301b4d871
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111037
-Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
-Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
-Cr-Commit-Position: refs/heads/main@{#1084697}
----
-
-diff --git a/components/password_manager/core/browser/ui/credential_ui_entry.cc b/components/password_manager/core/browser/ui/credential_ui_entry.cc
-index 1e0766a..a9a34f7 100644
---- a/components/password_manager/core/browser/ui/credential_ui_entry.cc
-+++ b/components/password_manager/core/browser/ui/credential_ui_entry.cc
-@@ -97,7 +97,7 @@
-   // For cases when the notes differ within grouped passwords (e.g: a
-   // credential exists in both account and profile stores), respective notes
-   // should be concatenated and linebreak used as a delimiter.
--  std::vector<const std::u16string> notes_with_duplicates;
-+  std::vector<std::u16string> notes_with_duplicates;
-   for (const auto& form : forms) {
-     // Only notes with an empty `unique_display_name` are supported in the
-     // settings UI.
-@@ -109,7 +109,7 @@
-   }
-   auto unique_notes =
-       base::MakeFlatSet<std::u16string>(std::move(notes_with_duplicates));
--  note = base::JoinString(std::vector<const std::u16string>(
-+  note = base::JoinString(std::vector<std::u16string>(
-                               unique_notes.begin(), unique_notes.end()),
-                           u"\n");
- 
diff --git a/srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch b/srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch
deleted file mode 100644
index 91f1aee073e6..000000000000
--- a/srcpkgs/chromium/patches/chromium-110-DarkModeLABColorSpace-pow.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 795c311aae4b718585bc6194189f061000c823a1 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Fri, 23 Dec 2022 14:28:55 +0000
-Subject: [PATCH] libstdc++: fix narrowing in blink::DarkModeLABColorSpace
-
-Clang-14 errors out with narrowing from double to float. Use std::pow
-instead.
----
- .../renderer/platform/graphics/dark_mode_lab_color_space.h   | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h b/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
-index 999c3e5..c18ea7b 100644
---- a/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
-+++ b/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
-@@ -125,7 +125,7 @@ class DarkModeLABColorSpace {
-   // https://en.wikipedia.org/wiki/CIELAB_color_space#Reverse_transformation.
-   SkV3 FromXYZ(const SkV3& v) const {
-     auto f = [](float x) {
--      return x > kSigma3 ? pow(x, 1.0f / 3.0f)
-+      return x > kSigma3 ? std::pow(x, 1.0f / 3.0f)
-                          : x / (3 * kSigma2) + 4.0f / 29.0f;
-     };
- 
-@@ -145,7 +145,8 @@ class DarkModeLABColorSpace {
-   // https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation.
-   SkV3 ToXYZ(const SkV3& lab) const {
-     auto invf = [](float x) {
--      return x > kSigma ? pow(x, 3.0f) : 3.0f * kSigma2 * (x - 4.0f / 29.0f);
-+      return x > kSigma ? std::pow(x, 3.0f)
-+                        : 3.0f * kSigma2 * (x - 4.0f / 29.0f);
-     };
- 
-     SkV3 v = {Clamp(lab.x, 0.0f, 100.0f), Clamp(lab.y, -128.0f, 128.0f),
--- 
-2.38.2
-
diff --git a/srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch b/srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch
deleted file mode 100644
index c7d0e8b1de8d..000000000000
--- a/srcpkgs/chromium/patches/chromium-110-NativeThemeBase-fabs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 07f0a87e4409f27854b3a1d17f270a3497f38947 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Mon, 19 Dec 2022 19:07:37 +0000
-Subject: [PATCH] GCC: use fabsf in ui::NativeThemeBase::OutlineColor
-
-Template deduction fails for base::clamp, because return type of
-fabs is double and all other parameters are float.
-
-Bug: 819294
-Change-Id: I34f1c9c99d13f69097d899bfcb0526cbdf4fe1c1
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4110869
-Reviewed-by: Peter Kasting <pkasting@chromium.org>
-Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
-Cr-Commit-Position: refs/heads/main@{#1085034}
----
-
-diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
-index 169c60c..36db49a 100644
---- a/ui/native_theme/native_theme_base.cc
-+++ b/ui/native_theme/native_theme_base.cc
-@@ -1336,7 +1336,7 @@
-   // The following code has been tested to look OK with all of the
-   // default GTK themes.
-   SkScalar min_diff = base::clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f);
--  SkScalar diff = base::clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
-+  SkScalar diff = base::clamp(fabsf(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
- 
-   if (hsv1[2] + hsv2[2] > 1.0)
-     diff = -diff;
diff --git a/srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch b/srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
deleted file mode 100644
index 2522294f75ea..000000000000
--- a/srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
-+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
-@@ -59,7 +59,9 @@
- // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
- // of lacros-chrome is complete.
- #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
-+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
- #include <gnu/libc-version.h>
-+#endif  // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
- 
- #include "base/linux_util.h"
- #include "base/strings/string_split.h"
-@@ -323,7 +323,7 @@
- void RecordLinuxGlibcVersion() {
- // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
- // of lacros-chrome is complete.
--#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
-+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
-   base::Version version(gnu_get_libc_version());
- 
-   UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
diff --git a/srcpkgs/chromium/patches/fix-libc-version-include.patch b/srcpkgs/chromium/patches/fix-libc-version-include.patch
new file mode 100644
index 000000000000..d94dcf6deac5
--- /dev/null
+++ b/srcpkgs/chromium/patches/fix-libc-version-include.patch
@@ -0,0 +1,15 @@
+--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
++++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -61,8 +61,11 @@
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++
++#if defined(__GLIBC__)
+ #include <gnu/libc-version.h>
++#endif
+ 
+ #include "base/linux_util.h"
+ #include "base/strings/string_split.h"
diff --git a/srcpkgs/chromium/patches/fix-narrowing-cast.patch b/srcpkgs/chromium/patches/fix-narrowing-cast.patch
deleted file mode 100644
index 1a247e54fe7c..000000000000
--- a/srcpkgs/chromium/patches/fix-narrowing-cast.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/base/system/sys_info_posix.cc
-+++ b/base/system/sys_info_posix.cc
-@@ -62,10 +62,10 @@
-   if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
-     return false;
- 
--  switch (stats.f_type) {
-+  switch (static_cast<uintmax_t>(stats.f_type)) {
-     case TMPFS_MAGIC:
--    case static_cast<int>(HUGETLBFS_MAGIC):
--    case static_cast<int>(RAMFS_MAGIC):
-+    case HUGETLBFS_MAGIC:
-+    case RAMFS_MAGIC:
-       return true;
-   }
-   return false;
diff --git a/srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch b/srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
deleted file mode 100644
index 7936aa6e0db4..000000000000
--- a/srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/third_party/blink/renderer/platform/wtf/stack_util.cc.orig
-+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc
-@@ -29,7 +29,7 @@
- // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
- // correctly for the main thread.
- 
--#elif defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-     BUILDFLAG(IS_FUCHSIA)
-   // pthread_getattr_np() can fail if the thread is not invoked by
-   // pthread_create() (e.g., the main thread of blink_unittests).
-@@ -97,7 +97,7 @@
- }
- 
- void* GetStackStart() {
--#if defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
-     BUILDFLAG(IS_FUCHSIA)
-   pthread_attr_t attr;
-   int error;
diff --git a/srcpkgs/chromium/patches/musl-stat.patch b/srcpkgs/chromium/patches/musl-stat.patch
deleted file mode 100644
index b25e3c062172..000000000000
--- a/srcpkgs/chromium/patches/musl-stat.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/base/files/file.h.orig
-+++ b/base/files/file.h
-@@ -19,7 +19,8 @@
- #include "build/build_config.h"
- 
- #if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NACL) || \
--    BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21)
-+    BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) || \
-+    (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
- struct stat;
- namespace base {
- typedef struct stat stat_wrapper_t;
diff --git a/srcpkgs/chromium/patches/no-execinfo.patch b/srcpkgs/chromium/patches/no-execinfo.patch
index 6e67182b21b6..747476d75b15 100644
--- a/srcpkgs/chromium/patches/no-execinfo.patch
+++ b/srcpkgs/chromium/patches/no-execinfo.patch
@@ -1,57 +1,3 @@
---- a/base/debug/stack_trace_posix.cc
-+++ b/base/debug/stack_trace_posix.cc
-@@ -27,7 +27,7 @@
- #if !defined(USE_SYMBOLIZE)
- #include <cxxabi.h>
- #endif
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- #include <execinfo.h>
- #endif
- 
-@@ -89,7 +89,7 @@
-   // Note: code in this function is NOT async-signal safe (std::string uses
-   // malloc internally).
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
-   std::string::size_type search_from = 0;
-   while (search_from < text->size()) {
-     // Look for the start of a mangled symbol, from search_from.
-@@ -136,7 +136,7 @@
-   virtual ~BacktraceOutputHandler() = default;
- };
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- 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.
-@@ -839,7 +839,7 @@
-   // If we do not have unwind tables, then try tracing using frame pointers.
-   return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
-                                               count, 0);
--#elif !defined(__UCLIBC__) && !defined(_AIX)
-+#elif defined(__GLIBC__) && !defined(_AIX)
-   // Though the backtrace API man page does not list any possible negative
-   // return values, we take no chance.
-   return base::saturated_cast<size_t>(backtrace(trace, count));
-@@ -852,13 +852,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.
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
-   PrintBacktraceOutputHandler handler;
-   ProcessBacktrace(trace_, count_, prefix_string, &handler);
- #endif
- }
- 
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
-                                           const char* prefix_string) const {
-   StreamBacktraceOutputHandler handler(os);
 --- a/v8/src/codegen/external-reference-table.cc.orig
 +++ b/v8/src/codegen/external-reference-table.cc
 @@ -11,7 +11,9 @@
diff --git a/srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch b/srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch
new file mode 100644
index 000000000000..d1e65ee1561c
--- /dev/null
+++ b/srcpkgs/chromium/patches/sql-relax-constraints-on-VirtualCursor-layout.patch
@@ -0,0 +1,48 @@
+From 7d1394bd639e3bcf68082ac3fc33eeed6a00d2e6 Mon Sep 17 00:00:00 2001
+From: Elly Fong-Jones <ellyjones@chromium.org>
+Date: Thu, 2 Mar 2023 00:15:11 +0000
+Subject: [PATCH] sql: relax constraints on VirtualCursor layout
+
+VirtualCursor::FromSqliteCursor required that VirtualCursor had a
+standard layout, but in fact VirtualCursor shouldn't have a standard
+layout, and the fact that it does with libc++ is a deviation from the
+C++ standard. This change:
+
+1. Relaxes the requirement that VirtualCursor has a standard layout, and
+2. Relaxes the requirement that the sqlite_cursor_ field has to be at
+   offset 0
+
+by use of offsetof() and pointer subtraction. This change both improves
+standards compliance and makes this code build with libstdc++.
+
+Bug: 1380656
+Change-Id: I9c47abd9197b187da0360ca5619ccf7dadab4f33
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4292313
+Reviewed-by: Austin Sullivan <asully@chromium.org>
+Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1111925}
+---
+ sql/recover_module/cursor.h | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
+index 1970bdca8c6..4cb06557009 100644
+--- a/sql/recover_module/cursor.h
++++ b/sql/recover_module/cursor.h
+@@ -63,12 +63,10 @@ class VirtualCursor {
+   // |sqlite_cursor| must have been returned by VirtualTable::SqliteCursor().
+   static inline VirtualCursor* FromSqliteCursor(
+       sqlite3_vtab_cursor* sqlite_cursor) {
+-    static_assert(std::is_standard_layout<VirtualCursor>::value,
+-                  "needed for the reinterpret_cast below");
+-    static_assert(offsetof(VirtualCursor, sqlite_cursor_) == 0,
+-                  "sqlite_cursor_ must be the first member of the class");
+-    VirtualCursor* result = reinterpret_cast<VirtualCursor*>(sqlite_cursor);
+-    DCHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
++    VirtualCursor* result = reinterpret_cast<VirtualCursor*>(
++        (reinterpret_cast<char*>(sqlite_cursor) -
++         offsetof(VirtualCursor, sqlite_cursor_)));
++    CHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
+     return result;
+   }
+ 
diff --git a/srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch b/srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch
deleted file mode 100644
index 73e042cf5562..000000000000
--- a/srcpkgs/chromium/patches/v8-move-the-Stack-object-from-ThreadLocalTop.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From 7b6fbcd0a6700db498ad55db046ecda92c8ee8c1 Mon Sep 17 00:00:00 2001
-From: Nikolaos Papaspyrou <nikolaos@chromium.org>
-Date: Sun, 29 Jan 2023 17:18:08 +0100
-Subject: [PATCH] Merge: [heap] Move the Stack object from ThreadLocalTop to
- Isolate
-
-This is just for nodejs, do not backmerge to 11.0.
-(cherry picked from commit 1e4b71d99fea5ea6bb4bf6420585a7819872bb0f)
-
-> Change-Id: I026a35af3bc6999a09b21f277756d4454c086343
-> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152476
-> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
-> Reviewed-by: Omer Katz <omerkatz@chromium.org>
-> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
-> Cr-Commit-Position: refs/heads/main@{#85445}
-
-Stack information is thread-specific and, until now, it was stored in a
-field in ThreadLocalTop. This CL moves stack information to the isolate
-and makes sure to update the stack start whenever a main thread enters
-the isolate. At the same time, the Stack object is refactored and
-simplified.
-
-As a side effect, after removing the Stack object, ThreadLocalTop
-satisfies the std::standard_layout trait; this fixes some issues
-observed with different C++ compilers.
-
-Bug: v8:13630
-Bug: v8:13257
-Change-Id: I4be1f04fe90699e1a6e456dad3e0dd623851acce
----
- src/execution/isolate.cc          | 36 +++++++++++++++----------------
- src/execution/isolate.h           |  6 ++++++
- src/execution/thread-local-top.cc |  2 --
- src/execution/thread-local-top.h  |  6 +-----
- src/heap/heap.cc                  |  4 +---
- 5 files changed, 25 insertions(+), 29 deletions(-)
-
-diff --git a/src/execution/isolate.cc b/src/execution/isolate.cc
-index 4edf364e0a..be4fd400d2 100644
---- a/v8/src/execution/isolate.cc
-+++ b/v8/src/execution/isolate.cc
-@@ -3074,22 +3074,23 @@ void Isolate::AddSharedWasmMemory(Handle<WasmMemoryObject> memory_object) {
- void Isolate::RecordStackSwitchForScanning() {
-   Object current = root(RootIndex::kActiveContinuation);
-   DCHECK(!current.IsUndefined());
--  thread_local_top()->stack_.ClearStackSegments();
--  wasm::StackMemory* stack = Managed<wasm::StackMemory>::cast(
--                                 WasmContinuationObject::cast(current).stack())
--                                 .get()
--                                 .get();
-+  stack().ClearStackSegments();
-+  wasm::StackMemory* wasm_stack =
-+      Managed<wasm::StackMemory>::cast(
-+          WasmContinuationObject::cast(current).stack())
-+          .get()
-+          .get();
-   current = WasmContinuationObject::cast(current).parent();
--  thread_local_top()->stack_.SetStackStart(
--      reinterpret_cast<void*>(stack->base()));
-+  heap()->SetStackStart(reinterpret_cast<void*>(wasm_stack->base()));
-   // We don't need to add all inactive stacks. Only the ones in the active chain
-   // may contain cpp heap pointers.
-   while (!current.IsUndefined()) {
-     auto cont = WasmContinuationObject::cast(current);
--    auto* stack = Managed<wasm::StackMemory>::cast(cont.stack()).get().get();
--    thread_local_top()->stack_.AddStackSegment(
--        reinterpret_cast<const void*>(stack->base()),
--        reinterpret_cast<const void*>(stack->jmpbuf()->sp));
-+    auto* wasm_stack =
-+        Managed<wasm::StackMemory>::cast(cont.stack()).get().get();
-+    stack().AddStackSegment(
-+        reinterpret_cast<const void*>(wasm_stack->base()),
-+        reinterpret_cast<const void*>(wasm_stack->jmpbuf()->sp));
-     current = cont.parent();
-   }
- }
-@@ -3377,20 +3378,13 @@ void Isolate::Delete(Isolate* isolate) {
-   Isolate* saved_isolate = isolate->TryGetCurrent();
-   SetIsolateThreadLocals(isolate, nullptr);
-   isolate->set_thread_id(ThreadId::Current());
--  isolate->thread_local_top()->stack_ =
--      saved_isolate ? std::move(saved_isolate->thread_local_top()->stack_)
--                    : ::heap::base::Stack(base::Stack::GetStackStart());
-+  isolate->heap()->SetStackStart(base::Stack::GetStackStart());
- 
-   bool owns_shared_isolate = isolate->owns_shared_isolate_;
-   Isolate* maybe_shared_isolate = isolate->shared_isolate_;
- 
-   isolate->Deinit();
- 
--  // Restore the saved isolate's stack.
--  if (saved_isolate)
--    saved_isolate->thread_local_top()->stack_ =
--        std::move(isolate->thread_local_top()->stack_);
--
- #ifdef DEBUG
-   non_disposed_isolates_--;
- #endif  // DEBUG
-@@ -4647,6 +4641,10 @@ bool Isolate::Init(SnapshotData* startup_snapshot_data,
- void Isolate::Enter() {
-   Isolate* current_isolate = nullptr;
-   PerIsolateThreadData* current_data = CurrentPerIsolateThreadData();
-+
-+  // Set the stack start for the main thread that enters the isolate.
-+  heap()->SetStackStart(base::Stack::GetStackStart());
-+
-   if (current_data != nullptr) {
-     current_isolate = current_data->isolate_;
-     DCHECK_NOT_NULL(current_isolate);
-diff --git a/src/execution/isolate.h b/src/execution/isolate.h
-index a32f999fe5..1cb6e10661 100644
---- a/v8/src/execution/isolate.h
-+++ b/v8/src/execution/isolate.h
-@@ -32,6 +32,7 @@
- #include "src/execution/stack-guard.h"
- #include "src/handles/handles.h"
- #include "src/handles/traced-handles.h"
-+#include "src/heap/base/stack.h"
- #include "src/heap/factory.h"
- #include "src/heap/heap.h"
- #include "src/heap/read-only-heap.h"
-@@ -2022,6 +2023,8 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
-   SimulatorData* simulator_data() { return simulator_data_; }
- #endif
- 
-+  ::heap::base::Stack& stack() { return stack_; }
-+
- #ifdef V8_ENABLE_WEBASSEMBLY
-   wasm::StackMemory*& wasm_stacks() { return wasm_stacks_; }
-   // Update the thread local's Stack object so that it is aware of the new stack
-@@ -2520,6 +2523,9 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
-   // The mutex only guards adding pages, the retrieval is signal safe.
-   base::Mutex code_pages_mutex_;
- 
-+  // Stack information for the main thread.
-+  ::heap::base::Stack stack_;
-+
- #ifdef V8_ENABLE_WEBASSEMBLY
-   wasm::StackMemory* wasm_stacks_;
- #endif
-diff --git a/src/execution/thread-local-top.cc b/src/execution/thread-local-top.cc
-index 0d7071ddda..05cc20b8e4 100644
---- a/v8/src/execution/thread-local-top.cc
-+++ b/v8/src/execution/thread-local-top.cc
-@@ -37,14 +37,12 @@ void ThreadLocalTop::Clear() {
-   current_embedder_state_ = nullptr;
-   failed_access_check_callback_ = nullptr;
-   thread_in_wasm_flag_address_ = kNullAddress;
--  stack_ = ::heap::base::Stack();
- }
- 
- void ThreadLocalTop::Initialize(Isolate* isolate) {
-   Clear();
-   isolate_ = isolate;
-   thread_id_ = ThreadId::Current();
--  stack_.SetStackStart(base::Stack::GetStackStart());
- #if V8_ENABLE_WEBASSEMBLY
-   thread_in_wasm_flag_address_ = reinterpret_cast<Address>(
-       trap_handler::GetThreadInWasmThreadLocalAddress());
-diff --git a/src/execution/thread-local-top.h b/src/execution/thread-local-top.h
-index 43fec0a7df..989c817f31 100644
---- a/v8/src/execution/thread-local-top.h
-+++ b/v8/src/execution/thread-local-top.h
-@@ -10,7 +10,6 @@
- #include "include/v8-unwinder.h"
- #include "src/common/globals.h"
- #include "src/execution/thread-id.h"
--#include "src/heap/base/stack.h"
- #include "src/objects/contexts.h"
- #include "src/utils/utils.h"
- 
-@@ -30,7 +29,7 @@ class ThreadLocalTop {
-   // TODO(all): This is not particularly beautiful. We should probably
-   // refactor this to really consist of just Addresses and 32-bit
-   // integer fields.
--  static constexpr uint32_t kSizeInBytes = 30 * kSystemPointerSize;
-+  static constexpr uint32_t kSizeInBytes = 25 * kSystemPointerSize;
- 
-   // Does early low-level initialization that does not depend on the
-   // isolate being present.
-@@ -147,9 +146,6 @@ class ThreadLocalTop {
- 
-   // Address of the thread-local "thread in wasm" flag.
-   Address thread_in_wasm_flag_address_;
--
--  // Stack information.
--  ::heap::base::Stack stack_;
- };
- 
- }  // namespace internal
-diff --git a/src/heap/heap.cc b/src/heap/heap.cc
-index 51a90ddcab..b5722ab6ec 100644
---- a/v8/src/heap/heap.cc
-+++ b/v8/src/heap/heap.cc
-@@ -5851,9 +5851,7 @@ void Heap::SetStackStart(void* stack_start) {
-   stack().SetStackStart(stack_start);
- }
- 
--::heap::base::Stack& Heap::stack() {
--  return isolate_->thread_local_top()->stack_;
--}
-+::heap::base::Stack& Heap::stack() { return isolate_->stack(); }
- 
- void Heap::RegisterExternallyReferencedObject(Address* location) {
-   Object object = TracedHandles::Mark(location, TracedHandles::MarkMode::kAll);
diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index b4b03f3b1410..3c1c1caf3765 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -1,7 +1,7 @@
 # Template file for 'chromium'
 pkgname=chromium
 # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
-version=110.0.5481.77
+version=111.0.5563.64
 revision=1
 archs="i686* x86_64* aarch64* armv7l*"
 hostmakedepends="
@@ -28,12 +28,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://www.chromium.org/"
 distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
-checksum=e348ab2dc4311083e729d714a81e95dd9db108ff71437dde451c97ac939881ce
+checksum=7d5ca0e2bdb22a97713e6bfce74c651006d71aa883056c8e2c2a148039fe4074
 
 lib32disabled=yes
 
 build_options="clang debug js_optimize vaapi pulseaudio sndio pipewire"
-build_options_default="clang js_optimize vaapi pulseaudio pipewire"
+build_options_default="clang vaapi pulseaudio pipewire"
 desc_option_clang="Use clang to build"
 desc_option_debug="Build with debug symbols"
 desc_option_js_optimize="Optimize the JS used for Chromium's UI"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: chromium: update to 111.0.5563.64.
  2023-03-18 15:51 [PR PATCH] chromium: update to 111.0.5563.64 Duncaen
  2023-03-18 23:53 ` [PR PATCH] [Updated] " Duncaen
@ 2023-03-18 23:54 ` Duncaen
  1 sibling, 0 replies; 3+ messages in thread
From: Duncaen @ 2023-03-18 23:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

There's a merged pull request on the void-packages repository

chromium: update to 111.0.5563.64.
https://github.com/void-linux/void-packages/pull/42842

Description:
[ci skip]

* [x] x86_64-glibc
* [x] x86_64-musl
* [x] aarch64-musl
* [ ] i686

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-18 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 15:51 [PR PATCH] chromium: update to 111.0.5563.64 Duncaen
2023-03-18 23:53 ` [PR PATCH] [Updated] " Duncaen
2023-03-18 23:54 ` [PR PATCH] [Merged]: " Duncaen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).