Bug 1225933 - Systemtap flavor systemtap-docs fails to build with gcc14 because of -Werror=calloc-transposed-args
Summary: Systemtap flavor systemtap-docs fails to build with gcc14 because of -Werror=...
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Tony Jones
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc14
  Show dependency treegraph
 
Reported: 2024-06-04 12:45 UTC by Martin Jambor
Modified: 2024-06-18 17:50 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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