public inbox for libc-locales@sourceware.org
 help / color / mirror / Atom feed
* [Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error)
@ 2019-08-29 18:59 sje at gcc dot gnu.org
  2019-09-03 12:57 ` [Bug localedata/24950] " cvs-commit at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sje at gcc dot gnu.org @ 2019-08-29 18:59 UTC (permalink / raw)
  To: libc-locales

https://sourceware.org/bugzilla/show_bug.cgi?id=24950

            Bug ID: 24950
           Summary: Top-of-tree glibc does not build with top-of-tree GCC
                    (stringop-overflow error)
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
          Assignee: unassigned at sourceware dot org
          Reporter: sje at gcc dot gnu.org
                CC: libc-locales at sourceware dot org
  Target Milestone: ---

This bug is discussed at
https://sourceware.org/ml/libc-alpha/2019-08/msg00774.html.  The GCC folks
think that the Glibc sources should be changed to avoid this warning/error.


From email string:

I am building the latest glibc with the latest GCC and getting an error.
I see where, in locale/programs/charmap.h we declare bytes as a zero
length array in charseq but I am not sure where the write in
locale/programs/ld-ctype.c is.  The only line references that GCC seems
to be outputing refer to the declaration.


cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
In file included from programs/repertoire.h:24,
                 from programs/localedef.h:32,
                 from programs/ld-ctype.c:35:
programs/charmap.h:63:17: note: destination object declared here
   63 |   unsigned char bytes[0];
      |                 ^~~~~
cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
programs/charmap.h:63:17: note: destination object declared here
cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
programs/charmap.h:63:17: note: destination object declared here
cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
programs/charmap.h:63:17: note: destination object declared here
cc1: all warnings being treated as errors
../o-iterator.mk:9: recipe for target '/home/sellcey/tot/obj/glibc64/locale/ld-
ctype.o' failed
make[2]: *** [/home/sellcey/tot/obj/glibc64/locale/ld-ctype.o] Error 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/24950] Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error)
  2019-08-29 18:59 [Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error) sje at gcc dot gnu.org
@ 2019-09-03 12:57 ` cvs-commit at gcc dot gnu.org
  2019-09-03 13:00 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2019-09-03 12:57 UTC (permalink / raw)
  To: libc-locales

https://sourceware.org/bugzilla/show_bug.cgi?id=24950

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1471fa556afb428c4a4c46cf5543a4101d5bcf91

commit 1471fa556afb428c4a4c46cf5543a4101d5bcf91
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Sep 3 14:01:39 2019 +0200

    localedef: Use initializer for flexible array member [BZ #24950]

    struct charseq used a zero-length array instead of a flexible array
    member.  This required a strange construct to initialize struct
    charseq objects, and GCC 10 warns about that:

    cc1: error: writing 1 byte into a region of size 0
[-Werror=stringop-overflow=]
    In file included from programs/repertoire.h:24,
                     from programs/localedef.h:32,
                     from programs/ld-ctype.c:35:
    programs/charmap.h:63:17: note: destination object declared here
       63 |   unsigned char bytes[0];
          |                 ^~~~~
    cc1: error: writing 1 byte into a region of size 0
[-Werror=stringop-overflow=]
    programs/charmap.h:63:17: note: destination object declared here
    cc1: error: writing 1 byte into a region of size 0
[-Werror=stringop-overflow=]
    programs/charmap.h:63:17: note: destination object declared here
    cc1: error: writing 1 byte into a region of size 0
[-Werror=stringop-overflow=]
    programs/charmap.h:63:17: note: destination object declared here

    The change makes the object physically const, but it is not expected
    to be modified.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/24950] Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error)
  2019-08-29 18:59 [Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error) sje at gcc dot gnu.org
  2019-09-03 12:57 ` [Bug localedata/24950] " cvs-commit at gcc dot gnu.org
@ 2019-09-03 13:00 ` fweimer at redhat dot com
  2019-09-03 13:01 ` fweimer at redhat dot com
  2019-09-03 13:01 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2019-09-03 13:00 UTC (permalink / raw)
  To: libc-locales

https://sourceware.org/bugzilla/show_bug.cgi?id=24950

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
   Target Milestone|---                         |2.30

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed in glibc 2.31.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/24950] Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error)
  2019-08-29 18:59 [Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error) sje at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2019-09-03 13:01 ` fweimer at redhat dot com
@ 2019-09-03 13:01 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2019-09-03 13:01 UTC (permalink / raw)
  To: libc-locales

https://sourceware.org/bugzilla/show_bug.cgi?id=24950

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|2.30                        |2.31

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/24950] Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error)
  2019-08-29 18:59 [Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error) sje at gcc dot gnu.org
  2019-09-03 12:57 ` [Bug localedata/24950] " cvs-commit at gcc dot gnu.org
  2019-09-03 13:00 ` fweimer at redhat dot com
@ 2019-09-03 13:01 ` fweimer at redhat dot com
  2019-09-03 13:01 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2019-09-03 13:01 UTC (permalink / raw)
  To: libc-locales

https://sourceware.org/bugzilla/show_bug.cgi?id=24950

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-03 13:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 18:59 [Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error) sje at gcc dot gnu.org
2019-09-03 12:57 ` [Bug localedata/24950] " cvs-commit at gcc dot gnu.org
2019-09-03 13:00 ` fweimer at redhat dot com
2019-09-03 13:01 ` fweimer at redhat dot com
2019-09-03 13:01 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).