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]

Re: Top-of-tree GCC/glibc build problem


On 10/7/19 10:05 AM, Florian Weimer wrote:
* Steve Ellcey:

Looks like we have another new warning that is blocking top-of-tree glibc
from being built with top-of-tree gcc.  Would using 'cp[0]' instead of '*cp'
be the right fix here?

Steve Ellcey
sellcey@marvell.com


zic.c: In function ‘inzsub’:
zic.c:1369:23: error: writing 8 bytes into a region of size 1 [-Werror=stringop-overflow=]
  1369 |  z.z_format_specifier = cp ? *cp : '\0';
       |  ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
zic.c:124:8: note: destination object declared here
   124 |  char  z_format_specifier;
       |        ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
../o-iterator.mk:9: recipe for target '/home/sellcey/tot/obj-glibc/timezone/zic.o' failed

This looks like a GCC bug to me.  The code is okay: no aliases,
zero-length arrays, or anything like that.  The store has size 1, too.

Is it possible that the stringop-overflow diagnostic pass runs after
some sort of store-merging pass?  In this case, many of the diagnostics
would need to be suppressed.

It's a bug introduced in last week's change to the warning.  Jeff's
build bot caught it over the weekend.  I should have a fix soon.

Martin


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