From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id D9082385E02B for ; Sun, 18 Feb 2024 01:10:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9082385E02B 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 D9082385E02B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708218611; cv=none; b=bXn6A456u+6K9/jWJUPHdWmv0T+BUmgNBvll95su/7aNAGvUaP8yei3oEKZJhTQqY4lSw9+eniyDbJixeP3RiQO8blmRZW24GdFFi4L8wxsxlXqZwwQms4c1fFKTFbsQXKf0I6JGV1WZ8s7yDExveDpULd/ADx5/2hKCWmBxhwY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708218611; c=relaxed/simple; bh=vZrz8nonXmkH97mX8ewsf3GVcBM+U9XsMK9n6YqNSn0=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=rqP8515HgF6T8fu5IYNkAdgmA/BnObQl1R8XgXt+D8JtkjdwcRU8Y8OH31flE5znClvsj6ZtgQ9lQOL9t6ekTdliCQxdeiJR6uuf+9gPQuOqWEo3Yp4Fv6jh6we+j7RDa4Zx7lvYZz83WbhFYLSxZ40KL2fybXeYsu5lCwqs+Gg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6005a.ext.cloudfilter.net ([10.0.30.201]) by cmsmtp with ESMTPS id bKCdr6we2THHubVgzrgAfS; Sun, 18 Feb 2024 01:10:05 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id bVgyrqdfqtT7QbVgyr5yrl; Sun, 18 Feb 2024 01:10:04 +0000 X-Authority-Analysis: v=2.4 cv=M9/uKDws c=1 sm=1 tr=0 ts=65d158ec a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=k7vzHIieQBIA:10 a=Qbun_eYptAEA:10 a=zstS-IiYAAAA:8 a=A6QzgHIXcDPLvcqxvZQA:9 a=QEXdDO2ut3YA:10 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=drNkEIC2EVmBVRmDm5Kj198YWIFobr2QzqVnr0zvy2Q=; b=qPZgU3hONxAoXS04uEfumQYQX9 Y6WawBgTWG9t73GnqdENzH5aaZEU8/ITnOofde8ARHXt8N0USm1zJnPumDBqQ29S896y87wNBrkmx 1+vUd8ghQ/vv2a3CDE613Ktwn; Received: from 71-211-170-195.hlrn.qwest.net ([71.211.170.195]:49770 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 1rbVgy-003IPy-05 for gdb-patches@sourceware.org; Sat, 17 Feb 2024 18:10:04 -0700 From: Tom Tromey Subject: [PATCH 0/7] Fix race in DWARF reader Date: Sat, 17 Feb 2024 18:10:01 -0700 Message-Id: <20240217-dwarf-race-relocate-v1-0-d3d2d908c1e8@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAOlY0WUC/x3MwQrCMAyA4VcZORvoqtDiq4iHLEu3wOwkGSqMv bvV43f4/x1cTMXh2u1g8lLXtTb0pw54pjoJ6tgMMcRLiH3C8U1W0IgFTZaVaROMOaUcypk4R2j l06To53+93ZsHcsHBqPL8ez3INzE4ji/zDy+tfgAAAA== To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 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: 71.211.170.195 X-Source-L: No X-Exim-ID: 1rbVgy-003IPy-05 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-170-195.hlrn.qwest.net ([192.168.0.21]) [71.211.170.195]:49770 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOw5xYmCUZy6YMy2tGaAJsVFYWuVV9ii3SE/pbOYKRh4ZChsRZQezGvZ1/F+NT+iQZZK3RPM5dnPKl/JmxDQSF8t6PzRAj5UDjekhgf8Oz+HV5oD1fAV w4PvI7uxj/kkF8GSWrbgfS/RWy7yO7a2QhqAorT3nwm8VvZoF6S6+nRD72orv3vFvvBuVlXvjTpx6tQMT51R1Wt5QKLkMXhIxJ8= X-Spam-Status: No, score=-3016.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: The background DWARF reader turns out to have a few races. This series fixes one that occurs when the indexer runs at the same time as DWARF relocation. Most of the series is just cleanup / preparation. The main patch affects MIPS16. I can't test this -- I tried on a MIPS machine in the GCC compile farm, but unfortunately the relevant gdb.arch test says that the processor doesn't support MIPS16. It's possible this code is simply dead; I do not know. Regression tested on x86-64 Fedora 38. --- Tom Tromey (7): Compare section index in lookup_minimal_symbol_by_pc_section Remove unnecessary null check in lookup_minimal_symbol_by_pc_section Hoist a call to frob_address Add unrelocated overload of lookup_minimal_symbol_by_pc_section Fix race in background DWARF indexer Use bound_minimal_symbol more in lookup_minimal_symbol_by_pc_section Fix address comparison in lookup_minimal_symbol_by_pc_section gdb/arch-utils.c | 5 +- gdb/arch-utils.h | 3 +- gdb/dwarf2/frame.c | 13 +- gdb/dwarf2/read.c | 12 +- gdb/gdbarch-gen.h | 4 +- gdb/gdbarch.c | 6 +- gdb/gdbarch_components.py | 4 +- gdb/minsyms.c | 449 +++++++++++++++++++++++++--------------------- gdb/minsyms.h | 7 + gdb/mips-tdep.c | 49 +++++ gdb/mips-tdep.h | 2 + 11 files changed, 330 insertions(+), 224 deletions(-) --- base-commit: 989aa9b8e8e340ba65f386cbfd239009a3aba68f change-id: 20240217-dwarf-race-relocate-287780f3ac82 Best regards, -- Tom Tromey