public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Neal Gompa <ngompa@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rr] epel10.3: Add patch to fix build on GCC 12
Date: Tue, 10 Nov 2026 21:34:07 GMT	[thread overview]
Message-ID: <179434644772.1.4659023194840814699.rpms-rr-6f8b165f03fb@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rr
Branch : epel10.3
Commit : 6f8b165f03fb57d6f7dc5cc064cc2580b370d283
Author : Neal Gompa <ngompa@fedoraproject.org>
Date   : 2022-11-29T14:51:42-05:00
Stats  : +66/-5 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rr/c/6f8b165f03fb57d6f7dc5cc064cc2580b370d283?branch=epel10.3

Log:
Add patch to fix build on GCC 12

---
diff --git a/rr-ethtool-struct.patch b/rr-ethtool-struct.patch
new file mode 100644
index 0000000..b0b32bb
--- /dev/null
+++ b/rr-ethtool-struct.patch
@@ -0,0 +1,63 @@
+From 2979c60ef8bbf7c940afd90172ddc5d8863f766e Mon Sep 17 00:00:00 2001
+From: Robert O'Callahan <robert@ocallahan.org>
+Date: Thu, 25 Aug 2022 20:40:59 +1200
+Subject: [PATCH] Avoid creating a struct with elements after
+ ethtool_sset_info's variable-length-array.
+
+Resolves #3369
+---
+ src/record_syscall.cc | 27 +++++++++++++--------------
+ 1 file changed, 13 insertions(+), 14 deletions(-)
+
+diff --git a/src/record_syscall.cc b/src/record_syscall.cc
+index 2e4cdec35..48544e1df 100644
+--- a/src/record_syscall.cc
++++ b/src/record_syscall.cc
+@@ -1450,17 +1450,17 @@ template <typename Arch> void get_ethtool_gstrings_arch(RecordTask* t) {
+   AutoRemoteSyscalls remote(t);
+ 
+   // Do a ETHTOOL_GSSET_INFO to get the number of strings
+-  struct SingleStringSet {
+-    ethtool_sset_info et;
+-    uint32_t data;
+-  };
+-  SingleStringSet sss;
+-  sss.et.cmd = ETHTOOL_GSSET_INFO;
+-  sss.et.reserved = 0;
+-  sss.et.sset_mask = 1 << et_gstrings.string_set;
+-  AutoRestoreMem sss_mem(remote, &sss, sizeof(sss));
+-
+-  ifreq.ifr_ifru.ifru_data = sss_mem.get();
++  ethtool_sset_info et;
++  et.cmd = ETHTOOL_GSSET_INFO;
++  et.reserved = 0;
++  et.sset_mask = 1 << et_gstrings.string_set;
++  std::vector<uint8_t> buffer;
++  buffer.resize(sizeof(et) + sizeof(uint32_t));
++  memcpy(buffer.data(), &et, sizeof(et));
++  memset(buffer.data() + sizeof(et), 0, sizeof(uint32_t));
++  AutoRestoreMem et_mem(remote, buffer.data(), buffer.size());
++
++  ifreq.ifr_ifru.ifru_data = et_mem.get();
+   AutoRestoreMem ifr_mem(remote, &ifreq, sizeof(ifreq));
+ 
+   long ret = remote.syscall(regs.original_syscallno(), regs.arg1(),
+@@ -1470,8 +1470,7 @@ template <typename Arch> void get_ethtool_gstrings_arch(RecordTask* t) {
+     return;
+   }
+ 
+-  sss = t->read_mem(sss_mem.get().cast<SingleStringSet>());
+-
++  uint32_t data = t->read_mem((et_mem.get() + sizeof(et)).cast<uint32_t>());
+   // Now do the ETHTOOL_GSTRINGS call
+   ret = remote.syscall(regs.original_syscallno(), regs.arg1(), SIOCETHTOOL,
+       regs.arg3());
+@@ -1479,7 +1478,7 @@ template <typename Arch> void get_ethtool_gstrings_arch(RecordTask* t) {
+   if (ret < 0) {
+     return;
+   }
+-  t->record_remote(orig_gstrings, sizeof(ethtool_gstrings) + ETH_GSTRING_LEN*sss.data);
++  t->record_remote(orig_gstrings, sizeof(ethtool_gstrings) + ETH_GSTRING_LEN*data);
+ }
+ 
+ static void get_ethtool_gstrings(RecordTask* t) {

diff --git a/rr.spec b/rr.spec
index 38cb5f5..7466baa 100644
--- a/rr.spec
+++ b/rr.spec
@@ -25,9 +25,10 @@ Release:        %{baserelease}%{?dist}
 License:        MIT and CC0 and BSD
 URL:            http://rr-project.org
 
-Source: https://github.com/mozilla/rr/archive/%{gittag}/%{name}-%{version}.tar.gz
+Source: https://github.com/rr-debugger/rr/archive/%{gittag}/%{name}-%{version}.tar.gz
 Patch1: rr-mount.patch
 Patch2: rr-time.patch
+Patch3: rr-ethtool-struct.patch
 
 %if  0%{?rhel} == 7
 BuildRequires: cmake3
@@ -68,10 +69,7 @@ rr-testsuite includes compiled test binaries and other files
 which are used to test the functionality of rr.
  
 %prep
-%setup -q -n rr-%{gittag}
-
-%patch1 -p1 -b .mount
-%patch2 -p1 -b .time
+%autosetup -p1 -n rr-%{gittag}
 
 %build
 %if  0%{?rhel} == 7

                 reply	other threads:[~2026-11-10 21:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179434644772.1.4659023194840814699.rpms-rr-6f8b165f03fb@fedoraproject.org \
    --to=ngompa@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox