Bug 1220464 - GCC 14: elfutils package fails
Summary: GCC 14: elfutils package fails
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Matz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc14
  Show dependency treegraph
 
Reported: 2024-02-27 14:29 UTC by Michal Jireš
Modified: 2024-04-10 06:13 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
matz: needinfo? (michal.jires)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jireš 2024-02-27 14:29:10 UTC
Building elfutils with GCC 14 fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/elfutils/standard/x86_64

Due to:
elfstrmerge.c: In function ‘main’:
elfstrmerge.c:450:32: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  450 |   newscnbufs = calloc (sizeof (void *), newshnums);
      |                                ^~~~
elfstrmerge.c:450:32: note: earlier argument should specify number of elements, later size of each element


Builds with:

Index: elfutils-0.190/tests/elfstrmerge.c
===================================================================
--- elfutils-0.190.orig/tests/elfstrmerge.c
+++ elfutils-0.190/tests/elfstrmerge.c
@@ -447,7 +447,7 @@ main (int argc, char **argv)
     }

   newshnums = shdrnum - 1;
-  newscnbufs = calloc (sizeof (void *), newshnums);
+  newscnbufs = calloc (newshnums, sizeof (void *));
   if (newscnbufs == NULL)
     fail_errno ("Couldn't allocate memory for new section buffers", NULL);
Comment 1 Michael Matz 2024-02-29 15:23:42 UTC
Please make a submit request with the quoted change.  Thanks.
Comment 2 OBSbugzilla Bot 2024-03-17 19:35:02 UTC
This is an autogenerated message for OBS integration:
This bug (1220464) was mentioned in
https://build.opensuse.org/request/show/1158795 Factory / elfutils
Comment 3 Richard Biener 2024-04-10 06:13:07 UTC
A fix was merged.