From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 2D150395A821 for ; Wed, 27 May 2020 14:53:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2D150395A821 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AD0B51E5F9; Wed, 27 May 2020 10:53:49 -0400 (EDT) Subject: Re: [PATCH v2 00/42] Share DWARF partial symtabs between objfiles To: Pedro Alves , Simon Marchi , Tom Tromey , Simon Marchi via Gdb-patches References: <20200512210913.5593-1-simon.marchi@efficios.com> <875zcn1xwp.fsf@tromey.com> <5032927f-877b-100b-c3a7-55c78d3a7d7a@redhat.com> <058f6a56-4690-cfd8-ede4-a9bbafc85e1a@efficios.com> <28656eeb-c0b3-c601-f05c-14cfe5493a7e@redhat.com> <63f4d428-b0ec-26de-0265-31002b61f4dd@simark.ca> From: Simon Marchi Message-ID: Date: Wed, 27 May 2020 10:53:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 14:53:51 -0000 On 2020-05-27 1:08 a.m., Simon Marchi wrote: > On 2020-05-26 5:34 p.m., Simon Marchi wrote: >> On 2020-05-26 11:35 a.m., Simon Marchi wrote: >>> On 2020-05-26 7:17 a.m., Pedro Alves via Gdb-patches wrote: >>>> On 5/25/20 8:56 PM, Simon Marchi wrote: >>>> >>>>> Other than that, does any of you have further comments? I've done the >>>>> small suggested fixups, but I don't think there was anything big >>>>> requiring another round, is there? >>>> >>>> No further comments from me. >>>> >>>> Thanks, >>>> Pedro Alves >>>> >>> >>> Ok, since I needed to do some non-trivial rebase, I'm giving it another round >>> of testing and I'll push it if it's all good. >>> >>> Simon >>> >> >> Hmmm with the series applied, this triggers ASan: >> >> $ make check TESTS="gdb.base/printcmds.exp" RUNTESTFLAGS="--target_board='cc-with-dwz-m'" >> >> I still haven't found the issue, I'll have to check that later. > > Ok, I think I have found the issue with this one. Here's a brain dump before I go to bed > so I remember tomorrow: > > - Things go wrong in this test because we load the same file twice > - Two objfiles representing the same binary are therefore created during the lifetime of GDB > - I noticed that some symbol belonging to the second objfile had a backlink to a symtab > belonging to the first objfile > - The field dwarf_per_bfd::line_header_hash contains some "struct line_header" objects > - "struct line_header" contains "file_entry" objects, in its m_file_names field > - a "file_entry" object contains a pointer to the symtab that was created based on it > - If you go up the chain, it's then clear that file_entry and line_header are > objfile-specific, so the field line_header_hash should not be in dwarf_per_bfd. I added another patch to the series, see here: https://sourceware.org/pipermail/gdb-patches/2020-May/169065.html The gdb.base/infcall-nested-structs-c.exp / gdb.base/infcall-nested-structs-c++.exp failures just appeared to be intermittent failures in the end. So I think that with this last patch, the series would be good to go. Simon