From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124012 invoked by alias); 23 Oct 2017 20:07:08 -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 123925 invoked by uid 89); 23 Oct 2017 20:07:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Oct 2017 20:07:06 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v9NK6xk6028652 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Oct 2017 16:07:04 -0400 Received: by simark.ca (Postfix, from userid 112) id 6714B1E520; Mon, 23 Oct 2017 16:06:59 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id CD7A61E493; Mon, 23 Oct 2017 16:06:58 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 23 Oct 2017 20:07:00 -0000 From: Simon Marchi To: osscontribute Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix faulty use of obstack_free() to *shrink* dont_print_statmem_obstack. Instead use obstack_blank_fast() with a "negative" size. A real stack data structured would be appropriate here. Added unit test gdb/testsuite/gdb.cp/printstaticrecursion.exp. In-Reply-To: <77217CC1-7D3D-431C-9B43-8EA3BE956827@gmail.com> References: <1508405381-16638-1-git-send-email-osscontribute@gmail.com> <0d612f89-a3a9-afea-965b-7c364b660235@ericsson.com> <6cc773d7-ee68-5f5c-46f4-cc4a044c9d3e@ericsson.com> <77217CC1-7D3D-431C-9B43-8EA3BE956827@gmail.com> Message-ID: <4c34afece8de21552d454c01469bdd8e@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 23 Oct 2017 20:06:59 +0000 X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00732.txt.bz2 On 2017-10-23 15:55, osscontribute wrote: > The obstack_free() interface is pretty bad. It actually expects a > pointer to an existing base (of an object) and not a pointer in the > middle of a growing object. Oops, I saw that reply too late. It would be nice if you could mention that in the commit log, for anyone in the future wondering why that change was made. Thanks, Simon