This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Build issue with latest (prerelease 7.0) GCC


I just built the latest glibc with the latest (pre-release) GCC 7.0 and
got this build failure:

../sysdeps/posix/tempname.c: In function ‘__path_search’:
../sysdeps/posix/tempname.c:169:24: error: ‘%.*s’ directive output between 0 and
 5 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-
overflow=]
   sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
                        ^~~~
../sysdeps/posix/tempname.c: In function ‘__path_search’:
../sysdeps/posix/tempname.c:169:24: error: ‘%.*s’ directive output between 0 and
 5 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-
overflow=]
   sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
                        ^~~~
cc1: all warnings being treated as errors


I am not sure if we want a DIAG_PUSH_NEEDS_COMMENT here or if there is
a way to fix the code but I thought I would at least raise the issue
and see if we want to do anything before the code freeze.  I think the
problem only happens with 32 bit builds.  I did not see it in my 64 bit
build.

Steve Ellcey
sellcey@cavium.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]