From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aSpeMSHnEWDdUgAAWB0awg (envelope-from ) for ; Wed, 27 Jan 2021 17:20:17 -0500 Received: by simark.ca (Postfix, from userid 112) id B7A1D1EF80; Wed, 27 Jan 2021 17:20:17 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 080481E940 for ; Wed, 27 Jan 2021 17:20:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1CE89398B8A8; Wed, 27 Jan 2021 22:20:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CE89398B8A8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611786016; bh=SGwjG4yvoVl3dmXILXiMxWrRFy3ilsh+D490L9r26QE=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=AUcy6oRdlPMUwIsWKgLzLKGVVdWM/E5F5X1zp7j4cQZ+5rAiHHtM285VCPgsVtjjy niUN6ZLHnQtGv+Y3xpoDDKfluKWaubfmvR8mQOtQdVqobRzaa4InaCX0UowD50YBSN kfz3ROfQv0qTCpzznIt4QTfmwl9+g9O8pajK1d6A= Received: from beryx.lancelotsix.com (beryx.lancelotsix.com [164.132.98.193]) by sourceware.org (Postfix) with ESMTPS id 627AF382E80B for ; Wed, 27 Jan 2021 22:20:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 627AF382E80B Received: from Plymouth (unknown [IPv6:2a02:390:8443:0:e045:fbff:ea70:d95a]) by beryx.lancelotsix.com (Postfix) with ESMTPSA id A7EF52E071; Wed, 27 Jan 2021 23:20:10 +0100 (CET) Date: Wed, 27 Jan 2021 22:20:08 +0000 To: Tom Tromey Subject: Re: [PATCH][PR gdb/27133] Avoid use after free with logging and debug redirect Message-ID: References: <20210101201127.20835-1-lsix@lancelotsix.com> <87pn2ke9eb.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87pn2ke9eb.fsf@tromey.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (beryx.lancelotsix.com [0.0.0.0]); Wed, 27 Jan 2021 23:20:10 +0100 (CET) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Lancelot SIX via Gdb-patches Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Le Mon, Jan 04, 2021 at 01:26:20PM -0700, Tom Tromey a écrit : > >>>>> "Lancelot" == Lancelot SIX via Gdb-patches writes: > > Lancelot> My copyright assignment has not yet been signed by FSF, but the change > Lancelot> should be small enough not to require it. Otherwise, it will need to > Lancelot> wait a few more days I guess. > > I don't know the state of this -- could you say? > > Lancelot> gdb/ChangeLog: > > Lancelot> PR gdb/27133 > Lancelot> * cli/cli-interp.c (cli_interp_base::set_logging): Ensure the > Lancelot> unique_ptr is released when the wrapped pointer is kept for later > Lancelot> use. > > Thanks. Looking at the code I feel like there's probably some cleaner > way to do this, but this patch is ok regardless. > > Tom Hi, I have pushed this commit. I cannot close the associated bug on bugzilla[1] because my account does not have enough privileges (I can only comment on tickets). Could someone close it for me? Thanks. Lancelot. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27133