Go to file
Evgenii Stepanov b29bcc7881 [PATCH] Fix sanitizer-common build with glibc 2.31
Summary:
As mentioned in D69104, glibc changed ABI recently with the [[ https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2f959dfe849e0646e27403f2e4091536496ac0f0| 2f959dfe ]] change.
D69104 dealt with just 32-bit ARM, but that is just one of the many affected architectures.
E.g. x86_64, i?86, riscv64, sparc 32-bit, s390 31-bit are affected too (and various others).

This patch instead of adding a long list of further architectures that wouldn't be checked ever next to arm 32-bit changes the structures to match the 2.31 layout and performs the checking on Linux for ipc_perm mode position/size only on non-Linux or on Linux with glibc 2.31 or later.  I think this matches what is done for aarch64 already.
If needed, we could list architectures that haven't changed ABI (e.g. powerpc), so that they would be checked even with older glibcs.  AFAIK sanitizers don't actually use ipc_perm.mode and
so all they care about is the size and alignment of the whole structure.

Note, s390 31-bit and arm 32-bit big-endian changed ABI even further, there will now be shmctl with old symbol version and shmctl@@GLIBC_2.31 which will be incompatible.  I'm afraid this isn't really solvable unless the sanitizer libraries are symbol versioned and use matching symbol versions to glibc symbols for stuff they intercept, plus use dlvsym.
This patch doesn't try to address that.

Patch by Jakub Jelinek.

Reviewers: kcc, eugenis, dvyukov

Reviewed By: eugenis

Subscribers: jyknight, kristof.beyls, fedor.sergeev, simoncook, PkmX, s.egerton, steven.zhang, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D70662

Gbp-Pq: Name 947f9692440836dcb8d88b74b69dd379d85974ce.patch
2022-06-27 14:59:00 +08:00
.github/workflows Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
clang change all shebangs to Python3 2022-06-27 14:59:00 +08:00
clang-tools-extra change all shebangs to Python3 2022-06-27 14:59:00 +08:00
compiler-rt [PATCH] Fix sanitizer-common build with glibc 2.31 2022-06-27 14:59:00 +08:00
debian Import Debian changes 1:9.0.1-ok1 2022-06-27 14:52:38 +08:00
debuginfo-tests Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
libclc Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
libcxx change all shebangs to Python3 2022-06-27 14:59:00 +08:00
libcxxabi libcxx-silent-test-libcxx 2022-06-27 14:58:55 +08:00
libunwind Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
lld change all shebangs to Python3 2022-06-27 14:59:00 +08:00
lldb print-lldb-path 2022-06-27 14:59:00 +08:00
llgo change all shebangs to Python3 2022-06-27 14:59:00 +08:00
llvm cgi method is deprecated, use html instead 2022-06-27 14:59:00 +08:00
openmp bootstrap-with-openmp-version-export-missing 2022-06-27 14:58:53 +08:00
parallel-libs Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
polly hurd-pathmax 2022-06-27 14:58:57 +08:00
pstl Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
.arcconfig Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
.clang-format Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
.clang-tidy Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
.gitignore Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00
README.md Import Upstream version 9.0.1 2022-06-27 14:52:34 +08:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.