This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] bring -Warray-bounds closer to -Wstringop-overflow (PR91647, 91463, 91679)
- From: "Maciej W. Rozycki" <macro at wdc dot com>
- To: Jeff Law <law at redhat dot com>, Florian Weimer <fweimer at redhat dot com>
- Cc: Martin Sebor <msebor at gmail dot com>, libc-alpha at sourceware dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Nov 2019 00:02:17 +0000 (GMT)
- Subject: Re: [PATCH] bring -Warray-bounds closer to -Wstringop-overflow (PR91647, 91463, 91679)
- Ironport-sdr: 3BjDj5Fj+w1CdifTlr23HMZDC8pRvoeekkX2yPev46979ORzHo4rC9P2b1PklnnQuCckfiM1cl DifxPYTq4pQ7tRIYrzQVt5I40GXLXuyqluzbZBOl57zgP7ICAAtRnw3uTxCS4K5b2M01FUJmYb UX6ELILSOkCzMMuCKx3AEkIUZSLTpCTx+DKbLLZnvfdGyxCsH5W/DyygC2Tp01STNfcwdMnGY2 gtUR6w3uFpdoPWGuUyPVGDnvmv+57D6jv+U2jW0j/E0LaOK78yrN5J5uDX9kFNX7NsyozNoICd mFg=
- Ironport-sdr: gS5MAdp8ggMMvyBFwoBY1+hzYYrQ2dIA7Mr2BkGKf1Tkm+39Cftt9j+D6XIfr6mQT5aL9oKHxM RL31fsfIEXDmA4scvCETWvBUqXxKgDEz26qrdspvF8OpZBKdI4ms2/8QDOYTJt6iJUxkInLJYU vP/Opoku/xQNEVW6u5WRhFpXv+HCRNysFxDJsqB+HXiX9Oy3oGxRoDvQugihZdpTg4vNtaTFHT rCUozaaOKvnkBbBa3FRQkKksB0PFIBe+G0oL22g/kMr21HL0oxfIV+10RRHZarExV+/th15Ad6 EpxYyRi3Ywd0+pmLOLYDHicV
- Ironport-sdr: 6T8gw+aCWn3cMNHZTR6N+jdooRDF5IGHNuOeNlLescCrtATScuVDvhoBR2acpqXA+G1r5UrUgz n5RDOKBkNWjbNQalpnRlgDuI/om9LzRERvtiy7XMnUl93FMYO9WyCVb8+2YKLP+BiimAXaOn4v Q5Uj5BDl4SX3dqiWX/wnBOt45r9eO4eQ+i5Eagnn0krXH9DWjPaVzgn8H/CplG0khSC93ZS7ZN JlfpgixB00z5ulkvb9c/j41mgg++YV7VlqQ/BffzWzPWo/ALc0Prq96rGJGQfRhTDKuE7CoYGY MeE=
- References: <f80f84af-4f40-5af6-1b5f-88feafb589cc@gmail.com> <ee719686-3260-b20b-4732-95421f14ce27@redhat.com> <5573d108-2441-8d0f-6c60-514b4fd0db3e@gmail.com> <d44f680e-d3f5-ce9a-9632-b38a967ea7dc@redhat.com> <d5d3de75-de21-0a2e-ec0f-2de91d9c53f6@gmail.com> <alpine.LFD.2.21.1911062303130.13542@redsun52.ssa.fujisawa.hgst.com> <198f3ac9-3958-97c8-6c6f-1ce9bdbb1465@redhat.com>
- Wdcironportexception: Internal
On Wed, 6 Nov 2019, Jeff Law wrote:
> > It is what I believe has also broken glibc:
> >
> > In file included from ../sysdeps/riscv/libc-tls.c:19:
> > ../csu/libc-tls.c: In function '__libc_setup_tls':
> > ../csu/libc-tls.c:209:30: error: array subscript 1 is outside the bounds of an interior zero-length array 'struct dtv_slotinfo[0]' [-Werror=zero-length-bounds]
> > 209 | static_slotinfo.si.slotinfo[1].map = main_map;
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> > In file included from ../sysdeps/riscv/ldsodefs.h:46,
> > from ../sysdeps/gnu/ldsodefs.h:46,
> > from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
> > from ../sysdeps/unix/sysv/linux/riscv/ldsodefs.h:22,
> > from ../csu/libc-tls.c:21,
> > from ../sysdeps/riscv/libc-tls.c:19:
> > ../sysdeps/generic/ldsodefs.h:423:7: note: while referencing 'slotinfo'
> > 423 | } slotinfo[0];
> > | ^~~~~~~~
> > cc1: all warnings being treated as errors
> >
> > (here in a RISC-V build).
> >
> > Has anybody looked yet into how the breakage could possibly be addressed?
> Yea, Florian posted patches over the weekend to fix glibc. They're
> still going through the review/update cycle.
Thanks, I have found them now, now that I knew what to look for and in
what time frame.
Unfortunately there's no mention of the error message or at least the
name of the `-Wzero-length-bounds' option (which is how I found the GCC
patch) in the respective glibc change descriptions so my mailing list
searches returned nothing. I think it would be good to try and have
keywords potentially looked for in change descriptions, and verbatim error
messages are certainly good candidates IMO.
So I went for `-Wno-zero-length-bounds' for my glibc build for the time
being, as my objective now is to get some outstanding GCC stuff in before
stage 1 ends rather than being drawn into glibc build issues.
Maciej