diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-04-17 11:27:14 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-04-17 11:27:14 +0200 |
commit | d9f462fb372fb02da032cefd6b091d7582c425ae (patch) | |
tree | 6b683d7a74cceaeca92c798254f0fde039765487 /gcc | |
parent | 8ae884c09fbba91e9cec391290ee4a2859e7ff41 (diff) | |
download | gcc-d9f462fb372fb02da032cefd6b091d7582c425ae.zip gcc-d9f462fb372fb02da032cefd6b091d7582c425ae.tar.gz gcc-d9f462fb372fb02da032cefd6b091d7582c425ae.tar.bz2 |
sanitizer: Fix asan against glibc 2.34 [PR100114]
As mentioned in the PR, SIGSTKSZ is no longer a compile time constant in
glibc 2.34 and later, so
static const uptr kAltStackSize = SIGSTKSZ * 4;
needs dynamic initialization, but is used by a function called indirectly
from .preinit_array and therefore before the variable is constructed.
This results in using 0 size instead and all asan instrumented programs
die with:
==91==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22)
Here is a cherry-pick from upstream to fix this.
2021-04-17 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/100114
* sanitizer_common/sanitizer_posix_libcdep.cpp: Cherry-pick
llvm-project revisions 82150606fb11d28813ae6da1101f5bda638165fe
and b93629dd335ffee2fc4b9b619bf86c3f9e6b0023.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions