From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 048DF385DC01; Thu, 5 Aug 2021 08:48:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 048DF385DC01 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 r11-8828] sanitizer: cherry pick 414482751452e54710f16bae58458c66298aaf69 X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 5b857c033e32825c35219b8bc1f513b78be470c6 X-Git-Newrev: 91f8a7a34cf29ae7c465603a801326767f1cc7e9 Message-Id: <20210805084839.048DF385DC01@sourceware.org> Date: Thu, 5 Aug 2021 08:48:38 +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:48:39 -0000 https://gcc.gnu.org/g:91f8a7a34cf29ae7c465603a801326767f1cc7e9 commit r11-8828-g91f8a7a34cf29ae7c465603a801326767f1cc7e9 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 7ff48c35851..a65b16f5290 100644 --- a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp @@ -166,9 +166,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() {