From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 2A8F43858C98 for ; Tue, 16 Apr 2024 17:05:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A8F43858C98 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 2A8F43858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713287132; cv=none; b=tyrp7VJKKHnp81vf6lDAoHzOYWRhFXBZJ1O8DFELQcSTmDSd9dL5eLiKPd1pf9mI3oRvPdGbrfp9os9ko/b+kRaI1wTXNCI52ceZ6waOBrAOvqgc6eRZH4RMZ+RQBAnOsKeimdvof8jziBWrN8lWgDCrHlOaMySghrfafiuHifY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713287132; c=relaxed/simple; bh=DdOI7ntdU11bnf0uLM6M58YvZiB+HCzPyEqhPSceTPo=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=ruRpYFVtizRwQ2NV/K52XmzP2+P94rv+7acpp2dQ3Za7e6lP3aX02ZBhG7LQBApfodkY2hsSED5wVws0YJKxUxAshPoQfyYPttOO+ZbSF7/DdBoZTFWDd7+RaIYcp3zYFThRt9gw8lM8AkjfKAU9kC0gv5Edsr9KwEk6k8ISzu4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6003a.ext.cloudfilter.net ([10.0.30.151]) by cmsmtp with ESMTPS id wlIxrCY0xtf2QwmFJrHyCX; Tue, 16 Apr 2024 17:05:25 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id wmFIrmWeed4oewmFIrvNw9; Tue, 16 Apr 2024 17:05:24 +0000 X-Authority-Analysis: v=2.4 cv=aYKqngot c=1 sm=1 tr=0 ts=661eafd4 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=raytVjVEu-sA:10 a=Qbun_eYptAEA:10 a=CCpqsmhAAAAA:8 a=zstS-IiYAAAA:8 a=Oyh0xDUoJ2tOqX8ve7UA:9 a=QEXdDO2ut3YA:10 a=ul9cdbp4aOFLsgKbc677:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Pg+hmOQ/q9y6PB+pQxd2vJ6CgObb/4QPrJXkwHGn9YQ=; b=lV2cFtbTNs/XFjbxarOPFLFosq lzCID+cWj+f1ZvpAwbMOauf1kQ+RqYpHirNt8gyTAdnpclcJLg8N5SQHNSJsKst3OM+0ElMbcuG6+ lgSLBlikZAtUUl7DoIDi6Ab/D; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:36636 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rwmFI-002fVU-0S for gdb-patches@sourceware.org; Tue, 16 Apr 2024 11:05:24 -0600 From: Tom Tromey Subject: [PATCH 0/5] Fix race in DWARF reader, 2nd approach Date: Tue, 16 Apr 2024 11:05:22 -0600 Message-Id: <20240416-dwarf-race-relocate-2-v1-0-1fc912e95e87@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIANKvHmYC/x3MSw7CMAwA0atUXmPRpKF8roJYOKnbWoIE2RUgV b07geVbzKxgrMIGl2YF5ZeYlFzhdg2kmfLEKEM1+NaHNrgehzfpiEqJUfleEi2MHnvvTucQu+7 oDlDbp/Ion//3equOZIxRKaf5dysqk+T9g2xhhW37AvDsIxaHAAAA To: gdb-patches@sourceware.org X-Mailer: b4 0.13.0 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: 1rwmFI-002fVU-0S X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net ([192.168.0.21]) [97.122.82.115]:36636 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPiiGeLddS2NoMU23G26Xv8I2wR0Dq3piv8T0QVrnZKOOItbADJl2UFQ3OTRyrpw34ow4nGfZzt0moWaWp1knQDSQ0FrTK/vQdAOtyGYPos1OSy83dDf BDmuQbW/p4ur9Wp9Ve8v2giilpWf8QFBiu+rfhrnrwQlybeCHZ7shP8/Kzh7SIFqE+g07xFkJUzpRq9OyBkyoccJD49NCUvhpQM= X-Spam-Status: No, score=-3015.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP 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: This series is a different approach to fixing the race pointed out in PR gdb/31261. The problem there is that the indexer can be running at the same time that an objfile is relocated, resulting in races in dwarf2_per_objfile::adjust. The previous series to fix this problem is here: https://inbox.sourceware.org/gdb-patches/20240217-dwarf-race-relocate-v1-0-d3d2d908c1e8@tromey.com/ This series is less invasive and works by justifying the eventual removal of the 'adjust' method. Regression tested on x86-64 Fedora 38. I also tested this in a small way on a MIPS executable. I don't have access to a machine where I can truly test MIPS16 in its entirety, but what I did is make an executable where one function was marked __attribute__((mips16)). Then, I tested that the symbol side of gdb still correctly applies the address transform in "break" and "disassemble" commands with this series applied. --- Tom Tromey (5): Remove call to dwarf2_per_objfile::adjust from ranges readers Remove more calls to dwarf2_per_objfile::adjust Remove call to dwarf2_per_objfile::adjust from read_call_site_scope Remove call to dwarf2_per_objfile::adjust from read_attribute_value Remove dwarf2_per_objfile::adjust gdb/dwarf2/aranges.c | 2 -- gdb/dwarf2/read-gdb-index.c | 2 -- gdb/dwarf2/read.c | 45 ++++++++++----------------------------------- gdb/dwarf2/read.h | 4 ---- 4 files changed, 10 insertions(+), 43 deletions(-) --- base-commit: 12f5356130c2cda10e2589e74a8716563050dccb change-id: 20240416-dwarf-race-relocate-2-621894b33715 Best regards, -- Tom Tromey