[arch-commits] Commit in electron15/trunk (3 files)

Leonidas Spyropoulos artafinde at gemini.archlinux.org
Tue Feb 15 21:49:18 UTC 2022


    Date: Tuesday, February 15, 2022 @ 21:49:17
  Author: artafinde
Revision: 1133396

electron15: rebuild with new toolchain

There seems to be some crashes related to glibc [1] so rebuild with new toolchain in place.

[1]: https://github.com/vector-im/element-web/issues/20926#issuecomment-1038953610

Added:
  electron15/trunk/breakpad-fix-for-non-constant-SIGSTKSZ.patch
  electron15/trunk/sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
Modified:
  electron15/trunk/PKGBUILD

------------------------------------------------------------+
 PKGBUILD                                                   |   16 ++--
 breakpad-fix-for-non-constant-SIGSTKSZ.patch               |   35 +++++++++
 sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch |   39 +++++++++++
 3 files changed, 83 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-02-15 21:00:31 UTC (rev 1133395)
+++ PKGBUILD	2022-02-15 21:49:17 UTC (rev 1133396)
@@ -63,6 +63,8 @@
         'chromium-94-ffmpeg-roll.patch'
         'unexpire-accelerated-video-decode-flag.patch'
         'use-ffile-compilation-dir.patch'
+        'sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch'
+        'breakpad-fix-for-non-constant-SIGSTKSZ.patch'
        )
 # shellcheck disable=SC2034
 sha256sums=('SKIP'
@@ -84,7 +86,8 @@
             '56acb6e743d2ab1ed9f3eb01700ade02521769978d03ac43226dec94659b3ace'
             '2a97b26c3d6821b15ef4ef1369905c6fa3e9c8da4877eb9af4361452a425290b'
             '921010cd8fab5f30be76c68b68c9b39fac9e21f4c4133bb709879592bbdf606e'
-           )
+            'f910be9370c880de6e1d61cc30383c069e421d7acf406166e4fbfad324fc7d61'
+            'b4d28867c1fabde6c50a2cfa3f784730446c4d86e5191e0f0000fbf7b0f91ecf')
 
 _system_libs=('ffmpeg'
               'flac'
@@ -176,17 +179,13 @@
   patch -Np1 -i ../patches/chromium-90-ruy-include.patch
   patch -Np1 -i ../patches/chromium-94-CustomSpaces-include.patch
 
-  # Patches to build with ffmpeg 4.4; remove when ffmpeg 5.0 moves to stable
-  if ! pkg-config --atleast-version 59 libavformat; then
-    patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
-    patch -Rp1 -i ../chromium-94-ffmpeg-roll.patch
-  fi
-
   patch -Np1 -i ../unbundle-fix-visibility-of-build-config-freetype.patch
   patch -Np1 -i ../gn-visibility-gmock.patch
   patch -Np1 -i ../gn-visibility-mojo.patch
   patch -Np1 -i ../gn-visibility-webrtc.patch
   patch -Rp1 -i ../add-a-TODO-about-a-missing-pnacl-flag.patch
+  patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
+  patch -Rp1 -i ../chromium-94-ffmpeg-roll.patch
   patch -d third_party/jinja2 -Np1 -i ../../../jinja-python-3.10.patch
   patch -Rp1 -i ../replace-blacklist-with-ignorelist.patch
   patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
@@ -197,6 +196,9 @@
   patch -Np1 -i ../use-system-libraries-in-node.patch
   patch -Np1 -i ../default_app-icon.patch  # Icon from .desktop file
 
+  patch -Np1 -i ../sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
+  patch -Np1 -d third_party/breakpad/breakpad <../breakpad-fix-for-non-constant-SIGSTKSZ.patch
+
   echo "Patching Chromium for using system libraries..."
   sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
       tools/generate_shim_headers/generate_shim_headers.py

Added: breakpad-fix-for-non-constant-SIGSTKSZ.patch
===================================================================
--- breakpad-fix-for-non-constant-SIGSTKSZ.patch	                        (rev 0)
+++ breakpad-fix-for-non-constant-SIGSTKSZ.patch	2022-02-15 21:49:17 UTC (rev 1133396)
@@ -0,0 +1,35 @@
+From 605c51ed96ad44b34c457bbca320e74e194c317e Mon Sep 17 00:00:00 2001
+From: David Faure <david.faure at kdab.com>
+Date: Wed, 15 Dec 2021 22:26:40 +0100
+Subject: [PATCH] Fix for non-constant SIGSTKSZ
+
+On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case
+it expands to a call to `sysconf` which returns a `long int`); see
+https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html
+
+Pass unsigned explicitly to std::max, to avoid relying on template
+argument deduction. This works both with the old-style constant
+`SIGSTKSZ` and the new configurable one.
+
+Initially based on https://chromium-review.googlesource.com/c/2776379
+
+Change-Id: I9fc95337f973e871b84735ce822b5e11ba73ea8c
+Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721
+Reviewed-by: Mark Mentovai <mark at chromium.org>
+---
+ src/client/linux/handler/exception_handler.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index ca353c40..499be0a9 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
+   // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+   // the alternative stack. Ensure that the size of the alternative stack is
+   // large enough.
+-  static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++  const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ);
+ 
+   // Only set an alternative stack if there isn't already one, or if the current
+   // one is too small.

Added: sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
===================================================================
--- sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch	                        (rev 0)
+++ sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch	2022-02-15 21:49:17 UTC (rev 1133396)
@@ -0,0 +1,39 @@
+From 28ac6a15411d01301e171b8a8b0019abd57589b9 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Mon, 7 Feb 2022 20:09:57 +0000
+Subject: [PATCH] sandbox: build if glibc 2.34+ dynamic stack size is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compilation of sandbox fails when using dynamic stack size in glibc
+2.34 or newer. This is because the value is not a literal anymore but
+obtained through sysconf.
+
+To avoid this, use memset to put zeros in the buffer.
+
+Change-Id: Ia479e0f799b77a10a00197aaaa0500e62546f458
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3436947
+Reviewed-by: Jorge Lucangeli Obes <jorgelo at chromium.org>
+Commit-Queue: José Dapena Paz <jdapena at igalia.com>
+Cr-Commit-Position: refs/heads/main@{#967943}
+---
+ sandbox/linux/services/credentials.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
+index ca6b5954798..c933eafd163 100644
+--- a/sandbox/linux/services/credentials.cc
++++ b/sandbox/linux/services/credentials.cc
+@@ -100,7 +100,10 @@ bool ChrootToSafeEmptyDir() {
+   // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
+   clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
+ 
+-  char tls_buf[PTHREAD_STACK_MIN] = {0};
++  // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
++  // zeroify tls_buf assigning { 0 }
++  char tls_buf[PTHREAD_STACK_MIN];
++  memset(tls_buf, 0, PTHREAD_STACK_MIN);
+   tls = tls_buf;
+ #endif
+ 



More information about the arch-commits mailing list