From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 397B43857828; Thu, 5 Aug 2021 08:49:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 397B43857828 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-10020] sanitizer: cherry pick 414482751452e54710f16bae58458c66298aaf69 X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 37b57f9e7db589bebf529b348d73703415c784ef X-Git-Newrev: 6bbaa64881715b8df2d717e418eeec7b7e974a22 Message-Id: <20210805084923.397B43857828@sourceware.org> Date: Thu, 5 Aug 2021 08:49:23 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 08:49:23 -0000 https://gcc.gnu.org/g:6bbaa64881715b8df2d717e418eeec7b7e974a22 commit r10-10020-g6bbaa64881715b8df2d717e418eeec7b7e974a22 Author: Martin Liska Date: Thu Aug 5 10:43:17 2021 +0200 sanitizer: cherry pick 414482751452e54710f16bae58458c66298aaf69 The patch is needed in order to support recent glibc (2.34). libsanitizer/ChangeLog: PR sanitizer/101749 * sanitizer_common/sanitizer_posix_libcdep.cpp: Prevent generation of dependency on _cxa_guard for static initialization. Diff: --- libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp index ac88fbe074e..44359b3d1ac 100644 --- a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp @@ -170,9 +170,10 @@ bool SupportsColoredOutput(fd_t fd) { #if !SANITIZER_GO // TODO(glider): different tools may require different altstack size. static uptr GetAltStackSize() { - // SIGSTKSZ is not enough. - static const uptr kAltStackSize = SIGSTKSZ * 4; - return kAltStackSize; + // Note: since GLIBC_2.31, SIGSTKSZ may be a function call, so this may be + // more costly that you think. However GetAltStackSize is only call 2-3 times + // per thread so don't cache the evaluation. + return SIGSTKSZ * 4; } void SetAlternateSignalStack() {