From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id 4229E3857B82; Mon, 27 Jun 2022 22:03:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4229E3857B82 Received: from linux-libre.fsfla.org ([209.51.188.54]:37070 helo=free.home) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5wpG-0002LJ-4d; Mon, 27 Jun 2022 18:03:22 -0400 Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 25RM3BEr901165 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Jun 2022 19:03:11 -0300 From: Alexandre Oliva To: Jonathan Wakely Cc: gcc Patches , "libstdc++" Subject: Re: [PATCH] libstdc++-v3: check for openat Organization: Free thinker, not speaking for the GNU Project References: Errors-To: aoliva@lxoliva.fsfla.org Date: Mon, 27 Jun 2022 19:03:10 -0300 In-Reply-To: (Jonathan Wakely's message of "Mon, 27 Jun 2022 16:56:46 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2022 22:03:33 -0000 On Jun 27, 2022, Jonathan Wakely wrote: > -#if _GLIBCXX_HAVE_DIRFD > +#if _GLIBCXX_HAVE_DIRFD && _GLIBCXX_HAVE_OPENAT && _GLIBCXX_HAVE_UNLINKAT Thanks, I had this bit in the WIP _At_path patch, as well as my updated remove_all patch, in the latest round of tests. I confirm that I don't get any errors with it on an x86_64-linux-gnu native built with openat and unlinkat forced disabled in libstdc++, but on aarch64-rtems6, there are some fails that are not making much sense to me. I haven't looked into any but 27_io/.../copy.cc, so I can't tell whether they've regressed, but copy.cc's test01 did when I put this (or variants thereof) in. Tomorrow I'll look into building libstdc++ with -Og or something else with less optimization than the default, to help me make sense of what's going on that causes copy() to return without as much as creating the destination. FAILED: default@libstdc++,27_io,filesystem,operations,copy_cc FAILED: default@libstdc++,experimental,filesystem,operations,copy_cc .../27_io/filesystem/operations/copy.cc:5[67]: void test01(): Assertion '!exists(to)' failed. FAILED: default@libstdc++,27_io,filesystem,operations,copy_file_cc FAILED: default@libstdc++,experimental,filesystem,operations,copy_file_cc terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what(): filesystem error: cannot copy file: File exists [filesystem-test.000001-copy_file] [filesystem-test.000001-copy_file] FAILED: default@libstdc++,27_io,filesystem,operations,equivalent_cc FAILED: default@libstdc++,experimental,filesystem,operations,equivalent_cc .../27_io/filesystem/operations/equivalent.cc:4[45]: void test01(): Assertion '!result' failed. FAILED: default@libstdc++,27_io,filesystem,operations,relative_cc .../27_io/filesystem/operations/relative.cc:32: void test01(): Assertion 'r == ".."/p' failed. Also still present: .../20_util/from_chars/4.cc:304: error: 'log2' is not a member of 'std'; did you mean 'log'? (IIRC we used to have two of these, we're now down to one) -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about