From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28342 invoked by alias); 17 May 2019 07:43:41 -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 28332 invoked by uid 89); 17 May 2019 07:43:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:660 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 May 2019 07:43:39 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E9012ABA1; Fri, 17 May 2019 07:43:36 +0000 (UTC) Subject: Re: [PATCH][gdb] Fix heap-use-after-free in typename_concat To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20190503093124.GA27838@delia> <878sv6w7si.fsf@tromey.com> From: Tom de Vries Message-ID: Date: Fri, 17 May 2019 07:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <878sv6w7si.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00409.txt.bz2 On 16-05-19 20:53, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> When running gdb using AddressSanitizer, and loading a cc1plus binary built > Tom> with profiledbootstrap and -flto, we run into a heap-use-after-free error: > > Thanks for finding this. > > Tom> + { > Tom> + struct cu_partial_die_info res; > Tom> + res.pdi = pd; > Tom> + res.cu = cu; > Tom> + return res; > Tom> + } > > Can't this be just "return {pd, cu};"? > Indeed. Addressed at both locations in commit-post at https://sourceware.org/ml/gdb-patches/2019-05/msg00408.html . Thanks, - Tom