From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 7090D3858412 for ; Thu, 14 Mar 2024 14:31:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7090D3858412 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7090D3858412 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710426720; cv=none; b=mw0wJc84aA2rYf0PrZIbiFIoxtBziQwGZBqDngA20bgkLzeHuzDyKbtLBTiANBhwjaB6B4j46vRtTlZoWJbW/R43rbcB/EuhQ21p3TCTYvvLzm+0y99E7FSyMUXbeh7XwbRPcka3dfedgoXwtgvjIVO+Xeh4xIN2lcAYYgfxK/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710426720; c=relaxed/simple; bh=+nQaUiTzGsIY/UkFgJD5eJUGuU4D+0vm4WRAVZ/sMQA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=P6oHydDY+qNyI2IsUob9fxUUtyfvoyxOlIDZuM6IKpFg2RE/c2sIP2Wtau1YXVIsB55iXIX8qunzCWSmrccwGw+rGJaEZ6K+04AMbjJjjZvHpJkJ5g/3ACYL0fhLVjz+UHzsv4nBRR2gjZsmQY+VLGyFAhR+QhKQEPmRN6rSTgI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5005a.ext.cloudfilter.net ([10.0.29.234]) by cmsmtp with ESMTPS id klhQrsFJ0uh6skm7irg4vW; Thu, 14 Mar 2024 14:31:58 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id km7hrw5unvUZTkm7hrB48y; Thu, 14 Mar 2024 14:31:57 +0000 X-Authority-Analysis: v=2.4 cv=MoBU6Xae c=1 sm=1 tr=0 ts=65f30a5d a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=K6JAEmCyrfEA:10 a=Qbun_eYptAEA:10 a=dzWzf_mpAAAA:8 a=AzvtEkfB_yTovG8o8IAA:9 a=zgiPjhLxNE0A:10 a=b4DR9a7p2ZdsqdHBznES:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ljOtMRTfGqejSF117fRuqxpDkcQUemL+xtHTnB2bkPI=; b=uSBp0o+p6ToW2MyjiGP/BVDbA4 yQNAln/4NkTRi30KEkYQ1DIq9Y5rrlcPflcMPi503f8if++Yr1CEQgSctuReP3pi5l4SNQS9SX7Fi dYngc5leJji+N+IUfPVUAFUGE; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:52822 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rkm7g-003zUu-2K; Thu, 14 Mar 2024 08:31:56 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Aaron Merey , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/dwarf2: Check for missing abbrev References: <20240313201827.1853989-1-amerey@redhat.com> <878r2lm1un.fsf@tromey.com> <22883d8d-b634-4e71-802c-239114d01279@simark.ca> X-Attribution: Tom Date: Thu, 14 Mar 2024 08:31:55 -0600 In-Reply-To: <22883d8d-b634-4e71-802c-239114d01279@simark.ca> (Simon Marchi's message of "Thu, 14 Mar 2024 09:56:18 -0400") Message-ID: <87r0gclw9w.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.82.115 X-Source-L: No X-Exim-ID: 1rkm7g-003zUu-2K X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:52822 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKlQiiva5ZEgFiKnZGH0dQrfVEeIHnjNlxYgDu+MoklO/AZ87pl9eo+t260Voh0WPI0UOS+p7Jx5QgQ5VcVTmWuGUQn8w4lBkuMAmHZuj3ntXXoRaYRt 7x9neTnrTYkPVSVPMfXyOowBzO+fI65UJZE65pX19zu+zc9dh6yw4xa+cQMm1fDv+VcQxkaODdr+n0bLXXPZYiRH59CF+U8Mr3o= X-Spam-Status: No, score=-3015.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Simon" == Simon Marchi writes: >> The issue is corrupt DWARF -- the DIE specifies an abbrev that doesn't exist. Simon> If it was an abbrev number that didn't exist, then peek_die_abbrev would Simon> throw here: Yeah sorry about that. Simon> If peek_die_abbrev returns nullptr, it's because it read abbrev number 0 Simon> specifically (which normally means "end of DIE list", but is unexpected Simon> at this particular place). So I'm just wondering what "kind" of Simon> corruption causes it to be 0. The concrete case I'm worried about is Simon> the possibility that the file is truncated and we go read an offset that Simon> is out of our buffer's bounds. In that case, some bounds checking Simon> should probably be added somehwere. Yes, this definitely needs to be done at some point. Tom