On Wed, 22 Jun 2022 at 07:05, Alexandre Oliva via Libstdc++
<libstd...@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

Reply via email to