Bug 1225933

Summary: Systemtap flavor systemtap-docs fails to build with gcc14 because of -Werror=calloc-transposed-args
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Jambor <mjambor>
Component: DevelopmentAssignee: Tony Jones <tonyj>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: tonyj
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://bugzilla.opensuse.org/show_bug.cgi?id=1221706
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1220574    

Description Martin Jambor 2024-06-04 12:45:45 UTC
System tap flavor systemtap-docs fails to build with gcc 14 because of
a warning-turned-error about transposed calloc arguments.  To try it
locally, run:

  osc build -M systemtap-docs --clean --alternative-project home:rguenther:nextgcc standard

And after a while it will fail with something like: 

[  270s] bpf-translate.cxx: In function ‘bpf::BPF_Section* bpf::output_probe(BPF_Output&, program&, const std::string&, unsigned int)’:
[  270s] 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]
[  270s]  5044 |   bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns);
[  270s]       |                                       ^~~~~~~~~~~~~~~~
[  270s] bpf-translate.cxx:5044:39: note: earlier argument should specify number of elements, later size of each element
[  270s] 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]
[  270s]  5046 |   Elf64_Rel *rel = (Elf64_Rel*) calloc (sizeof(Elf64_Rel), nreloc);
[  270s]       |                                         ^~~~~~~~~~~~~~~~~
[  270s] bpf-translate.cxx:5046:41: note: earlier argument should specify number of elements, later size of each element
Comment 1 Tony Jones 2024-06-18 17:50:21 UTC
Appears solved as side-effect of v5.1 update