diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-03-21 12:56:09 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-03-21 12:56:09 +0000 |
commit | bac33d01509e549669b2ae1e763dd85ba22d1e09 (patch) | |
tree | 112325a1d1f4f1c88133a88190ecba3231ddc6f4 /7.5.0/gentoo | |
parent | 8.3.0: backport glibc-2.31 libsanitizer fixes (diff) | |
download | gcc-patches-bac33d01509e549669b2ae1e763dd85ba22d1e09.tar.gz gcc-patches-bac33d01509e549669b2ae1e763dd85ba22d1e09.tar.bz2 gcc-patches-bac33d01509e549669b2ae1e763dd85ba22d1e09.zip |
7.5.0: backport glibc-2.31 libsanitizer fixes
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '7.5.0/gentoo')
-rw-r--r-- | 7.5.0/gentoo/22_all_libsanitizer-p1.patch | 32 | ||||
-rw-r--r-- | 7.5.0/gentoo/23_all_libsanitizer-p2.patch | 59 | ||||
-rw-r--r-- | 7.5.0/gentoo/README.history | 4 |
3 files changed, 95 insertions, 0 deletions
diff --git a/7.5.0/gentoo/22_all_libsanitizer-p1.patch b/7.5.0/gentoo/22_all_libsanitizer-p1.patch new file mode 100644 index 0000000..80cc074 --- /dev/null +++ b/7.5.0/gentoo/22_all_libsanitizer-p1.patch @@ -0,0 +1,32 @@ +From 54d87ffe4b34052f159ac5b72b250129ce813b2a Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek <jakub@redhat.com> +Date: Fri, 14 Feb 2020 12:33:27 +0100 +Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm + bootstrap due to libsanitizer) + + Backported from mainline + 2019-10-22 Tamar Christina <tamar.christina@arm.com> + + PR sanitizer/92154 + * sanitizer_common/sanitizer_platform_limits_posix.cc: + Cherry-pick compiler-rt revision r375220. +--- +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1147,8 +1147,12 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) ++#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \ ++ !defined(__arm__) + /* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++/* On Arm glibc 2.31 and later provide a different mode field, this field is ++ never used by libsanitizer so we can simply ignore this assert for all glibc ++ versions. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +-- +2.25.2 + diff --git a/7.5.0/gentoo/23_all_libsanitizer-p2.patch b/7.5.0/gentoo/23_all_libsanitizer-p2.patch new file mode 100644 index 0000000..bdd8dcb --- /dev/null +++ b/7.5.0/gentoo/23_all_libsanitizer-p2.patch @@ -0,0 +1,59 @@ +From dbdf86838aaaef76620c00c53096cfe157d5af6e Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek <jakub@redhat.com> +Date: Fri, 14 Feb 2020 12:38:30 +0100 +Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm + bootstrap due to libsanitizer) + + Backported from mainline + 2019-11-26 Jakub Jelinek <jakub@redhat.com> + + PR sanitizer/92154 + * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick + llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce. + * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise. +--- +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1147,12 +1147,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \ +- !defined(__arm__) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ +-/* On Arm glibc 2.31 and later provide a different mode field, this field is +- never used by libsanitizer so we can simply ignore this assert for all glibc +- versions. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -210,20 +210,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __unused2; + #elif defined(__sparc__) +-# if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-# else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-# endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) +-- +2.25.2 + diff --git a/7.5.0/gentoo/README.history b/7.5.0/gentoo/README.history index 3958c90..6029d79 100644 --- a/7.5.0/gentoo/README.history +++ b/7.5.0/gentoo/README.history @@ -1,3 +1,7 @@ +2 TODO + + 22_all_libsanitizer-p1.patch + + 23_all_libsanitizer-p2.patch + 1 14 Nov 2019 + 01_all_default-fortify-source.patch + 02_all_default-warn-format-security.patch |