glibc/glibc-temp-Wno-use-after-free.patch

87 lines
3.1 KiB
Diff
Raw Normal View History

Auto-sync with upstream branch master Temporary patches to work around gcc 12 vs glibc warning and ppc64le long double conflicts. Upstream commit: 5b8e7980c5dabd9aaefeba4f0208baa8cf7653ee - Linux: Detect user namespace support in io/tst-getcwd-smallbuff - Fix handling of unterminated bracket expressions in fnmatch (bug 28792) - realpath: Avoid overwriting preexisting error (CVE-2021-3998) - elf: Add a test for PT_LOAD segments with invalid p_align [BZ #28688] - elf: Add a test for PT_LOAD segments with p_align == 1 [BZ #28688] - elf: Add a test for PT_LOAD segments with mixed p_align [BZ #28676] - Add and use link-test-modules-rpath-link [BZ #28455] - tst-realpath-toolong: Fix hurd build - getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) - Add valgrind smoke test - htl: Fix cleaning the reply port - elf: Properly align all PT_LOAD segments [BZ #28676] - realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770] - support: Add helpers to create paths longer than PATH_MAX - nptl: Effectively skip CAS in spinlock loop - mips: Move DT_MIPS into <ldsodefs.h> - x86_64: Document libmvec vector functions accuracy [BZ #28766] - x86: Black list more Intel CPUs for TSX [BZ #27398] - elf: Fix tst-align3 - elf: Move _dl_setup_hash to its own file - htl: Fix build error in annexc - elf: Reinstate tst-audit17 - x86: use default cache size if it cannot be determined [BZ #28784] - rt/tst-mqueue*: Return UNSUPPORTED when mq_open fails with ENOSYS - Linux: Add epoll_pwait2 (BZ #27359) - Properly handle --disable-default-pie [BZ #28780] - elf: Fix 64 time_t support for installed statically binaries - Revert "elf: Fix 64 time_t support for installed statically binaries" - CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) - sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542) - CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542) - socket: Add the __sockaddr_un_set function - elf/tst-dl_find_object: Disable subtests for non-contiguous maps (bug 28732) - elf: Set l_contiguous to 1 for the main map in more cases - elf: Introduce rtld_setup_main_map - hurd: Make RPC input array parameters const - hurd: optimize exec cleanup - hurd: Add __rtld_execve - hurd: Fix exec() leak on proc_task2proc failure - htl: Hide __pthread_attr's __schedparam type [BZ #23088] - htl: Clear kernel_thread field before releasing the thread structure - hurd: drop SA_SIGINFO availability xfail - hurd: Fix timer/clock_getres crash on NULL res parameter - hurd: Fix pthread_kill on exiting/ted thread - [hurd] Drop spurious #ifdef SHARED - [hurd] Call _dl_sort_maps_init in _dl_sysdep_start - elf tst-dl_find_object: Fix typo - s390x: Use <gcc-macros.h> in early HWCAP check - x86: Add x86-64-vN check to early startup - powerpc64le: Use <gcc-macros.h> in early HWCAP check - Add --with-rtld-early-cflags configure option - elf: Split dl-printf.c from dl-misc.c - elf/Makefile: Reflow and sort most variable assignments - Generate gcc-macros.h - x86: HAVE_X86_LAHF_SAHF, HAVE_X86_MOVBE and -march=x86-64-vN (bug 28782) - math: Add more inputs to atan2 accuracy tests [BZ #28765] - Disable debuginfod in printer tests [BZ #28757] - Update syscall lists for Linux 5.16 - i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771) - stdlib: Fix formatting of tests list in Makefile - stdlib: Sort tests in Makefile - x86_64: Fix SSE4.2 libmvec atan2 function accuracy [BZ #28765] - debug: Synchronize feature guards in fortified functions [BZ #28746] - debug: Autogenerate _FORTIFY_SOURCE tests - Do not build libresolv module with 64 bit time_t flags - Revert "linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350)" - Revert "support: Add support_socket_so_timestamp_time64" - timezone: Fix tst-bz28707 Makefile rule - linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350) - support: Add support_socket_so_timestamp_time64 - elf: Fix 64 time_t support for installed statically binaries - Enable _FORTIFY_SOURCE=3 for gcc 12 and above - manual: Drop obsolete @refill - aarch64: Add HWCAP2_ECV from Linux 5.16 - Use Linux 5.16 in build-many-glibcs.py - x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755] - x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755] - math: Fix float conversion regressions with gcc-12 [BZ #28713] - elf: Simplify software TM implementation in _dl_find_object - Restore ENTRY_POINT definition on hppa, ia64 (bug 28749) - elf: Fix fences in _dl_find_object_update (bug 28745) - ttydefaults.h: Fix CSTATUS to control-t - AArch64: Check for SVE in ifuncs [BZ #28744] - debug: Remove catchsegv and libSegfault (BZ #14913) - Documentation for OpenRISC port - build-many-glibcs.py: add OpenRISC support - or1k: Build Infrastructure - or1k: ABI lists - or1k: Linux ABI - or1k: Linux Syscall Interface - or1k: math soft float support - or1k: Atomics and Locking primitives - or1k: Thread Local Storage support - or1k: startup and dynamic linking code - or1k: ABI Implementation - linux/syscalls: Add or1k_atomic syscall for OpenRISC - elf: Add reloc for OpenRISC - elf: Add a comment after trailing backslashes - elf: Also try DT_RUNPATH for LD_AUDIT dlopen [BZ #28455] - elf: Fix tst-linkall-static link when pthread is not in libc
2022-01-24 21:39:19 +00:00
diff --git a/elf/Makefile b/elf/Makefile
index 41e0f2e8c4..95fd4c73a5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -177,6 +177,8 @@ CFLAGS-dl-write.os += $(rtld-early-cflags)
CFLAGS-dl-writev.os += $(rtld-early-cflags)
CFLAGS-rtld.os += $(rtld-early-cflags)
+CFLAGS-ldconfig.c += -Wno-use-after-free
+
ifeq ($(unwind-find-fde),yes)
routines += unwind-dw2-fde-glibc
shared-only-routines += unwind-dw2-fde-glibc
diff --git a/intl/Makefile b/intl/Makefile
index 315c75a18f..00e4c363a5 100644
--- a/intl/Makefile
+++ b/intl/Makefile
@@ -128,6 +128,8 @@ $(objpfx)msgs.h: po2test.awk $(objpfx)tst-gettext-de.po
$(make-target-directory)
LC_ALL=C $(AWK) -f $^ > $@
+CFLAGS-localealias.c += -Wno-use-after-free
+
CFLAGS-tst-gettext.c += -DTESTSTRS_H=\"$(objpfx)msgs.h\"
CFLAGS-tst-translit.c += -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext2.c += -DOBJPFX=\"$(objpfx)\"
diff --git a/io/Makefile b/io/Makefile
index cf265dc9b9..c53cf209ee 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -123,9 +123,9 @@ CFLAGS-fstatvfs.c += -fexceptions
CFLAGS-fts.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
CFLAGS-fts64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
CFLAGS-fts64-time64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
-CFLAGS-ftw.c += $(uses-callbacks) -fexceptions
-CFLAGS-ftw64.c += $(uses-callbacks) -fexceptions
-CFLAGS-ftw64-time64.c += $(uses-callbacks) -fexceptions
+CFLAGS-ftw.c += $(uses-callbacks) -fexceptions -Wno-use-after-free
+CFLAGS-ftw64.c += $(uses-callbacks) -fexceptions -Wno-use-after-free
+CFLAGS-ftw64-time64.c += $(uses-callbacks) -fexceptions -Wno-use-after-free
CFLAGS-posix_fallocate.c += -fexceptions
CFLAGS-posix_fallocate64.c += -fexceptions
CFLAGS-fallocate.c += -fexceptions
diff --git a/malloc/Makefile b/malloc/Makefile
index 2329cf718a..677773b86b 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -259,6 +259,13 @@ include ../Rules
CFLAGS-mcheck-init.c += $(PIC-ccflag)
CFLAGS-obstack.c += $(uses-callbacks)
+CFLAGS-tst-realloc.c += -Wno-use-after-free
+CFLAGS-tst-obstack.c += -Wno-use-after-free
+CFLAGS-tst-malloc-check.c += -Wno-use-after-free
+CFLAGS-tst-malloc-backtrace.c += -Wno-use-after-free
+CFLAGS-tst-malloc-too-large.c += -Wno-use-after-free
+CFLAGS-tst-mallocalign1.c += -Wno-use-after-free
+
$(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
-rm -f $@
$(patsubst %/,cd % &&,$(objpfx)) \
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..dbacf88218 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -196,6 +196,7 @@ extra-test-objs += tst-putenvmod.os
generated += isomac isomac.out tst-putenvmod.so
+CFLAGS-setenv.c += -Wno-use-after-free
CFLAGS-bsearch.c += $(uses-callbacks)
CFLAGS-msort.c += $(uses-callbacks)
CFLAGS-qsort.c += $(uses-callbacks)
diff --git a/support/Makefile b/support/Makefile
index 6dc6c9d49a..7dafcffb71 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,6 +234,8 @@ CFLAGS-support_paths.c = \
CFLAGS-timespec.c += -fexcess-precision=standard
CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-tst-support-open-dev-null-range.c += -Wno-use-after-free
+
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
else