From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 782A5385DC1D for ; Fri, 8 Mar 2024 16:27:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 782A5385DC1D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 782A5385DC1D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709915239; cv=none; b=pbtVO4LNQH1dehSy7IkgVpQdCNjs0zBEVh/ZdNhKrU60ZsxNvbwuC93AerQwjpWyrWRd6pNOcETg2H3aTr2cxmt/cDy6SS8XSeuUCPJHXKipOyWUmxRp68rF8UUJEMoBBSz+0tBIgYWulC9h/3yHWR0ScCx9W+pNPqnvtic849U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709915239; c=relaxed/simple; bh=tUXBSxvsBPBkFXh8o1xnWRuNLkhkBXjzalvpbt6Rfww=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=W69t/x9eCnrBfwJeAYmbg7FEtEWPE1DtL/S/paWShazTQ2IvPpoAfUG1nWnU/u2oRbTblwmKbWgiKmVdcsj4VhU/qzy6Mq+ZAUimXRCMZ4YXR33vxZfnTLStKb8bPJ6/fUHzsk/HOMbj4N6s2lmx/KApBiJr5ov6K70OuAm8BxE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6003a.ext.cloudfilter.net ([10.0.30.151]) by cmsmtp with ESMTPS id ickQrwoMZHXmAid40rnQdG; Fri, 08 Mar 2024 16:27:16 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id id3zr3iJhZftYid3zrIBvD; Fri, 08 Mar 2024 16:27:16 +0000 X-Authority-Analysis: v=2.4 cv=DLOJ4TNb c=1 sm=1 tr=0 ts=65eb3c64 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=K6JAEmCyrfEA:10 a=Qbun_eYptAEA:10 a=zd2uoN0lAAAA:8 a=CCpqsmhAAAAA:8 a=zstS-IiYAAAA:8 a=DzHp_ZCFCOana77_LiUA:9 a=ul9cdbp4aOFLsgKbc677:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=PHPgslqYRsAxwFpjQ0wUWAKdecY0cMhDeR96+C2VmGI=; b=dxg6EQ6NGc35EZ32kR731Vbjae B9yTBpU+pBRInmY/mGfe1HwTmfMB/1lDpcQ+r/5wVoes6U6mqTvs72o923EIHM6+jqycWpTZZ2gA4 IIQyr5s0wEdINr1fakbjl9TTp; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:34712 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rid3z-003i8c-13; Fri, 08 Mar 2024 09:27:15 -0700 From: Tom Tromey To: Lancelot SIX Cc: , Subject: Re: [PATCH] gdb/compile: Use std::filesystem::remove_all in cleanup References: <20240303164756.870514-1-lancelot.six@amd.com> X-Attribution: Tom Date: Fri, 08 Mar 2024 09:27:14 -0700 In-Reply-To: <20240303164756.870514-1-lancelot.six@amd.com> (Lancelot SIX's message of "Sun, 3 Mar 2024 16:47:56 +0000") Message-ID: <8734t0sn8d.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.82.115 X-Source-L: No X-Exim-ID: 1rid3z-003i8c-13 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:34712 X-Source-Auth: tom+tromey.com X-Email-Count: 13 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfNO5eSCxHf+QxmeLOJ9t7o9dxUXpzpbRXvqhoWi0QbPnvUfHXnbOUWMXt5pI6Xb8bFzlhdAQEHbiE1kDQt4EUBy05IFhxZ97q1kntQ05wplsZ74BmvCD Nen3SvAju7sFzaExo6sXeKqmOuHBrYBvc2RmKkJkE/WtiBetgjRCD/6s6nxoEsE/joEYtVfTcfYybNRRtBsRu2j1XwqIBqJ2dTs= X-Spam-Status: No, score=-3015.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Lancelot" == Lancelot SIX writes: Lancelot> In a previous review, I noticed that some code in gdb/compile/compile.c Lancelot> could use c++17's `std::filesystem::remove_all` instead of using some Lancelot> `system ("rm -rf ...");`. Lancelot> This patch implements this. Lancelot> Note that I use the noexcept overload of std::filesystem::remove_all and Lancelot> explicitly check for an error code. This means that this code called Lancelot> during the cleanup procedure cannot throw, and does not risk preventing Lancelot> other cleanup functions to be called. Lancelot> Tested on x86_64-linux. Lancelot> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31420 Lancelot> Change-Id: If5668bf3e15e66c020e5c3b4fa999f861690e4cf Thank you. I think this is ok. There might be some risk that there's a compiler that implements C++17 but not std::filesystem. If this happens I suppose we can either consider simply rejecting that compiler, or alternatively, revert this patch. Approved-By: Tom Tromey Tom