From 6dc7ed884091eb373f72d53f2b87371cd899378e Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 11 Aug 2021 11:39:59 +0200 Subject: [PATCH] Fix build with glibc 2.34 --- .../abseil-cpp/absl/debugging/failure_signal_handler.cc | 3 ++- .../breakpad/src/client/linux/handler/exception_handler.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc index d7b5d8c4413..a62cb21bd7a 100644 --- a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc +++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc @@ -98,7 +98,9 @@ bool ChrootToSafeEmptyDir() { // attempt this optimization. clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS; - char tls_buf[PTHREAD_STACK_MIN] = {0}; + const std::size_t pthread_stack_min = PTHREAD_STACK_MIN; + char tls_buf[pthread_stack_min]; + memset(tls_buf, 0, pthread_stack_min); tls = tls_buf; #endif diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc index 5d13bdbbbd1..2ed137b58f1 100644 --- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc +++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc @@ -135,7 +135,8 @@ static bool SetupAlternateStackOnce() { #else const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; #endif - size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; + size_t stack_size = + (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) // Account for sanitizer instrumentation requiring additional stack space. diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc index ca353c40997..2e43ba6fc04 100644 --- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/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); + static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); // Only set an alternative stack if there isn't already one, or if the current // one is too small. -- 2.32.0