From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105035 invoked by alias); 30 Apr 2017 05:14:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 104536 invoked by uid 89); 30 Apr 2017 05:14:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=tot X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 30 Apr 2017 05:14:15 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 089C06B1212DD; Sun, 30 Apr 2017 06:14:13 +0100 (IST) Received: from HHMAIL-X.hh.imgtec.org (10.100.10.113) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.294.0; Sun, 30 Apr 2017 06:14:14 +0100 Received: from BAMAIL02.ba.imgtec.org (10.20.40.28) by HHMAIL-X.hh.imgtec.org (10.100.10.113) with Microsoft SMTP Server (TLS) id 14.3.294.0; Sun, 30 Apr 2017 06:14:14 +0100 Received: from [10.20.2.42] (10.20.2.42) by bamail02.ba.imgtec.org (10.20.40.28) with Microsoft SMTP Server id 14.3.266.1; Sat, 29 Apr 2017 22:14:11 -0700 Subject: Re: [PATCH] Fix PR 21337 v2: segfault when re-reading symbols with remote debugging. To: Simon Marchi References: <20511c76-c816-d31d-5144-749eac9fc470@imgtec.com> <3c5ce0a0-72e5-4460-5555-ad2214866260@imgtec.com> <5c494cc147f71dd8246572aa0b815c9f@polymtl.ca> <7e9595026acbfd2f1a7bff321fa255e1@polymtl.ca> <5b5cc0a61e434a3406cbb25c16b8a550@polymtl.ca> CC: Luis Machado , From: Doug Gilmore Message-ID: Date: Sun, 30 Apr 2017 05:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg00823.txt.bz2 >>> ... >> I'll need to take a look. Last time I tried I it was more difficult >> to expose the problem on the native build of GDB. > > reread_symbols is called when using the run (run_command_1), attach (attach_post_wait which then calls setup_inferior) and load (load_command) commands. So maybe something like this would reproduce it? > > - compile test program > - launch gdb with test program > - touch test program > - run > > Simon > Hi Simon, What I meant was that when I previously did tests with the native build, for some reason the freed data was not being overwritten, or possible written with the same data, at the time read_symbols was called in reread_symbols. Thus problem wasn't exposed before the objfiles_changed is eventually called in reread_symbols. I just did a test with a native build of gdb (7.9.1) and the problem was exposed, so chances are it will be also be exposed with a ToT build. Doug