emacs-devel
[Top][All Lists]
Advanced

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

Re: scratch/igc warning


From: Andrea Corallo
Subject: Re: scratch/igc warning
Date: Wed, 26 Jun 2024 10:43:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Pip Cet <pipcet@protonmail.com> writes:

> On Wednesday, June 26th, 2024 at 14:08, Andrea Corallo <acorallo@gnu.org> 
> wrote:
>
>> GCC 12.3 is giving me this warning building scratch/igc:
>> 
>> ========
>> CC xfaces.o
>> In file included from /usr/include/string.h:535,
>> from ../lib/string.h:41,
>> from lisp.h:29,
>> from xfaces.c:226:
>> In function ‘memset’,
>> inlined from ‘make_realized_face’ at xfaces.c:4581:3,
>> inlined from ‘realize_gui_face’ at xfaces.c:6214:10,
>> inlined from ‘realize_face’ at xfaces.c:6124:12:
>> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: 
>> ‘__builtin_memset’ offset [164, 303] from the object at ‘face’ is out of the 
>> bounds of referenced subobject ‘id’ with type ‘int’ at offset 160 
>> [-Warray-bounds]
>> 59 | return __builtin___memset_chk (__dest, __ch, __len,
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 60 | __glibc_objsize0 (__dest));
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from termhooks.h:27,
>> from frame.h:22,
>> from xfaces.c:229:
>> dispextern.h: In function ‘realize_face’:
>> dispextern.h:1730:7: note: subobject ‘id’ declared here
>> 1730 | int id;
>> | ^~
>> In function ‘memset’,
>> inlined from ‘make_realized_face’ at xfaces.c:4581:3,
>> inlined from ‘realize_tty_face’ at xfaces.c:6641:10,
>> inlined from ‘realize_face’ at xfaces.c:6126:12:
>> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: 
>> ‘__builtin_memset’ offset [164, 303] from the object at ‘face’ is out of the 
>> bounds of referenced subobject ‘id’ with type ‘int’ at offset 160 
>> [-Warray-bounds]
>> 59 | return __builtin___memset_chk (__dest, __ch, __len,
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 60 | __glibc_objsize0 (__dest));
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> dispextern.h: In function ‘realize_face’:
>> dispextern.h:1730:7: note: subobject ‘id’ declared here
>> 1730 | int id;
>> | ^~
>> In function ‘memset’,
>> inlined from ‘make_realized_face’ at xfaces.c:4581:3,
>> inlined from ‘realize_face’ at xfaces.c:6130:14:
>> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: 
>> ‘__builtin_memset’ offset [164, 303] from the object at ‘face’ is out of the 
>> bounds of referenced subobject ‘id’ with type ‘int’ at offset 160 
>> [-Warray-bounds]
>> 59 | return __builtin___memset_chk (__dest, __ch, __len,
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 60 | __glibc_objsize0 (__dest));
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> dispextern.h: In function ‘realize_face’:
>> dispextern.h:1730:7: note: subobject ‘id’ declared here
>> 1730 | int id;
>> | ^~
>> ========
>> 
>> ATM don't know if it's a real issue or a false positive so I thought was
>> worth mentioning.
>
> Something in between: the code is trying to clear a struct partially by 
> memsetting starting from a given offset to the end of the struct. However, 
> it's not specific to the igc branch.

I believe it is, I don't see it in my other builds.

  Andrea



reply via email to

[Prev in Thread] Current Thread [Next in Thread]