From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: scratch/igc warning Date: Wed, 26 Jun 2024 10:43:27 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20361"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, Gerd =?utf-8?Q?M=C3=B6llmann?= To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 26 16:43:57 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sMTsJ-0004zl-JV for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jun 2024 16:43:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMTru-00054L-O3; Wed, 26 Jun 2024 10:43:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMTrs-000543-PB for emacs-devel@gnu.org; Wed, 26 Jun 2024 10:43:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMTrs-0003my-Gu; Wed, 26 Jun 2024 10:43:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=EdJtvUp/CMs/A583ZhDSp2W0YOCc0OwygKe+iOSxwws=; b=F4bj9MC0mvOTZfZf5WDZ rGSRg//Y1MBnpn1FEC8TtYIERMyunSXAyYfkDLfgG5Dy5NZW2BMd9T1aya+gvgGyqUpdRsqxu1tVA o8NV/o+Le7kmVScGWmRKiENZZR5FfILVo9zlhgAWnuyovSukFEevNO44Kc+MVkw1MfBAk8DSu+g2T 5eOIn/XKr/7bCwngo+8XsP3lM9NNfIwZmM7Cv1/Or36gTdluDkXDjGoejBwYkF5T/hWXA/G/b6mPz 9AobfnSSegqx80uiTdauC9pL2smDwzfffqEHHj4trKQsNipzMT/yfy6B4nnK2Jc3dqs+TDFChZYoF DV0KCSgJ9uyYFA==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sMTrs-0002KC-37; Wed, 26 Jun 2024 10:43:28 -0400 In-Reply-To: (Pip Cet's message of "Wed, 26 Jun 2024 14:31:06 +0000") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320703 Archived-At: Pip Cet writes: > On Wednesday, June 26th, 2024 at 14:08, Andrea Corallo = wrote: > >> GCC 12.3 is giving me this warning building scratch/igc: >>=20 >> =3D=3D=3D=3D=3D=3D=3D=3D >> 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 =E2=80=98memset=E2=80=99, >> inlined from =E2=80=98make_realized_face=E2=80=99 at xfaces.c:4581:3, >> inlined from =E2=80=98realize_gui_face=E2=80=99 at xfaces.c:6214:10, >> inlined from =E2=80=98realize_face=E2=80=99 at xfaces.c:6124:12: >> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: = =E2=80=98__builtin_memset=E2=80=99 offset [164, 303] from the object at =E2= =80=98face=E2=80=99 is out of the bounds of referenced subobject =E2=80=98i= d=E2=80=99 with type =E2=80=98int=E2=80=99 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 =E2=80=98realize_face=E2=80=99: >> dispextern.h:1730:7: note: subobject =E2=80=98id=E2=80=99 declared here >> 1730 | int id; >> | ^~ >> In function =E2=80=98memset=E2=80=99, >> inlined from =E2=80=98make_realized_face=E2=80=99 at xfaces.c:4581:3, >> inlined from =E2=80=98realize_tty_face=E2=80=99 at xfaces.c:6641:10, >> inlined from =E2=80=98realize_face=E2=80=99 at xfaces.c:6126:12: >> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: = =E2=80=98__builtin_memset=E2=80=99 offset [164, 303] from the object at =E2= =80=98face=E2=80=99 is out of the bounds of referenced subobject =E2=80=98i= d=E2=80=99 with type =E2=80=98int=E2=80=99 at offset 160 [-Warray-bounds] >> 59 | return __builtin___memset_chk (__dest, __ch, __len, >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> 60 | __glibc_objsize0 (__dest)); >> | ~~~~~~~~~~~~~~~~~~~~~~~~~~ >> dispextern.h: In function =E2=80=98realize_face=E2=80=99: >> dispextern.h:1730:7: note: subobject =E2=80=98id=E2=80=99 declared here >> 1730 | int id; >> | ^~ >> In function =E2=80=98memset=E2=80=99, >> inlined from =E2=80=98make_realized_face=E2=80=99 at xfaces.c:4581:3, >> inlined from =E2=80=98realize_face=E2=80=99 at xfaces.c:6130:14: >> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: warning: = =E2=80=98__builtin_memset=E2=80=99 offset [164, 303] from the object at =E2= =80=98face=E2=80=99 is out of the bounds of referenced subobject =E2=80=98i= d=E2=80=99 with type =E2=80=98int=E2=80=99 at offset 160 [-Warray-bounds] >> 59 | return __builtin___memset_chk (__dest, __ch, __len, >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> 60 | __glibc_objsize0 (__dest)); >> | ~~~~~~~~~~~~~~~~~~~~~~~~~~ >> dispextern.h: In function =E2=80=98realize_face=E2=80=99: >> dispextern.h:1730:7: note: subobject =E2=80=98id=E2=80=99 declared here >> 1730 | int id; >> | ^~ >> =3D=3D=3D=3D=3D=3D=3D=3D >>=20 >> 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 m= emsetting starting from a given offset to the end of the struct. However, i= t's not specific to the igc branch. I believe it is, I don't see it in my other builds. Andrea