[Bug 1221706] New: GCC 14: systemtap package fails
https://bugzilla.suse.com/show_bug.cgi?id=1221706 Bug ID: 1221706 Summary: GCC 14: systemtap package fails Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: screening-team-bugs@suse.de Reporter: michal.jires@suse.com QA Contact: qa-bugs@suse.de CC: tonyj@suse.com Blocks: 1220574 Target Milestone: --- Found By: --- Blocker: --- Building systemtap with GCC 14 fails here: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:G... Due to: bpf-translate.cxx: In function ‘bpf::BPF_Section* bpf::output_probe(BPF_Output&, program&, const std::string&, unsigned int)’: bpf-translate.cxx:5044:39: error: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 5044 | bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns); | ^~~~~~~~~~~~~~~~ bpf-translate.cxx:5044:39: note: earlier argument should specify number of elements, later size of each element bpf-translate.cxx:5046:41: error: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 5046 | Elf64_Rel *rel = (Elf64_Rel*) calloc (sizeof(Elf64_Rel), nreloc); | ^~~~~~~~~~~~~~~~~ bpf-translate.cxx:5046:41: note: earlier argument should specify number of elements, later size of each element staprun.c: In function ‘main’: staprun.c:550:50: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 550 | char ** new_argv = calloc(sizeof(char *),argc+2); | ^~~~ staprun.c:550:50: note: earlier argument should specify number of elements, later size of each element Builds with automatically generated: Index: systemtap-5.0/bpf-translate.cxx =================================================================== --- systemtap-5.0.orig/bpf-translate.cxx +++ systemtap-5.0/bpf-translate.cxx @@ -5041,9 +5041,9 @@ output_probe(BPF_Output &eo, program &pr } } - bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns); + bpf_insn *buf = (bpf_insn*) calloc (ninsns, sizeof(bpf_insn)); assert (buf); - Elf64_Rel *rel = (Elf64_Rel*) calloc (sizeof(Elf64_Rel), nreloc); + Elf64_Rel *rel = (Elf64_Rel*) calloc (nreloc, sizeof(Elf64_Rel)); assert (rel); unsigned i = 0, r = 0; Index: systemtap-5.0/staprun/staprun.c =================================================================== --- systemtap-5.0.orig/staprun/staprun.c +++ systemtap-5.0/staprun/staprun.c @@ -547,7 +547,7 @@ int main(int argc, char **argv) us to extend argv[], with all the C fun that entails. */ #ifdef HAVE_OPENAT if (relay_basedir_fd >= 0) { - char ** new_argv = calloc(sizeof(char *),argc+2); + char ** new_argv = calloc(argc+2,sizeof(char *)); const int new_Foption_size = 10; /* -FNNNNN */ char * new_Foption = malloc(new_Foption_size); int i; -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1221706 Chenzi Cao <chcao@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |tonyj@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1221706 https://bugzilla.suse.com/show_bug.cgi?id=1221706#c1 --- Comment #1 from Tony Jones <tonyj@suse.com> --- I fixed the gcc build issue yesterday but during testing I noticed current systemtap in openSUSE-release-20240326-2824.1 appears to be broken on even the most basic "hello world". I'm on vacation today&tomorrow but I was going to look at this over the weekend when I'm back. If you need the build issue fixed before then changes are in: home:jones_tony:branches:devel:tools/systemtap (see systemtap.changes) -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1221706 https://bugzilla.suse.com/show_bug.cgi?id=1221706#c2 Tony Jones <tonyj@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Tony Jones <tonyj@suse.com> --- Fix pushed. Runtime errors resolved via bsc#1222249 -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com