summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-glibc-2.34.patch
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-12-08 18:16:38 -0500
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-12-08 18:16:38 -0500
commitf47ad9f0ff5f00da978f70c1c5000ac2d454aaa0 (patch)
tree3e7b6efaff7d29d58f3e6f610701a19d8215c27c /www-client/chromium/files/chromium-glibc-2.34.patch
parentd1395ba5b51b99b1529a119fc54e5b22496e5cb0 (diff)
downloadppo-f47ad9f0ff5f00da978f70c1c5000ac2d454aaa0.tar.xz
chromium 98.0.4750.0 (test)
Diffstat (limited to 'www-client/chromium/files/chromium-glibc-2.34.patch')
-rw-r--r--www-client/chromium/files/chromium-glibc-2.34.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-glibc-2.34.patch b/www-client/chromium/files/chromium-glibc-2.34.patch
new file mode 100644
index 0000000..64c03a6
--- /dev/null
+++ b/www-client/chromium/files/chromium-glibc-2.34.patch
@@ -0,0 +1,50 @@
+From 600d63c2c59a9892dbc5423d7d8bb1565a9f91e7 Mon Sep 17 00:00:00 2001
+From: Michel Salim <michel@fb.com>
+Date: Thu, 04 Nov 2021 14:22:40 -0700
+Subject: [PATCH] Handle long SIGSTKSZ in glibc > 2.33
+
+`SIGSTKSZ` is no longer constant in glibc > 2.33 but a function
+returning a long. Cast before taking `max`.
+
+See https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD
+
+Signed-off-by: Michel Salim <michel@fb.com>
+Change-Id: I197f8ff3053eede80d6aed096be4f0113dd43241
+(relocated to chromium repo, removed static)
+---
+
+diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+index ca353c4..5cdabcf 100644
+--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
++++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@
+ // 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(16384U, (unsigned)SIGSTKSZ);
+
+ // Only set an alternative stack if there isn't already one, or if the current
+ // one is too small.
+diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
+index ca6b595..1c1ee42 100644
+--- a/sandbox/linux/services/credentials.cc
++++ b/sandbox/linux/services/credentials.cc
+@@ -11,6 +11,7 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -100,7 +101,8 @@ 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};
++ char tls_buf[PTHREAD_STACK_MIN];
++ memset(tls_buf, 0, PTHREAD_STACK_MIN);
+ tls = tls_buf;
+ #endif
+