From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DlKNIeN9+WgEqgMAWB0awg (envelope-from ) for ; Wed, 22 Oct 2025 20:59:15 -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=NiFat0YP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7A93A1E057; Wed, 22 Oct 2025 20:59:15 -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 E11941E057 for ; Wed, 22 Oct 2025 20:59:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F38B385841D for ; Thu, 23 Oct 2025 00:59:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F38B385841D 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=NiFat0YP Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 5611A3858419 for ; Thu, 23 Oct 2025 00:58:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5611A3858419 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 5611A3858419 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761181107; cv=none; b=RXPa5lQdGq5AyuWMwEZ7dbnPXKA0tg8lduxzXVSXBSo6SrWYFrVN3qIWlQqPMpEL0o3n/jL+9lE7tZDUrhxvnf0AfATcL1OmL3ylYfNgSsyN95l5PKCiO3dydinqaUhi0OFTd8fPckYEWrVx67hvJJuH3QcH2fcMiK1zsSAcbrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761181107; c=relaxed/simple; bh=zkixep+jUUompJZCqBNjvvYR8tK4TFLxnOTDEREpmJY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=oYhJ9g1gA4yZrIhy+seYbg1mbvLPwUj5z8JfkWnYop4jxVJmj+LWe4YCkhQQ2phQSsa4rqVCew9T8cFU8m+VINAfICM95jePP8I9Zs31vsx68dKqT1cluTbj4inXZj/BU2bDRFTVttflNkoj9iX8KTHHOxfMp62Y6JkzIX+4yLo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5611A3858419 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-475c696ab23so849965e9.1 for ; Wed, 22 Oct 2025 17:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761181106; x=1761785906; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=eF5szRINfDQPcdZDPA/ySgDDGK3O+2nlJW8awESn4LA=; b=NiFat0YPy1PXoKfiAy82Z5jKSbZgAOFjQvfSlES+/2JID84w/fJTOjzqg5KutHYKxd Hz76/KB0NyYnctPeXGiFM8zfsRHKcEPHlAX6tDHEsksUxzb6aYr/gQnfvZIHD8BZmDWj VlzFKcC3LR5PyQTsPR/eRIHoXmx0i6GUEi8ya0FYdGxi90HsG//R/bDZ/hiPoKHY/Tv3 R1JcNBwrc93BQAS4oyRq+gT166YB/KpEZr/uyv5ol41ci1hlh+hHBbXQHxxNgoOwwlm3 tujLVab0mk70Fgadgn9TqU5cgkkjCvFtHfSTJSbSdAJndirqK2OdJaqwKkAPvn7zAKM5 YWMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761181106; x=1761785906; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eF5szRINfDQPcdZDPA/ySgDDGK3O+2nlJW8awESn4LA=; b=s9mXFFqG5/AU9kSwKae0ioGLXz5xu1/2HMvCiBG1MmbCVRHWXhH0oqnqnSPcKMknEA qnE0SioXRNiv0T7hNaXnxmBKS32n+Pp6Y9pF0YjDpVvy9Z8kz9vgNXjUlj0CI8UAkov8 n8pjraUhrejUQZqcaAs/tOSzvtboNHvsWca5HAmwdGtzqWR2AHxWdtMry9ICkFRAsAWW 7iuQO6NaSMxXey9lIbgJSbl8XxROnS/NWfnN4xBHXsXG4mbKkNX/7rqil9maSA9nVmIk 4H5VG3igZxEcVSAqSb79Pqd3HvVRwlidRU/TL0KTFy42xi4N2eH26QKvZlF0HzINmXrG 9Bag== X-Forwarded-Encrypted: i=1; AJvYcCUP+e6aNEYoBYge68m7reogsaV/kSPe9ItiaLOrlhCWLfwOwv6DFglEYY+R4CjgY3fR7BcOlIK/X7JBLQ==@sourceware.org X-Gm-Message-State: AOJu0YxQ+ddnpCn5tv7dUYtkUQfiHTtsyiDIglDNDn15SRADfEAeB/M2 hFekzAZ92hj8/5Iq7vvs9JM8KwfxgdqV6mMWr/fyLRxzX3cxh5zMRfhB X-Gm-Gg: ASbGnctjuLjrdJlDPw4MkPPtPefRwsGR58zLoDwczdwWvBS+fxe0nXTDrGCFx1bgtVN FOFFZzjgQt+1dSiLB/P+UvZYiGDzRNmKSC1rc9LbzEYZCcePdEgVKj+vjEtdHbGwVRVxVsffzRJ yYKUiBN0+7fqRcB04eJ7A0iZBfGiPWbWbBfbD1lB21NbxVI07g7o6C6VYx8GApGQcs8VGJ3x499 FyAkc4rsmBHX7NPqqUqCLGM3RhHPgR0rqeIC97GNTX+znHgmJpBvy5sXjIy504azaAPYrrKgEYK Mojqn0ChF7DlNkmg02Gy1WjAUbbSO+/wCPY76/NlHvzJLrXwXGRSUP9ub0qOJQLjUR7AF1Woiep VNLoovY6r21A3DjleHZAB3Qog2B6gn8iQMD4iYNKDsvsxSyBgNtpKeWuiauwFQRhF2pQOXfKVza Lm8yfLNWxvIFNTFmW4Izxv2Ew= X-Google-Smtp-Source: AGHT+IEXeyGhLkbPtDv2bNaWhhTGtz1Ym+3ut2zDQ5vX+fciOtydgAT83k2Rjxl8ti2ECYIMxTV4nA== X-Received: by 2002:a05:600c:8509:b0:471:16e5:6d7a with SMTP id 5b1f17b1804b1-4711787dca0mr123985995e9.13.1761181105841; Wed, 22 Oct 2025 17:58:25 -0700 (PDT) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429897f546asm1075415f8f.15.2025.10.22.17.58.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Oct 2025 17:58:25 -0700 (PDT) Message-ID: <27fc25e3-4c19-40cd-b9ce-a87da0fa0dff@gmail.com> Date: Thu, 23 Oct 2025 01:58:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/8] Remove stabs support from GDB From: Luis To: Guinevere Larsen Cc: Tom Tromey , gdb-patches@sourceware.org References: <20251020152853.28195-1-guinevere@redhat.com> <790ea269-165e-4625-8fda-b6e70d260d73@gmail.com> <87347bm6c5.fsf@tromey.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 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" == Luis  > writes: > > Luis> Looks like gcc (13.3.0 at least) is a bit grumpy with this > and there > > Luis> are a few -Werror=array-bounds= 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 incorrectly. > > So it's possible the fix might be just to disable the warning for > that build. > > > > Tom > > > I believe that is the case, since I just installed gcc-13.3.1-2 from > 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 of > 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=all --with-python=python3 --without-guile --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 ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator]’, inlined from ‘void* registry::get(unsigned int) [with T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:213:24, inlined from ‘DATA* registry::key::get(T*) const [with DATA = xcoff_symfile_info; Deleter = std::default_delete; T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:111:36, inlined from ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’ 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 ‘registry [0]’ [-Werror=array-bounds=] 1129 | return *(this->_M_impl._M_start + __n); | ~~~~~~~~~~~~~~^~~~~~~~ In function ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’: cc1plus: note: source object is likely at address zero In member function ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator]’, inlined from ‘void* registry::get(unsigned int) [with T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:213:24, inlined from ‘DATA* registry::key::get(T*) const [with DATA = xcoff_symfile_info; Deleter = std::default_delete; T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:111:36, inlined from ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’ 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 ‘registry [0]’ [-Werror=array-bounds=] In function ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’: cc1plus: note: source object is likely at address zero In member function ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator]’, inlined from ‘void* registry::get(unsigned int) [with T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:213:24, inlined from ‘DATA* registry::key::get(T*) const [with DATA = xcoff_symfile_info; Deleter = std::default_delete; T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:111:36, inlined from ‘void read_symbol(internal_syment*, int)’ at ../../../repos/binutils-gdb/gdb/xcoffread.c:612:38, inlined from ‘CORE_ADDR read_symbol_nvalue(int)’ at ../../../repos/binutils-gdb/gdb/xcoffread.c:635:15, inlined from ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’ 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 ‘registry [0]’ [-Werror=array-bounds=] 1129 | return *(this->_M_impl._M_start + __n); | ~~~~~~~~~~~~~~^~~~~~~~ In function ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’: cc1plus: note: source object is likely at address zero In member function ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator]’, inlined from ‘void* registry::get(unsigned int) [with T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:213:24, inlined from ‘DATA* registry::key::get(T*) const [with DATA = xcoff_symfile_info; Deleter = std::default_delete; T = objfile]’ at ../../../repos/binutils-gdb/gdb/registry.h:111:36, inlined from ‘int read_symbol_lineno(int)’ at ../../../repos/binutils-gdb/gdb/xcoffread.c:649:37, inlined from ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’ 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 ‘registry [0]’ [-Werror=array-bounds=] 1129 | return *(this->_M_impl._M_start + __n); | ~~~~~~~~~~~~~~^~~~~~~~ In function ‘void enter_line_range(subfile*, unsigned int, unsigned int, CORE_ADDR, CORE_ADDR, unsigned int*)’: 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. For reference, the system is using Mint 22.2, which might be equivalent to Ubuntu 24.04.