diff --git a/libqt5-qtbase.changes b/libqt5-qtbase.changes index dd8564e..6af9063 100644 --- a/libqt5-qtbase.changes +++ b/libqt5-qtbase.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 8 14:06:22 UTC 2022 - Martin Liška + +- Add mitigate-FORTIFY_SOURCE-3.patch that should mitigate + new -D_FORTIFY_SOURCE=3 level as analyzed in GCC bug: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105078. + ------------------------------------------------------------------- Mon Feb 14 10:44:42 UTC 2022 - Fabian Vogt diff --git a/libqt5-qtbase.spec b/libqt5-qtbase.spec index fde43c1..2197194 100644 --- a/libqt5-qtbase.spec +++ b/libqt5-qtbase.spec @@ -61,6 +61,8 @@ Patch12: 0001-Add-remote-print-queue-support.patch # PATCH-FIX-OPENSUSE Patch21: 0001-Don-t-white-list-recent-Mesa-versions-for-multithrea.patch Patch24: fix-fixqt4headers.patch +# PATCH-FIX-OPENSUSE -- Mitigate -D_FORTIFY_SOURCE=3 issue starting with GCC 12 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105078) +Patch25: mitigate-FORTIFY_SOURCE-3.patch # patches 1000-2000 and above from upstream 5.15 branch # # patches 2000-3000 and above from upstream qt6/dev branch # # Not accepted yet, https://codereview.qt-project.org/c/qt/qtbase/+/255384 diff --git a/mitigate-FORTIFY_SOURCE-3.patch b/mitigate-FORTIFY_SOURCE-3.patch new file mode 100644 index 0000000..e7a2c91 --- /dev/null +++ b/mitigate-FORTIFY_SOURCE-3.patch @@ -0,0 +1,35 @@ +From: Martin Liška +Subject: Mitigate issue with -D_FORTIFY_SOURCE=3 seen with GCC 12 + +GCC upstream bug for it: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105078 + +diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h +index dcd95924..d01739e7 100644 +--- a/src/corelib/tools/qarraydata.h ++++ b/src/corelib/tools/qarraydata.h +@@ -42,6 +42,7 @@ + + #include + #include ++#include + + QT_BEGIN_NAMESPACE + +@@ -58,14 +59,14 @@ struct Q_CORE_EXPORT QArrayData + { + Q_ASSERT(size == 0 + || offset < 0 || size_t(offset) >= sizeof(QArrayData)); +- return reinterpret_cast(this) + offset; ++ return reinterpret_cast (reinterpret_cast(this) + offset); + } + + const void *data() const + { + Q_ASSERT(size == 0 + || offset < 0 || size_t(offset) >= sizeof(QArrayData)); +- return reinterpret_cast(this) + offset; ++ return reinterpret_cast (reinterpret_cast(this) + offset); + } + + // This refers to array data mutability, not "header data" represented by