public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <oliva@adacore.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>,
	"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++-v3: check for openat
Date: Mon, 27 Jun 2022 09:00:39 -0300	[thread overview]
Message-ID: <ory1xixqmw.fsf@lxoliva.fsfla.org> (raw)
In-Reply-To: <CACb0b4mSarKMponQpYS8zpk1HwW9h-+rdunCzcPDscHFYzF3ug@mail.gmail.com> (Jonathan Wakely's message of "Thu, 23 Jun 2022 18:47:33 +0100")

On Jun 23, 2022, Jonathan Wakely <jwakely@redhat.com> wrote:

> It defines a new _At_path type which contains a {fd, path} pair (to be
> used together by openat and unlinkat) and a separate path to be used
> on its own. This allows identifying a file within a directory
> unambiguously, without being concerned with whether HAVE_OPENAT and
> HAVE_UNLINKAT are defined.

> With this change I don't think your patch to make dir_and_pathname()
> check HAVE_OPENAT is needed.

*nod*, I've amended your patch in my local tree to reverse them both.

> This passes tests on x86_64-linux.

Have you by any chance tried it while forcing libstdc++ not to use
openat?

I'm debugging 27_io/.../copy.cc on rtems with a fixed remove_all (there
were bugs in the previous version I posted), and hitting an exception
within the very first call of dir.__erase() in the remove_all at the end
of test_pr99290, after an attempt to open "source" fails.  It looks like
the atp.pathname is missing the nonexistent_path assigned to variable
dir in test_pr99290, so we attempt to open subdirs thereof as if with
openat.

-- 
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 <https://stallmansupport.org>

  reply	other threads:[~2022-06-27 12:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  6:41 Alexandre Oliva
2022-06-22 10:36 ` Jonathan Wakely
2022-06-23  4:41   ` Alexandre Oliva
2022-06-23  9:29     ` Jonathan Wakely
2022-06-23 11:08   ` Alexandre Oliva
2022-06-23 11:37     ` Jonathan Wakely
2022-06-23 14:05       ` Alexandre Oliva
2022-06-23 17:47         ` Jonathan Wakely
2022-06-27 12:00           ` Alexandre Oliva [this message]
2022-06-27 13:05             ` Alexandre Oliva
2022-06-27 13:32               ` Jonathan Wakely
2022-06-27 14:00                 ` Jonathan Wakely
2022-06-27 15:56                   ` Jonathan Wakely
2022-06-27 22:03                     ` Alexandre Oliva
2022-06-28  8:36                       ` Jonathan Wakely
2022-06-28 12:04                         ` Alexandre Oliva
2022-06-28 13:12                           ` Jonathan Wakely
2022-06-24 11:03         ` Jonathan Wakely
2022-06-27  9:49           ` Alexandre Oliva
2022-06-27  9:52             ` Jonathan Wakely
2022-06-24  2:34     ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ory1xixqmw.fsf@lxoliva.fsfla.org \
    --to=oliva@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).