From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yDmrE8osHmluuBQAWB0awg (envelope-from ) for ; Wed, 19 Nov 2025 15:47:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1763585226; bh=GevkQIy0IcIRRNaip3BXd53zSUSEEqMgNRBv0Dl053g=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aR3fZnplH/xV4ED8BkBbaGK5BCsgCWs6hnO6Yau72vnpqBOl0EZXk+HWq5skb/EzD YxX0emY6M/Coufr5kjj1Kd4xuT5IzZta88j2RtvbnOVTIZT0BW+JqhJOnHx5/6Rb3D GQhzmtJpX6l5lyibre2zX3qnFM64ZvCdSR2NMXVQ= Received: by simark.ca (Postfix, from userid 112) id 38D311E048; Wed, 19 Nov 2025 15:47:06 -0500 (EST) 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 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=eVDLduoj; dkim-atps=neutral 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 9AE0F1E048 for ; Wed, 19 Nov 2025 15:47:05 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 19E5B384D17A for ; Wed, 19 Nov 2025 20:47:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19E5B384D17A Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=eVDLduoj Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 7144D385085D for ; Wed, 19 Nov 2025 20:46:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7144D385085D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7144D385085D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763585187; cv=none; b=usot8jvYvZx+sHcY5ovbZqbQ8NS9czGaeTNlOYPKkHRcQ2tONf9UW+gEKLsZ8U/aM1Wt1vIscbLeukzRvuxjgoJMkvMFx3dVUuqsdpQU4sgGcYdoUvNCS840TVrqdpT2STHtIVha3eJ8VwpYIIsPzrlAF2BFncxUYAxL98wlAYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763585187; c=relaxed/simple; bh=GevkQIy0IcIRRNaip3BXd53zSUSEEqMgNRBv0Dl053g=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=O16BJ7KBBguXB2XEKeQsjqS/6Epbwqz/7vE6X/5zUJDcu6bTbvGScJGLTB2A4bzwtY5HhUJvEBZuiyE4Zl/WchWqsqlFao/lLKLLgvTOEmsFL4D9eIbSI0lsZ2vEpMUBE6ghBe2IYQdKC1yG2uDzBERdr/YfsVcV5JB8XwCCBMU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7144D385085D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1763585186; bh=GevkQIy0IcIRRNaip3BXd53zSUSEEqMgNRBv0Dl053g=; h=Date:Subject:To:References:From:In-Reply-To:From; b=eVDLduojza+RNJ3W6FI657acp8S0lZEnq+EreqkwHwYDusV4n5RxPUxME5k+lwILa e1E2UwNpLnqtOS//BXJwniSaqF4ZHYABeyx6wzmfRhx58K5YjDB9Mc3FbDsRO4bcXV rpPfc5n743DEywiTgxl+Te6gRTp0V6gix/YhdbqU= Received: by simark.ca (Postfix) id A4E581E048; Wed, 19 Nov 2025 15:46:26 -0500 (EST) Message-ID: <9b4f8ff9-d86c-4910-9e0b-acc485102bed@simark.ca> Date: Wed, 19 Nov 2025 15:46:25 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/6] gdb/dwarf: when in dwarf2_cu, read addr_size from dwarf2_cu::header To: Andrew Burgess , Simon Marchi , gdb-patches@sourceware.org References: <20251107211041.520697-1-simon.marchi@efficios.com> <20251107211041.520697-5-simon.marchi@efficios.com> <87jyzmt7rl.fsf@redhat.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <87jyzmt7rl.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 2025-11-19 09:30, Andrew Burgess wrote: > Simon Marchi writes: > >> This patch fixes a crash caused by GDB trying to read from a section not >> read in. The bug happens in those specific circumstances: >> >> - reading a type unit from .dwo >> - that type unit has a stub in the main file >> - there is a GDB index (.gdb_index) present >> >> This crash is the cause of the following test failure: >> >> $ Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.dwarf2/fission-reread.exp ... >> ERROR: GDB process no longer exists > > It's probably worth mentioning that this failure only occurs when using > the cc-with-gdb-index board. Fixed. > I would encourage you to consider extending the existing test to cover > this case without needing to test with the cc-with-gdb-index board. I > think the reality is most people don't test every patch with every > board. But I do understand that, if taken to extreme, that would mean > running every test in every mode, which clearly doesn't scale. But when > we run into a regression my instinct is to ensure that the default test > mode covers this case. And there's plenty of precedent for this in the > testsuite, e.g. gdb.server/*.exp. You're welcome to take the test > changes from the patch linked above if that is useful. Good idea, I'll check that. > Also in the patch linked above is the addition of an assert: > > gdb_assert (this->section ()->readin); > > in 'dwarf2_per_cu::get_header ()'. I haven't checked the later patches > from this series yet, so maybe you already do something similar, but if > not, maybe it would be good to add something like that in this patch, > given that this is dealing with the assert caused by the section not > being read in? Haven't checked the review comments on that patch yet, but the following patch removes dwarf2_per_cu::get_header. Thanks, Simon