From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69247 invoked by alias); 16 Oct 2017 10:47:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 69232 invoked by uid 89); 16 Oct 2017 10:47:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=much!, much X-HELO: mail-wm0-f49.google.com Received: from mail-wm0-f49.google.com (HELO mail-wm0-f49.google.com) (74.125.82.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Oct 2017 10:47:19 +0000 Received: by mail-wm0-f49.google.com with SMTP id l68so1773652wmd.5 for ; Mon, 16 Oct 2017 03:47:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=tL5kiQsjEFdb0cefJ1aoRs7IcMXnvoMu2wTRfA01bXM=; b=kfkJcsu1p2S3/wZaqjRGngxiQ02piWkk20dLBHPMc1tC6ngir69iBAUX+Kbki8cguJ 1waf/tMY3NpWsL/rseUhF97vd8P8TkS/X94PVRPv4kYd/VIG8Z+vis27/JOf5sTZz4IP II+quDN47bnk/ityTA4LNwE5TmcuaHn38hFxwTG+o+552SCKy6CPZLJUpjFwrKj/vR87 R/13H4lV7t956XPezNMwZ0g0PahdjQDDu880qCnU/S08BJWGoa7wY9b6Fattzm+7U8ga 5Ys0KPxlaAz/ZnWhIxsscEInY5LVtcDrV433m17m5Z3XE7baJXvlfOzRjoLEiO1fWXs7 Nj3g== X-Gm-Message-State: AMCzsaU8dMulSOkm3NKagsJjpOqcWNqjSIWZH5R7eiTaVbGLWlIvjtiS LCtu0IvIDDFgkKZx3j7zg6tmPw== X-Google-Smtp-Source: ABhQp+QnNWidVj3BnNSfgrTaCa6QzKudiiJtWkXbPuIokhPYDlg//lWRajWgkvPfNDzsOBwQH4iT7w== X-Received: by 10.223.134.250 with SMTP id 55mr157791wry.249.1508150836764; Mon, 16 Oct 2017 03:47:16 -0700 (PDT) Received: from [192.168.0.101] (bl17-148-124.dsl.telepac.pt. [188.82.148.124]) by smtp.gmail.com with ESMTPSA id o18sm12122737wrc.45.2017.10.16.03.47.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 03:47:15 -0700 (PDT) Subject: Re: [PATCH] Implement unique_xmalloc_ptr and add more selftests To: David Malcolm , Richard Biener References: <0fb02582-4b8b-d420-d2bc-35fd03d1c116@redhat.com> <1507937723-59812-1-git-send-email-dmalcolm@redhat.com> Cc: GCC Patches , Trevor Saunders , Jonathan Wakely From: Pedro Alves Message-ID: <46f13850-b1bd-7ce4-e7a8-cd826d838966@redhat.com> Date: Mon, 16 Oct 2017 10:53: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: <1507937723-59812-1-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg00976.txt.bz2 On 10/14/2017 12:35 AM, David Malcolm wrote: > As far as I can tell from your mail, the one issue that blocks that > is the lack of gdb::unique_xmalloc_ptr. > > So here's an patch on top of the previous one which adds the > xmalloc_deleter (taken from gdb, but changing "xfree" to > "free", and adding support for pre-C++11 dialects), along with > selftests for unique_ptr, unique_xmalloc_ptr and > unique_xmalloc_ptr. Thanks much! > As before, successfully bootstrapped & regrtested on x86_64-pc-linux-gnu, > using gcc 4.8 for the initial bootstrap (hence testing both gnu++03 > then gnu++14 in the selftests, for stage 1 and stages 2 and 3 > respectively). > Excellent. > Hand-tested with "make selftest-valgrind" with both gnu++03 and > gnu++14. > > Also tested stage1 on powerpc-ibm-aix7.1.3.0 ("gcc111" in the > compile farm; gcc 4.8 i.e. gnu++03) > > Is this OK? Looks great to me. > +/* Verify that gnu::unique_malloc_ptr works. */ Typo: malloc -> xmalloc. Appears in other comments too. Thanks, Pedro Alves