From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iTKeC/dED2o0GQ0AWB0awg (envelope-from ) for ; Thu, 21 May 2026 13:46:31 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=npRsJ9X7; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2CA7E1E091; Thu, 21 May 2026 13:46:31 -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,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 vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 94C9B1E024 for ; Thu, 21 May 2026 13:46:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 60B604C91779 for ; Thu, 21 May 2026 17:46:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60B604C91779 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=npRsJ9X7 Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 0FA854C91779 for ; Thu, 21 May 2026 17:46:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0FA854C91779 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0FA854C91779 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779385566; cv=none; b=xkr2jHHl9dhXLNJyuSw1DtYt37uKpnj9RyqbcjS4tzKcUzlzmDmKsAeEIjHzJQFNoPKHQOpdcWd+2X/OObAUAcTF2EMmQRhE95WTDxQ7s3KgnFirLfMxyIEHT9RoqecN50hkHEMPzmpqEacUuIAvR8Yo2egoGgZZt2MgW4cAVLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779385566; c=relaxed/simple; bh=I2NbTLXjXTOQuiZg92gHGuJgEVYuOSLgKKKW5YUL1vg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=PRMDh2ugJ1bSVKaVpWyZi2h/BGsIikLyz9c5MQIirLAvfeYuzbQGxxsrDjByDUqtZcm95AhMzZLPoVzry/upACFjfBWmQJXWmen+ELrkMoLBl0sYAOyi2DmUKDVnI6ZUpNmSDEAU0yPB8fd75HjXghK4i8LzNaCoyjDA418OBmg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=npRsJ9X7 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FA854C91779 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 64LHk0Rv067553 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 May 2026 13:46:04 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 64LHk0Rv067553 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1779385565; bh=fxo2/owWdG3yuOCvamgwlb9pc3b5JVsaFJgzreJGhRM=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=npRsJ9X76jIcDX05Dc4bY0r/cXEvkYa3r3Fd8s/THFroiiW9LnAHyf2kfWmiWVCHV Bi2eMCX9GdMKWsAwYu4Pk7JDV+M535mpZ58IFyGI49j70S+6ZbiGccEvIMf0sHw6oF RdXCmltueDgpCWMl5ONb36c6937X10wAZ3q4mhoyRALXQP/9buJX83GZhr2MrOTcXD tDTn/H+GM8p58WuCGUK0Q5JB71usxB5ItZ2cuAsXHgMOBC3hykYE5SezEeslS3xKi2 /BkoP8rCQwkUS1i7Nch8cuYT0IK5GFqCGkgSSMiCPwlkSYOhHqnCWS1uTfLmI+TLEt B4ceANnTQ6ywA== Received: by simark.ca (Postfix) id 395841E024; Thu, 21 May 2026 13:46:00 -0400 (EDT) Message-ID: <095b575b-40b3-4407-8fca-6b38fb94d353@polymtl.ca> Date: Thu, 21 May 2026 13:45:59 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] gdb/dwarf: track whether the all_units vector is sorted To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260520182101.4074675-1-simon.marchi@polymtl.ca> <20260520182101.4074675-2-simon.marchi@polymtl.ca> <87fr3kalgi.fsf@tromey.com> Content-Language: fr From: Simon Marchi In-Reply-To: <87fr3kalgi.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 21 May 2026 17:46:00 +0000 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 5/21/26 10:25 AM, Tom Tromey wrote: >>>>>> "Simon" == simon marchi writes: > > Simon> Note that the flag is cleared when appending a unit even if the vector > Simon> would by chance already be sorted. This is good, because it will catch > Simon> mistakes even on machines where a problem with std::lower_bound would > Simon> not manifest. > > Simon> I checked that this patch would have caught the problem before commit > Simon> fbaef7de7701: > > Simon> (gdb) file /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.dwarf2/debug-names-bad-cu-index/debug-names-bad-cu-index > Simon> Reading symbols from /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.dwarf2/debug-names-bad-cu-index/debug-names-bad-cu-index... > Simon> /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:18092: internal-error: dwarf2_find_unit: Assertion `per_bfd->all_units_sorted' failed. > > Thanks, and especially for checking this. > Approved-By: Tom Tromey > > Tom Thanks, pushed both patches. Simon