Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gcc12 for openSUSE:Factory checked in at 2023-09-14 16:24:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc12 (Old) and /work/SRC/openSUSE:Factory/.gcc12.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc12" Thu Sep 14 16:24:49 2023 rev:12 rq:1110685 version:12.3.0+git1204 Changes: -------- --- /work/SRC/openSUSE:Factory/gcc12/gcc12.changes 2023-05-09 13:08:34.617463490 +0200 +++ /work/SRC/openSUSE:Factory/.gcc12.new.1766/gcc12.changes 2023-09-14 16:26:02.863401069 +0200 @@ -1,0 +2,7 @@ +Thu Aug 17 06:37:28 UTC 2023 - Richard Biener <[email protected]> + +- Add gcc12-aarch64-bsc1214052.patch to fix -fstack-protector issues + with variable length stack allocations on aarch64. + Fixes CVE-2023-4039. [bsc#1214052] + +------------------------------------------------------------------- @@ -5,0 +13,2 @@ +- Add gcc12-testsuite-fixes.patch to pick testsuite related fixes + from the branch after the release. New: ---- gcc12-aarch64-bsc1214052.patch gcc12-testsuite-fixes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc12-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.ozd9Xy/_old 2023-09-14 16:26:09.687644856 +0200 +++ /var/tmp/diff_new_pack.ozd9Xy/_new 2023-09-14 16:26:09.691644999 +0200 @@ -131,6 +131,8 @@ Patch22: gcc12-riscv-inline-atomics.patch # remove libatomics linking Patch23: gcc12-riscv-pthread.patch +Patch24: gcc12-testsuite-fixes.patch +Patch25: gcc12-aarch64-bsc1214052.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -325,6 +327,8 @@ %patch17 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 +%patch25 -p1 # These patches are needed only for llvm11 %if "%{TARGET_ARCH}" == "amdgcn" && %{suse_version} < 1550 %patch18 -p1 cross-aarch64-gcc12.spec: same change cross-amdgcn-gcc12.spec: same change cross-arm-gcc12.spec: same change cross-arm-none-gcc12-bootstrap.spec: same change cross-arm-none-gcc12.spec: same change cross-avr-gcc12-bootstrap.spec: same change cross-avr-gcc12.spec: same change cross-epiphany-gcc12-bootstrap.spec: same change cross-epiphany-gcc12.spec: same change cross-hppa-gcc12-bootstrap.spec: same change cross-hppa-gcc12.spec: same change cross-m68k-gcc12.spec: same change cross-mips-gcc12.spec: same change cross-nvptx-gcc12.spec: same change cross-ppc64-gcc12.spec: same change cross-ppc64le-gcc12.spec: same change cross-pru-gcc12-bootstrap.spec: same change cross-pru-gcc12.spec: same change cross-riscv64-elf-gcc12-bootstrap.spec: same change cross-riscv64-elf-gcc12.spec: same change cross-riscv64-gcc12-bootstrap.spec: same change cross-riscv64-gcc12.spec: same change cross-rx-gcc12-bootstrap.spec: same change cross-rx-gcc12.spec: same change cross-s390x-gcc12.spec: same change cross-sparc-gcc12.spec: same change cross-sparc64-gcc12.spec: same change cross-x86_64-gcc12.spec: same change gcc12-testresults.spec: same change ++++++ gcc12.spec ++++++ --- /var/tmp/diff_new_pack.ozd9Xy/_old 2023-09-14 16:26:10.619678152 +0200 +++ /var/tmp/diff_new_pack.ozd9Xy/_new 2023-09-14 16:26:10.619678152 +0200 @@ -372,6 +372,8 @@ Patch22: gcc12-riscv-inline-atomics.patch # remove libatomics linking Patch23: gcc12-riscv-pthread.patch +Patch24: gcc12-testsuite-fixes.patch +Patch25: gcc12-aarch64-bsc1214052.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -2024,6 +2026,8 @@ %patch17 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 +%patch25 -p1 # These patches are needed only for llvm11 %if "%{TARGET_ARCH}" == "amdgcn" && %{suse_version} < 1550 %patch18 -p1 ++++++ gcc.spec.in ++++++ --- /var/tmp/diff_new_pack.ozd9Xy/_old 2023-09-14 16:26:10.779683867 +0200 +++ /var/tmp/diff_new_pack.ozd9Xy/_new 2023-09-14 16:26:10.791684296 +0200 @@ -377,6 +377,8 @@ Patch22: gcc12-riscv-inline-atomics.patch # remove libatomics linking Patch23: gcc12-riscv-pthread.patch +Patch24: gcc12-testsuite-fixes.patch +Patch25: gcc12-aarch64-bsc1214052.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -1211,6 +1213,8 @@ %patch17 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 +%patch25 -p1 # These patches are needed only for llvm11 %if "%{TARGET_ARCH}" == "amdgcn" && %{suse_version} < 1550 %patch18 -p1 ++++++ gcc12-aarch64-bsc1214052.patch ++++++ ++++ 3073 lines (skipped) ++++++ gcc12-testsuite-fixes.patch ++++++ >From 5f803e68beee9f71c12c112ccda872997919f9cc Mon Sep 17 00:00:00 2001 From: Richard Biener <[email protected]> Date: Wed, 10 May 2023 15:36:12 +0200 Subject: [PATCH 1/4] Avoid g++.dg/torture/pr106922.C FAIL with the pre-C++11 ABI To: [email protected] The following forces the g++.dg/torture/pr106922.C testcase to use the C++11 libstdc++ ABI and checks whether that worked. gcc/testsuite/ * g++.dg/torture/pr106922.C: Force _GLIBCXX_USE_CXX11_ABI to 1. (cherry picked from commit a056a9868e6ecab24b0b7e4e12e846097b8c8fb0) --- gcc/testsuite/g++.dg/torture/pr106922.C | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/testsuite/g++.dg/torture/pr106922.C b/gcc/testsuite/g++.dg/torture/pr106922.C index 046fc6cce76..b0c1489fbdc 100644 --- a/gcc/testsuite/g++.dg/torture/pr106922.C +++ b/gcc/testsuite/g++.dg/torture/pr106922.C @@ -4,8 +4,16 @@ // -O1 doesn't iterate VN and thus has bogus uninit diagnostics // { dg-skip-if "" { *-*-* } { "-O1" } { "" } } +// The testcase still emits bogus diagnostics with the pre-C++11 ABI +#undef _GLIBCXX_USE_CXX11_ABI +#define _GLIBCXX_USE_CXX11_ABI 1 + #include <vector> +// When the library is not dual-ABI and defaults to old just compile +// an empty TU +#if _GLIBCXX_USE_CXX11_ABI + #include <optional> template <class T> using Optional = std::optional<T>; @@ -46,3 +54,4 @@ void test() externals.external2 = internal2; } } +#endif -- 2.35.3 >From 35ca946985773e0fa49624d37323e0338a39c5f3 Mon Sep 17 00:00:00 2001 From: Richard Biener <[email protected]> Date: Thu, 11 May 2023 09:13:31 +0200 Subject: [PATCH 3/4] testsuite/108776 - avoid c-c++-common/rotate-11.c FAIL To: [email protected] On the branch ranger isn't powerful enough to handle some cases appearing with logical-op-non-short-circuit evaluating to false causing FAILs of the testcase for ppc64le and s390x. The following foces logical-op-non-short-circuit to true for this testcase on the branch. PR testsuite/108776 * c-c++-common/rotate-11.c: Add --param logical-op-non-short-circuit=1. --- gcc/testsuite/c-c++-common/rotate-11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/c-c++-common/rotate-11.c b/gcc/testsuite/c-c++-common/rotate-11.c index e57db19d949..85cde2786e2 100644 --- a/gcc/testsuite/c-c++-common/rotate-11.c +++ b/gcc/testsuite/c-c++-common/rotate-11.c @@ -1,6 +1,6 @@ /* PR tree-optimization/108440 */ /* { dg-do compile { target { { ilp32 || lp64 } || llp64 } } } */ -/* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-options "-O2 -fdump-tree-optimized --param logical-op-non-short-circuit=1" } */ /* { dg-final { scan-tree-dump-times " r<< " 5 "optimized" } } */ /* { dg-final { scan-tree-dump-times " \\\& 7;" 4 "optimized" } } */ -- 2.35.3 >From 7b4ab70f2d7182f119bc927f15876a3178c0cc14 Mon Sep 17 00:00:00 2001 From: Richard Biener <[email protected]> Date: Thu, 11 May 2023 09:30:52 +0200 Subject: [PATCH 4/4] Fix gcc.dg/vect/pr108950.c To: [email protected] The following puts the dg-require-effective-target properly after the dg-do. * gcc.dg/vect/pr108950.c: Re-order dg-require-effective-target and dg-do. --- gcc/testsuite/gcc.dg/vect/pr108950.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/vect/pr108950.c b/gcc/testsuite/gcc.dg/vect/pr108950.c index ecf076c964b..563c4b9df38 100644 --- a/gcc/testsuite/gcc.dg/vect/pr108950.c +++ b/gcc/testsuite/gcc.dg/vect/pr108950.c @@ -1,5 +1,5 @@ -/* { dg-require-effective-target vect_simd_clones } */ /* { dg-do compile } */ +/* { dg-require-effective-target vect_simd_clones } */ int m; short int n; -- 2.35.3 >From 16a76499f916b5b6d11bccc03cc0d16b2b1ee31b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely <[email protected]> Date: Wed, 16 Nov 2022 12:22:04 +0000 Subject: [PATCH] libstdc++: Fix std::any pretty printer To: [email protected] The recent changes to FilteringTypePrinter affect the result of gdb.lookup_type('std::string') in StdExpAnyPrinter, causing it to always return the std::__cxx11::basic_string specialization. This then causes a gdb.error exception when trying to lookup the std::any manager type for a specialization using that string, but that manager was never instantiated in the program. This causes FAILs when running the tests with -D_GLIBCXX_USE_CXX11_ABI=0: FAIL: libstdc++-prettyprinters/libfundts.cc print as FAIL: libstdc++-prettyprinters/libfundts.cc print as The ugly solution used in this patch is to repeat the lookup for every type that std::string could be a typedef for, and hope it only works for one of them. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Make expansion of std::string in manager name more robust. (cherry picked from commit 3c54805d03ac1bcc3d8547ffb5e6c4e1f301a7a2) --- libstdc++-v3/python/libstdcxx/v6/printers.py | 31 ++++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index bb06a4959ee..d27a25bd96f 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -1216,9 +1216,34 @@ class StdExpAnyPrinter(SingleObjContainerPrinter): mgrname = m.group(1) # FIXME need to expand 'std::string' so that gdb.lookup_type works if 'std::string' in mgrname: - mgrname = re.sub("std::string(?!\w)", str(gdb.lookup_type('std::string').strip_typedefs()), m.group(1)) - - mgrtype = gdb.lookup_type(mgrname) + # This lookup for std::string might return the __cxx11 version, + # but that's not necessarily the one used by the std::any + # manager function we're trying to find. + strings = {str(gdb.lookup_type('std::string').strip_typedefs())} + # So also consider all the other possible std::string types! + s = 'basic_string<char, std::char_traits<char>, std::allocator<char> >' + quals = ['std::', 'std::__cxx11::', 'std::' + _versioned_namespace] + strings |= {q+s for q in quals} # set of unique strings + mgrtypes = [] + for s in strings: + try: + x = re.sub("std::string(?!\w)", s, m.group(1)) + # The following lookup might raise gdb.error if the + # manager function was never instantiated for 's' in the + # program, because there will be no such type. + mgrtypes.append(gdb.lookup_type(x)) + except gdb.error: + pass + if len(mgrtypes) != 1: + # FIXME: this is unlikely in practice, but possible for + # programs that use both old and new string types with + # std::any in a single program. Can we do better? + # Maybe find the address of each type's _S_manage and + # compare to the address stored in _M_manager? + raise ValueError('Cannot uniquely determine std::string type used in std::any') + mgrtype = mgrtypes[0] + else: + mgrtype = gdb.lookup_type(mgrname) self.contained_type = mgrtype.template_argument(0) valptr = None if '::_Manager_internal' in mgrname: -- 2.35.3
