From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127273 invoked by alias); 18 Jun 2018 19:18:40 -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 127252 invoked by uid 89); 18 Jun 2018 19:18:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.46.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Jun 2018 19:18:37 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 296A44030CF3A for ; Mon, 18 Jun 2018 14:15:37 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id UzcZfP1pIbXuJUzchfc4RG; Mon, 18 Jun 2018 14:15:37 -0500 X-Authority-Reason: nr=8 Received: from 75-166-79-120.hlrn.qwest.net ([75.166.79.120]:50380 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fUzcZ-001kQq-Dk; Mon, 18 Jun 2018 14:15:23 -0500 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA] Use unique_xmalloc_ptr for read_string References: <20180521204146.17553-1-tom@tromey.com> Date: Mon, 18 Jun 2018 19:18:00 -0000 In-Reply-To: (Simon Marchi's message of "Mon, 18 Jun 2018 14:28:03 -0400") Message-ID: <87in6fq52t.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fUzcZ-001kQq-Dk X-Source-Sender: 75-166-79-120.hlrn.qwest.net (pokyo) [75.166.79.120]:50380 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-06/txt/msg00466.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Simon> On 2018-05-21 16:41, Tom Tromey wrote: >> This changes read_string's "buffer" out-parameter to be a >> unique_xmalloc_ptr, then updates the users. This allows for the >> removal of some cleanups. >> >> I chose unique_xmalloc_ptr rather than byte_vector here due to the way >> Guile unwinding seems to work. Simon> Hmm yeah I'm not too sure how Guile exceptions, work. Would the Simon> destructor of a an object local to gdbscm_value_to_string run, if Simon> scm_from_stringn was to throw an exception, I guess that's the Simon> question? Yes - well, I think they would not be run, because guile exceptions are longjmp based. Also I think some replacement for GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS that uses destructors will need to be found. Tom