Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package systemtap for openSUSE:Factory 
checked in at 2022-03-05 14:42:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/systemtap (Old)
 and      /work/SRC/openSUSE:Factory/.systemtap.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "systemtap"

Sat Mar  5 14:42:53 2022 rev:115 rq:958521 version:4.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/systemtap/systemtap-dtrace.changes       
2022-03-02 18:20:04.576653764 +0100
+++ /work/SRC/openSUSE:Factory/.systemtap.new.1958/systemtap-dtrace.changes     
2022-03-05 14:42:54.563693233 +0100
@@ -1,0 +2,10 @@
+Wed Mar  2 19:19:36 UTC 2022 - Tony Jones <to...@suse.com>
+
+- Add gcc12 support (bsc#1196583)
+    New patch: PR28778-gcc-warning-tweak-for-sprintf-precision-parameter.patch
+    New patch: gcc12-c-compatibility-tweak-use-lambdas-instead-of-ptr_fun.patch
+    New patch: 
gcc12-c-compatibility-re-tweak-for-rhel6-use-function-pointer-instead-of-lambdas-instead-of-ptr_fun.patch
+    New patch: buildrun-for-LKM-backend-add-Wno-infinite-recursion.patch
+    New patch: gcc12-warning-suppression.patch
+
+-------------------------------------------------------------------
systemtap-headers.changes: same change
systemtap.changes: same change

New:
----
  PR28778-gcc-warning-tweak-for-sprintf-precision-parameter.patch
  buildrun-for-LKM-backend-add-Wno-infinite-recursion.patch
  
gcc12-c-compatibility-re-tweak-for-rhel6-use-function-pointer-instead-of-lambdas-instead-of-ptr_fun.patch
  gcc12-c-compatibility-tweak-use-lambdas-instead-of-ptr_fun.patch
  gcc12-warning-suppression.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ systemtap-dtrace.spec ++++++
--- /var/tmp/diff_new_pack.cuzUjj/_old  2022-03-05 14:42:55.575693488 +0100
+++ /var/tmp/diff_new_pack.cuzUjj/_new  2022-03-05 14:42:55.583693490 +0100
@@ -36,6 +36,11 @@
 Patch3:         sys-sdt.h-fp-constraints-x86_64.patch
 Patch4:         sys-sdt.h-fp-constraints-aarch64-s390.patch
 Patch5:         Handle-user-supplied-sdt-probe-argument-template.patch
+Patch6:         PR28778-gcc-warning-tweak-for-sprintf-precision-parameter.patch
+Patch7:         
gcc12-c-compatibility-tweak-use-lambdas-instead-of-ptr_fun.patch
+Patch8:         
gcc12-c-compatibility-re-tweak-for-rhel6-use-function-pointer-instead-of-lambdas-instead-of-ptr_fun.patch
+Patch9:         buildrun-for-LKM-backend-add-Wno-infinite-recursion.patch
+Patch10:        gcc12-warning-suppression.patch
 
 BuildArch:      noarch
 

++++++ systemtap-headers.spec ++++++
--- /var/tmp/diff_new_pack.cuzUjj/_old  2022-03-05 14:42:55.607693496 +0100
+++ /var/tmp/diff_new_pack.cuzUjj/_new  2022-03-05 14:42:55.611693497 +0100
@@ -41,6 +41,11 @@
 Patch3:         sys-sdt.h-fp-constraints-x86_64.patch
 Patch4:         sys-sdt.h-fp-constraints-aarch64-s390.patch
 Patch5:         Handle-user-supplied-sdt-probe-argument-template.patch
+Patch6:         PR28778-gcc-warning-tweak-for-sprintf-precision-parameter.patch
+Patch7:         
gcc12-c-compatibility-tweak-use-lambdas-instead-of-ptr_fun.patch
+Patch8:         
gcc12-c-compatibility-re-tweak-for-rhel6-use-function-pointer-instead-of-lambdas-instead-of-ptr_fun.patch
+Patch9:         buildrun-for-LKM-backend-add-Wno-infinite-recursion.patch
+Patch10:        gcc12-warning-suppression.patch
 
 # sdt-devel provides the same header files as us, so we
 # must conflict

++++++ systemtap.spec ++++++
--- /var/tmp/diff_new_pack.cuzUjj/_old  2022-03-05 14:42:55.631693502 +0100
+++ /var/tmp/diff_new_pack.cuzUjj/_new  2022-03-05 14:42:55.635693503 +0100
@@ -37,6 +37,11 @@
 Patch3:         sys-sdt.h-fp-constraints-x86_64.patch
 Patch4:         sys-sdt.h-fp-constraints-aarch64-s390.patch
 Patch5:         Handle-user-supplied-sdt-probe-argument-template.patch
+Patch6:         PR28778-gcc-warning-tweak-for-sprintf-precision-parameter.patch
+Patch7:         
gcc12-c-compatibility-tweak-use-lambdas-instead-of-ptr_fun.patch
+Patch8:         
gcc12-c-compatibility-re-tweak-for-rhel6-use-function-pointer-instead-of-lambdas-instead-of-ptr_fun.patch
+Patch9:         buildrun-for-LKM-backend-add-Wno-infinite-recursion.patch
+Patch10:        gcc12-warning-suppression.patch
 
 BuildRequires:  autoconf
 BuildRequires:  automake

++++++ PR28778-gcc-warning-tweak-for-sprintf-precision-parameter.patch ++++++
From: "Frank Ch. Eigler" <f...@redhat.com>
Date: Thu, 13 Jan 2022 18:33:15 -0500
Subject: PR28778: gcc warning tweak for sprintf precision parameter
Git-repo: git://sourceware.org/git/systemtap.git
Git-commit: b0422e9e5a539164af75cddcaeb01bceca56bf12
References: bsc#1196583

A precision=-1 sentinel value got interpreted as UINT_MAX in a
context, leading to diagnostics like:

/usr/share/systemtap/runtime/vsprintf.c:341:23: error: 'strnlen' specified 
bound 4294967295 may exceed maximum object size 2147483647 
[-Werror=stringop-overread]

Adding a clamp_t() around the parameter field to keep it limited to
STP_BUFFER_SIZE (8K by default), which is apprx. the limit for a
single printf.

Signed-off-by: Tony Jones <to...@suse.de>
---
 runtime/vsprintf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index cd31a938b..606f685e8 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -338,7 +338,7 @@ _stp_vsprint_memory(char * str, char * end, const char * 
ptr,
        if (format == 's') {
                if ((unsigned long)ptr < PAGE_SIZE)
                        ptr = "<NULL>";
-               len = strnlen(ptr, precision);
+               len = strnlen(ptr, clamp_t(size_t, precision, 0, 
STP_BUFFER_SIZE));                
        }
        else if (precision > 0)
                len = precision;
@@ -410,7 +410,7 @@ _stp_vsprint_memory_size(const char * ptr, int width, int 
precision,
        if (format == 's') {
                if ((unsigned long)ptr < PAGE_SIZE)
                        ptr = "<NULL>";
-               len = strnlen(ptr, precision);
+               len = strnlen(ptr, clamp_t(size_t, precision, 0, 
STP_BUFFER_SIZE));
        }
        else if (precision > 0)
                len = precision;


++++++ buildrun-for-LKM-backend-add-Wno-infinite-recursion.patch ++++++
From: "Frank Ch. Eigler" <f...@redhat.com>
Date: Mon, 7 Feb 2022 13:59:54 -0500
Subject: buildrun: for LKM backend, add -Wno-infinite-recursion
Git-repo: git://sourceware.org/git/systemtap.git
Git-commit: 9295f6046518dc15678032ac54abb8a4e2916f33
References: bsc#1196583

On GCC12 / fedora rawhide, this diagnostic is currently generating
false positives w.r.t. a few memcpy type functions.

Signed-off-by: Tony Jones <to...@suse.de>
---
 buildrun.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/buildrun.cxx b/buildrun.cxx
index 2a18fe3b7..ecaeedaac 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -601,6 +601,9 @@ compile_pass (systemtap_session& s)
   // Accept extra diagnostic-suppression pragmas etc.
   o << "EXTRA_CFLAGS += -Wno-pragmas" << endl;
 
+  // Suppress gcc12 diagnostic bug in kernel-devel for 5.16ish
+  o << "EXTRA_CFLAGS += -Wno-infinite-recursion" << endl;
+  
   // PR25845: Recent gcc (seen on 9.3.1) warns fairly common 32-bit 
pointer-conversions:
   o << "EXTRA_CFLAGS += $(call cc-option,-Wno-pointer-to-int-cast)" << endl;
   o << "EXTRA_CFLAGS += $(call cc-option,-Wno-int-to-pointer-cast)" << endl;


++++++ 
gcc12-c-compatibility-re-tweak-for-rhel6-use-function-pointer-instead-of-lambdas-instead-of-ptr_fun.patch
 ++++++
From: Serhei Makarov <ser...@serhei.io>
Date: Fri, 21 Jan 2022 18:21:46 -0500
Subject: gcc12 c++ compatibility re-tweak for rhel6: use function pointer
 instead of lambdas instead of ptr_fun<>
Git-repo: git://sourceware.org/git/systemtap.git
Git-commit: f199d1982ef8a6c6d5c06c082d057b8793bcc6aa
References: bsc#1196583

Saving 2 lines in ltrim/rtrim is probably not a good reason to drop
compatibility with the RHEL6 system compiler.  Actually declaring a
named function and passing the function pointer is compatible with
everything.

Signed-off-by: Tony Jones <to...@suse.de>
---
 util.cxx | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/util.cxx b/util.cxx
index e9286eca3..ad36259c9 100644
--- a/util.cxx
+++ b/util.cxx
@@ -1757,21 +1757,24 @@ flush_to_stream (const string &fname, ostream &o)
   return 1; // Failure
 }
 
+int
+not_isspace(unsigned char c)
+{
+  return !std::isspace(c);
+}
+
 // trim from start (in place)
 void
 ltrim(std::string &s)
 {
-  s.erase(s.begin(),
-         std::find_if(s.begin(), s.end(),
-                       [](unsigned char c) { return !std::isspace(c); }));
+  s.erase(s.begin(), std::find_if(s.begin(), s.end(), not_isspace));
 }
 
 // trim from end (in place)
 void
 rtrim(std::string &s)
 {
-  s.erase(std::find_if(s.rbegin(), s.rend(),
-                       [](unsigned char c) { return !std::isspace(c); 
}).base(), s.end());
+  s.erase(std::find_if(s.rbegin(), s.rend(), not_isspace).base(), s.end());
 }
 
 // trim from both ends (in place)


++++++ gcc12-c-compatibility-tweak-use-lambdas-instead-of-ptr_fun.patch ++++++
From: Jonathan Wakely <jwakely....@gmail.com>
Date: Tue, 18 Jan 2022 15:52:18 -0500
Subject: gcc12 c++ compatibility tweak: use lambdas instead of ptr_fun<>
Git-repo: git://sourceware.org/git/systemtap.git
Git-commit: 56c498d95c4749f15980da73b4933e7443b3f26c
References: bsc#1196583

Even while stap is a c++11 code base, such cleanups make code
nicer to look at.

Signed-off-by: Tony Jones <to...@suse.de>
---
 util.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util.cxx b/util.cxx
index c20f76003..e9286eca3 100644
--- a/util.cxx
+++ b/util.cxx
@@ -1763,7 +1763,7 @@ ltrim(std::string &s)
 {
   s.erase(s.begin(),
          std::find_if(s.begin(), s.end(),
-                      std::not1(std::ptr_fun<int, int>(std::isspace))));
+                       [](unsigned char c) { return !std::isspace(c); }));
 }
 
 // trim from end (in place)
@@ -1771,7 +1771,7 @@ void
 rtrim(std::string &s)
 {
   s.erase(std::find_if(s.rbegin(), s.rend(),
-         std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
+                       [](unsigned char c) { return !std::isspace(c); 
}).base(), s.end());
 }
 
 // trim from both ends (in place)


++++++ gcc12-warning-suppression.patch ++++++
From: "Frank Ch. Eigler" <f...@redhat.com>
Date: Thu, 24 Feb 2022 20:05:41 -0500
Subject: gcc12 warning suppression
Git-repo: git://sourceware.org/git/systemtap.git
Git-commit: 1549784e9c71e5bf80860d314e15e6019f899de4
References: bsc#1196583

The translator emits a pair of type declarations that alternate
between a char[] and a char*, depending on the size of strings
involved.  The polymorphic client code includes pointer null-checking,
which -Waddress code rejects for the char[] case.  The simplest
workaround is just to disable that particular diagnostic.

Signed-off-by: Tony Jones <to...@suse.de>
---
 buildrun.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/buildrun.cxx b/buildrun.cxx
index 70ccfc30e..492f6bc47 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -604,6 +604,9 @@ compile_pass (systemtap_session& s)
 
   // Suppress gcc12 diagnostic bug in kernel-devel for 5.16ish
   o << "EXTRA_CFLAGS += -Wno-infinite-recursion" << endl;
+
+  // Suppress gcc12 diagnostic about STAP_KPROBE_PROBE_STR_* null checks
+  o << "EXTRA_CFLAGS += -Wno-address" << endl;
   
   // PR25845: Recent gcc (seen on 9.3.1) warns fairly common 32-bit 
pointer-conversions:
   o << "EXTRA_CFLAGS += $(call cc-option,-Wno-pointer-to-int-cast)" << endl;

Reply via email to