Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gcc 12 question



On Thu, Nov 23, 2023 at 09:22:11AM +0000, Patrick Welche wrote:
> I'm trying to build a release on amd64 using
> 
> HAVE_MESA_VER=21
> HAVE_GCC=12
> 
> and get the following build error which I am puzzled by:
> 
>     inlined from 'r300_merge_textures_and_samplers' at /usr/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r300/r300_state_derived.c:823:17,
>     inlined from 'r300_update_derived_state' at /usr/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r300/r300_state_derived.c:1064:9:
> /usr/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r300/r300_state_derived.c:676:5: error: 'util_format_unswizzle_4f' reading 4 bytes from a region of size 0 [-Werror=stringop-overread]
>   676 |     util_format_unswizzle_4f(border_swizzled, border, desc->swizzle);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r300/r300_state_derived.c:676:5: note: referencing argument 3 of type 'const unsigned char[4]'
> In file included from /usr/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_pack_color.h:40,
>                  from /usr/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r300/r300_state_derived.c:28:
> /usr/xsrc/external/mit/MesaLib/dist/src/util/format/u_format.h: In function 'r300_update_derived_state':
> /usr/xsrc/external/mit/MesaLib/dist/src/util/format/u_format.h:1671:6: note: in a call to function 'util_format_unswizzle_4f'
>  1671 | void util_format_unswizzle_4f(float *dst, const float *src,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> desc is a const struct util_format_description *
> 
> util/format/u_format.h:226 defines the swizzle member of
> util_format_description as:
> 
> unsigned char swizzle[4];
> 
> and the truncated quote of util/format/u_format.h:1671 is
> 
> void util_format_unswizzle_4f(float *dst, const float *src,
>                               const unsigned char swz[4]);
> 
> so all is consistent.
> 
> error: 'util_format_unswizzle_4f' reading 4 bytes from a region of size 0 [-Werror=stringop-overread]
> 
> Assuming "a region" is the 3rd argument, then how can the size of an
> unsigned char[4] be zero?
> 
> Puzzled...

Seems others were puzzled too:

https://gcc.gnu.org/bugzilla//show_bug.cgi?id=109716


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index