Skip to content

Commit 1edcba3

Browse files
krajotavio
authored andcommitted
chromium: Fix build with glibc 2.34
Signed-off-by: Khem Raj <[email protected]>
1 parent d6713fc commit 1edcba3

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SRC_URI += " \
2424
file://fix-harfbuzz-supp-size-error.patch \
2525
file://fix-ruy-numeric-limits-error.patch \
2626
file://fix-sql-virtualcursor-error.patch \
27+
file://0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch \
2728
"
2829

2930
SRC_URI_append_libc-musl = "\
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From 66a2b6e4ba8e2b49115043127ce4aa0fcd71ad1e Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <[email protected]>
3+
Date: Tue, 11 May 2021 11:12:35 -0700
4+
Subject: [PATCH] exception_handler.cc: Match the types for SIGSTKSZ
5+
6+
In glibc 2.34, SIGSTKSZ is a syscall which returns a long int, therefore
7+
current check fails
8+
9+
| ../git/src/client/linux/handler/exception_handler.cc:141:49: error: no matching function for call to 'max(int, long int)'
10+
| 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
11+
| | ~~~~~~~~^~~~~~~~~~~~~~~~~
12+
13+
Upstream-Status: Pending
14+
Signed-off-by: Khem Raj <[email protected]>
15+
---
16+
src/client/linux/handler/exception_handler.cc | 2 +-
17+
1 file changed, 1 insertion(+), 1 deletion(-)
18+
19+
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
20+
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
21+
@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
22+
// SIGSTKSZ may be too small to prevent the signal handlers from overrunning
23+
// the alternative stack. Ensure that the size of the alternative stack is
24+
// large enough.
25+
- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
26+
+ static const unsigned kSigStackSize = std::max(static_cast<long>(16384), SIGSTKSZ);
27+
28+
// Only set an alternative stack if there isn't already one, or if the current
29+
// one is too small.
30+
--- a/sandbox/linux/services/credentials.cc
31+
+++ b/sandbox/linux/services/credentials.cc
32+
@@ -98,7 +98,9 @@ bool ChrootToSafeEmptyDir() {
33+
// attempt this optimization.
34+
clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
35+
36+
- char tls_buf[PTHREAD_STACK_MIN] = {0};
37+
+ const std::size_t pthread_stack_min = PTHREAD_STACK_MIN;
38+
+ char tls_buf[pthread_stack_min];
39+
+ memset(tls_buf, 0, pthread_stack_min);
40+
tls = tls_buf;
41+
#endif
42+

0 commit comments

Comments
 (0)