Dnia środa, 6 marzec 2024 10:09:30 (+01:00), Martin Storsjö napisał(a):
> On Mon, 4 Mar 2024, Martin Storsjö wrote:
>
> > Looking closer at our mkstemp implementation, we have this loop:
> >
> >/*
> >Like OpenBSD, mkstemp() will try at least 2 ** 31 combinations before
> >giv
On Mon, 4 Mar 2024, Martin Storsjö wrote:
Looking closer at our mkstemp implementation, we have this loop:
/*
Like OpenBSD, mkstemp() will try at least 2 ** 31 combinations before
giving up.
*/
for (i = 0; i >= 0; i++) {
for(j = index; j < len; j++) {
t
On Mon, 4 Mar 2024, Martin Storsjö wrote:
Hi,
On Mon, 4 Mar 2024, Mateusz Mikuła wrote:
rand is not random enough and may lead to clashing temporary directories
with multiple parallel link processes as it was observed on Rust's CI.
It can be reproduced with these commands (run them all in wi
Hi,
On Mon, 4 Mar 2024, Mateusz Mikuła wrote:
rand is not random enough and may lead to clashing temporary directories
with multiple parallel link processes as it was observed on Rust's CI.
It can be reproduced with these commands (run them all in without long pauses):
for n in {1..15000}; d
在 2024-03-04 08:04, Mateusz Mikuła 写道:
-template_name[j] = letters[rand () % 62];
+if (rand_s (&r)) return -1;
+template_name[j] = letters[r % 62];
Does it make sense that if `rand_s()` fails, use `rand()` as a fallback?
We have a custom implementation of `r
rand is not random enough and may lead to clashing temporary directories
with multiple parallel link processes as it was observed on Rust's CI.
It can be reproduced with these commands (run them all in without long pauses):
for n in {1..15000}; do rm -f lib/libLLVMAVRAsmParser.a && \
ar qc lib/l