From: Jonathan Wakely <jwakely@redhat.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>,
"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: testsuite: avoid predictable mkstemp
Date: Wed, 22 Jun 2022 10:16:40 +0100 [thread overview]
Message-ID: <CACb0b4mTtAWt0LVqw88iuJ5teY0-6RyKAB6krHYRWKABPPSZ8Q@mail.gmail.com> (raw)
In-Reply-To: <orv8st9qt6.fsf@lxoliva.fsfla.org>
On Wed, 22 Jun 2022 at 07:05, Alexandre Oliva via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
>
> This patch was originally meant to reduce the likelihood that
> nonexistent_path() returns the same pathname for from and to.
>
> It was prompted by a target system with a non-random implementation of
> mkstemp, that returns a predictable sequence of filenames and selects
> the first one that isn't already taken.
>
> That turned out not to be enough: nonexistent_path adds a suffix to
> the filename chosen by mkstemp and removes the file it created, so
> mkstemp may very well insist on the same basename, and the case that
> doesn't use mkstemp doesn't even check whether the file already
> exists.
>
> Anyway, by the time I realized this wasn't enough, I'd already
> implemented some of the changes, and I figured I might as well
> contribute them, even though they don't really solve any problem, and
> even if they did, they'd be just a partial solution.
>
> Regstrapped on x86_64-linux-gnu, also tested with a cross to
> aarch64-rtems6. Ok to install?
OK
next prev parent reply other threads:[~2022-06-22 9:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 6:04 Alexandre Oliva
2022-06-22 9:16 ` Jonathan Wakely [this message]
2022-06-23 11:39 ` Alexandre Oliva
2022-06-23 16:36 ` Jonathan Wakely
2022-06-27 9:31 ` Alexandre Oliva
2022-06-27 10:18 ` Jonathan Wakely
2022-07-05 9:10 ` Alexandre Oliva
2022-07-05 9:16 ` Jonathan Wakely
2022-07-05 17:45 ` Alexandre Oliva
2022-07-05 18:02 ` Jonathan Wakely
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=CACb0b4mTtAWt0LVqw88iuJ5teY0-6RyKAB6krHYRWKABPPSZ8Q@mail.gmail.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=oliva@adacore.com \
/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).