Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634338 - app-emulation/xen-tools fails to compile with gcc 7
Summary: app-emulation/xen-tools fails to compile with gcc 7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-7
  Show dependency tree
 
Reported: 2017-10-15 14:31 UTC by Linus Lotz
Modified: 2017-10-17 07:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.log,7.91 KB, text/plain)
2017-10-15 14:31 UTC, Linus Lotz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Linus Lotz 2017-10-15 14:31:44 UTC
Created attachment 498766 [details]
emerge --info

The compilation fails with the following error:
xenlockprof.c: In function ‘main’:
xenlockprof.c:100:53: error: ‘%s’ directive writing up to 39 bytes into a region of size between 17 and 37 [-Werror=format-overflow=]
             sprintf(name, "unknown type(%d) %d lock %s", data[j].type,
                                                     ^~
In file included from /usr/include/stdio.h:936:0,
                 from /var/tmp/portage/app-emulation/xen-tools-4.8.2-r1/work/xen-4.8.2/tools/misc/../../tools/libxc/include/xenctrl.h:33,
                 from xenlockprof.c:13:
/usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 24 and 83 bytes into a destination of size 60
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


There exists a patch for this error:
https://patchwork.kernel.org/patch/9662249/
Comment 1 Tomáš Mózes 2017-10-16 12:34:56 UTC
https://github.com/gentoo/gentoo/pull/5962
Comment 2 Tomáš Mózes 2017-10-17 07:33:58 UTC
https://github.com/gentoo/gentoo/commit/6b9ff912c8bc4db4d4cafe3d72e5803904391725

Thanks for reporting.