From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59445 invoked by alias); 10 Feb 2019 00:31:38 -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 59436 invoked by uid 89); 10 Feb 2019 00:31:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*F:U*kevinb, HX-Envelope-From:sk:kevinb@, sentences, H*M:lan X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Feb 2019 00:31:36 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B2368E6A7C; Sun, 10 Feb 2019 00:31:35 +0000 (UTC) Received: from f29-4.lan (ovpn-116-80.phx2.redhat.com [10.3.116.80]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 874085C234; Sun, 10 Feb 2019 00:31:35 +0000 (UTC) Date: Sun, 10 Feb 2019 00:31:00 -0000 From: Kevin Buettner To: Philippe Waroquiers Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Fix type_stack leaks in c expression parsing. Message-ID: <20190209173134.56bfe46e@f29-4.lan> In-Reply-To: <20190209195000.23057-1-philippe.waroquiers@skynet.be> References: <20190209195000.23057-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00108.txt.bz2 On Sat, 9 Feb 2019 20:50:00 +0100 Philippe Waroquiers wrote: > Fix these by storing the allocated type_stack in the cpstate->type_stacks > vector. > > Tested on debian/amd64, natively and under valgrind. > > gdb/ChangeLog > 2019-02-09 Philippe Waroquiers > > * c-exp.y (direct_abs_decl): emplace_back type_stack. The actual changes in your patch look good to me. One nit regarding the ChangeLog entry though - I think we strive to make our ChangeLog remarks look like sentences where the first word is capitalized. So... maybe something like: * c-exp.y (direct_abs_decl): Use emplace_back to record the type_stack. If you can think of a better ChangeLog comment, that's fine too. Kevin