From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hDKpHy2N+Wj+vAMAWB0awg (envelope-from ) for ; Wed, 22 Oct 2025 22:04:29 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TSjcHgWj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6E3E81E057; Wed, 22 Oct 2025 22:04:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EB9B31E057 for ; Wed, 22 Oct 2025 22:04:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 562023858422 for ; Thu, 23 Oct 2025 02:04:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 562023858422 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TSjcHgWj Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 0CD713858416 for ; Thu, 23 Oct 2025 02:03:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CD713858416 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0CD713858416 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761185026; cv=none; b=u6wHAcPf8H1i77tWdlZOt1ZKi2/r/wZbL9Kb3WtR/arAz4wiyAIfJzAWxAFmHLukB/0jchmXSfMvTuMzwSDjII0cu74J/jrxdzwT29cf2pTlFTJ1ZVdygCDa7yU3pr/WhHJ/lbl/7ppZtqupjYwvsj12QmCVi5hBg8eWdOvNems= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761185026; c=relaxed/simple; bh=wcbsZd0ABOf5nZ0Cxi3VdVLW3g0HH5wXhDAwpNOG0hQ=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=oIwmEGoPesp/jedI6k2EuI6mOZEI8uLxaVgEsJt6Jvchd1dEFCGCjc5Wd5ynGieN/xMQaQIj5tiuZ/2+OaXgNGbztUBFpmQ+mLw9+8Q/LRQJUM/8z8W0mXFTsFWskwtKSwHmC8HhWgu2PQbvYZ12XBWlQCfY4ynepb4bAsxLLDE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CD713858416 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-28a5b8b12a1so2641625ad.0 for ; Wed, 22 Oct 2025 19:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761185025; x=1761789825; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VMuBCXBPrKFLFnw3GseLOKhxsFwAos7HJyv7HQhUJwQ=; b=TSjcHgWj5mnvq96z0WEcpxYGj4DoXRWhptIYZ8ZsnHfUN9xpMORxWYiqMp+z6efSlc pV7RKDhJFb5mDX+oNoMZzNK0cSRVcI5fU+7sjXqu585/aj2xkxRECZYTci6E5uTkGwrJ qvTIsRc7macRLUtK25v3M48f2bcaZMCMjwIqdPv0bAteRBE5jgbeRKaUcX2tYeOzzEYP ljipymu35xYvNVsg02xfZj8iQvzKgZzrSzAwDjBkPo8GAtacBZ01T4bGVIM4ONOHGPjV rWUMs5Yu1id44fbL/QnmND5Oi/G0dFmgj2uZnQzvHdEudo8cypjbs0H4t4FjoijALvYn FZ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761185025; x=1761789825; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VMuBCXBPrKFLFnw3GseLOKhxsFwAos7HJyv7HQhUJwQ=; b=cg/uIKvl2yMeBl3SMvl+xdj/wY5HqgldscLRpgoJMHEtAjyZ4ikDNuyKOLBG2xp/vo swVucAykpIciPL1icz6Nph35h8KfNFoxVlSH2Uo4FFKMnp/eZdyaeuCwi9iAawQTvGRG cK9KE+XNmxHMB4hly2VV3+NOkKqF72X7UaXv3zV3ipnIiUfFmTkoDOSPXhXfadymLzMG Oymekx6JlbN/Z8GKhvzMNEapejqPy7gH03PL/p67jEBmSNEsmAciAYKS6BDegC1ekE4/ 1GJTe4AF0LmN0mpRsVBitDc0phh7If0il6A8GC/koQUyr4MNaYwHaTKAcWA8fhf1nW9V JBjg== X-Forwarded-Encrypted: i=1; AJvYcCUHUf6Z9t48UKLHECdvb+mFEANyUAMB7vzLmroJZjXa+4M8vISFZvuhfVf/In220Jq8YURy8NunD0GWMw==@sourceware.org X-Gm-Message-State: AOJu0Yx+XLnIkurAHV+JfCuwvNZ86Dd0F7R6sKEmwxPpmoEBTy2kW6sf gp70hYXejs5jDMov80ODBBgjL2M6RRbr3Y1otM9dMvSvW7cXjzqrwdb7j0TQwxuGNMxkrgrcZwb uaMXLfsaIQ/DOhlsQ4Ichlnuo+GaYtaM= X-Gm-Gg: ASbGncvfKVvveHc7bdgeGtlNktiCqic5Ir7MNmrDcbgPtEbkUbKWikOvduBflaPzAPP e0RXBwqBNVQiFOcVWcMyKSoKzrgTMVi9sw9+5khuz5e6qs4rf11ACpQxVwY4Fdgb/H6DTdsBTPq SOVWdsaqoWFeZlrTxyugER5k1xHXj9Wv5xYljEAn/T22OsXGlWjFJG0kwDp4jXSTp6WuQVp6D1h BSSkVrW8c9gnOKv5UE4+To4x3syDXE0laDAFToeFlR+z79igekYUxi3t3w= X-Google-Smtp-Source: AGHT+IGgyRwwM0RjraDznxFGb3dyBbj+H4/vFw3HXB53N45LmyIZjFr20IaGCxyTLOUvTTVCA+01jgzKb9pHFNC/bPU= X-Received: by 2002:a17:902:ce0f:b0:269:8d1b:40c3 with SMTP id d9443c01a7336-290c9cf344bmr289547755ad.12.1761185024927; Wed, 22 Oct 2025 19:03:44 -0700 (PDT) MIME-Version: 1.0 References: <20251020152853.28195-1-guinevere@redhat.com> <790ea269-165e-4625-8fda-b6e70d260d73@gmail.com> <87347bm6c5.fsf@tromey.com> <27fc25e3-4c19-40cd-b9ce-a87da0fa0dff@gmail.com> In-Reply-To: <27fc25e3-4c19-40cd-b9ce-a87da0fa0dff@gmail.com> From: Andrew Pinski Date: Wed, 22 Oct 2025 19:03:33 -0700 X-Gm-Features: AS18NWABxN8WCwHsS4QPAZ-8acNBjxbQ4MIMj8dmbzvMw_jGyya1pWKeeFKoOJE Message-ID: Subject: Re: [PATCH v2 0/8] Remove stabs support from GDB To: Luis Cc: Guinevere Larsen , Tom Tromey , gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Wed, Oct 22, 2025 at 5:59=E2=80=AFPM Luis = wrote: > > On 22/10/2025 20:19, Luis wrote: > > Hi, > > > > On Wed, Oct 22, 2025, 14:19 Guinevere Larsen > > wrote: > > > > On 10/22/25 10:08 AM, Tom Tromey wrote: > > >>>>>> "Luis" =3D=3D Luis > > writes: > > > Luis> Looks like gcc (13.3.0 at least) is a bit grumpy with this > > and there > > > Luis> are a few -Werror=3Darray-bounds=3D warnings stopping the = build, > > > Luis> apparently from changes to gdb/xcoffread.c. > > > > > > Could you post them here? > > > > > > IIRC some versions of GCC issued these kinds of errors incorrect= ly. > > > So it's possible the fix might be just to disable the warning fo= r > > that build. > > > > > > Tom > > > > > I believe that is the case, since I just installed gcc-13.3.1-2 fro= m > > fedora 40 and upstream built fine, so I think either the .1 shame > > release (see pride versioning: https://pridever.org/ > pridever.org/> :p), or some > > fedora patch, fixed a gcc bug related to that. > > > > > > Yeah, sorry for the poor report. It happened on a different machine > > unreachable from the one I sent the message. > > > > I'll reproduce it and paste the exact messages. I tried to make sense o= f > > it a bit, but seemed a bit odd. > > > > > > -- > > Cheers, > > Guinevere Larsen > > It/she > > > > Ok, I played with this a bit more and reproduced it again on my end. The > problem seems to be related to enabling ubsan in configure for the build. > > So if I configure with the following... > > ./configure --enable-targets=3Dall --with-python=3Dpython3 --without-guil= e > --enable-ubsan > > I get these errors... > > --- > > In file included from /usr/include/c++/13/vector:66, > from /usr/include/c++/13/functional:64, > from > ../../../repos/binutils-gdb/gdb/../gdbsupport/ptid.h:35, > from > ../../../repos/binutils-gdb/gdb/../gdbsupport/common-defs.h:212, > from ./../../../repos/binutils-gdb/gdb/defs.h:26, > from : > In member function =E2=80=98std::vector<_Tp, _Alloc>::reference std::vect= or<_Tp, > _Alloc>::operator[](size_type) [with _Tp =3D void*; _Alloc =3D > std::allocator]=E2=80=99, > inlined from =E2=80=98void* registry::get(unsigned int) [with T = =3D > objfile]=E2=80=99 at ../../../repos/binutils-gdb/gdb/registry.h:213:24, > inlined from =E2=80=98DATA* registry::key::get(T*)= const > [with DATA =3D xcoff_symfile_info; Deleter =3D > std::default_delete; T =3D objfile]=E2=80=99 at > ../../../repos/binutils-gdb/gdb/registry.h:111:36, > inlined from =E2=80=98void enter_line_range(subfile*, unsigned int, > unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:544:18: > /usr/include/c++/13/bits/stl_vector.h:1129:32: error: array subscript 0 > is outside array bounds of =E2=80=98registry [0]=E2=80=99 [-Werr= or=3Darray-bounds=3D] > 1129 | return *(this->_M_impl._M_start + __n); > | ~~~~~~~~~~~~~~^~~~~~~~ > In function =E2=80=98void enter_line_range(subfile*, unsigned int, unsign= ed int, > CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99: > cc1plus: note: source object is likely at address zero > In member function =E2=80=98std::vector<_Tp, _Alloc>::reference std::vect= or<_Tp, > _Alloc>::operator[](size_type) [with _Tp =3D void*; _Alloc =3D > std::allocator]=E2=80=99, > inlined from =E2=80=98void* registry::get(unsigned int) [with T = =3D > objfile]=E2=80=99 at ../../../repos/binutils-gdb/gdb/registry.h:213:24, > inlined from =E2=80=98DATA* registry::key::get(T*)= const > [with DATA =3D xcoff_symfile_info; Deleter =3D > std::default_delete; T =3D objfile]=E2=80=99 at > ../../../repos/binutils-gdb/gdb/registry.h:111:36, > inlined from =E2=80=98void enter_line_range(subfile*, unsigned int, > unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:544:18: > /usr/include/c++/13/bits/stl_vector.h:1129:32: error: array subscript 0 > is outside array bounds of =E2=80=98registry [0]=E2=80=99 [-Werr= or=3Darray-bounds=3D] > In function =E2=80=98void enter_line_range(subfile*, unsigned int, unsign= ed int, > CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99: > cc1plus: note: source object is likely at address zero > In member function =E2=80=98std::vector<_Tp, _Alloc>::reference std::vect= or<_Tp, > _Alloc>::operator[](size_type) [with _Tp =3D void*; _Alloc =3D > std::allocator]=E2=80=99, > inlined from =E2=80=98void* registry::get(unsigned int) [with T = =3D > objfile]=E2=80=99 at ../../../repos/binutils-gdb/gdb/registry.h:213:24, > inlined from =E2=80=98DATA* registry::key::get(T*)= const > [with DATA =3D xcoff_symfile_info; Deleter =3D > std::default_delete; T =3D objfile]=E2=80=99 at > ../../../repos/binutils-gdb/gdb/registry.h:111:36, > inlined from =E2=80=98void read_symbol(internal_syment*, int)=E2=80= =99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:612:38, > inlined from =E2=80=98CORE_ADDR read_symbol_nvalue(int)=E2=80=99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:635:15, > inlined from =E2=80=98void enter_line_range(subfile*, unsigned int, > unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:572:29: > /usr/include/c++/13/bits/stl_vector.h:1129:32: error: array subscript 0 > is outside array bounds of =E2=80=98registry [0]=E2=80=99 [-Werr= or=3Darray-bounds=3D] > 1129 | return *(this->_M_impl._M_start + __n); > | ~~~~~~~~~~~~~~^~~~~~~~ > In function =E2=80=98void enter_line_range(subfile*, unsigned int, unsign= ed int, > CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99: > cc1plus: note: source object is likely at address zero > In member function =E2=80=98std::vector<_Tp, _Alloc>::reference std::vect= or<_Tp, > _Alloc>::operator[](size_type) [with _Tp =3D void*; _Alloc =3D > std::allocator]=E2=80=99, > inlined from =E2=80=98void* registry::get(unsigned int) [with T = =3D > objfile]=E2=80=99 at ../../../repos/binutils-gdb/gdb/registry.h:213:24, > inlined from =E2=80=98DATA* registry::key::get(T*)= const > [with DATA =3D xcoff_symfile_info; Deleter =3D > std::default_delete; T =3D objfile]=E2=80=99 at > ../../../repos/binutils-gdb/gdb/registry.h:111:36, > inlined from =E2=80=98int read_symbol_lineno(int)=E2=80=99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:649:37, > inlined from =E2=80=98void enter_line_range(subfile*, unsigned int, > unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99 at > ../../../repos/binutils-gdb/gdb/xcoffread.c:582:36: > /usr/include/c++/13/bits/stl_vector.h:1129:32: error: array subscript 0 > is outside array bounds of =E2=80=98registry [0]=E2=80=99 [-Werr= or=3Darray-bounds=3D] > 1129 | return *(this->_M_impl._M_start + __n); > | ~~~~~~~~~~~~~~^~~~~~~~ > In function =E2=80=98void enter_line_range(subfile*, unsigned int, unsign= ed int, > CORE_ADDR, CORE_ADDR, unsigned int*)=E2=80=99: > cc1plus: note: source object is likely at address zero > > --- > > If I drop the --enable-ubsan from configure, then the build completes > just fine. > > Maybe not a show stopper, but would be nice to have working builds with > ubsan. Yes GCC warnings with -fsanitize=3Dundefined are known to be worse. This is documented at https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Instrumentation-Options.html#= index-fsanitize_003dundefined : ``` Note that sanitizers tend to increase the rate of false positive warnings, most notably those around -Wmaybe-uninitialized. We recommend against combining -Werror and [the use of] sanitizers. ``` Array bounds also have an increased amount of warnings too. Yes, this is an area where GCC should be better at handling this; we (GCC) have discussed this a few times but there is almost no consensus of what should happen next and nothing changes. Thanks, Andrew > > For reference, the system is using Mint 22.2, which might be equivalent > to Ubuntu 24.04.