rust/library/std/src/sys
Chris Martin 0c92519d01 Make HashMap fall back to RtlGenRandom if BCryptGenRandom fails
Issue #84096 changed the hashmap RNG to use BCryptGenRandom instead of
RtlGenRandom on Windows.

Mozilla Firefox started experiencing random failures in
env_logger::Builder::new() (Issue #94098) during initialization of their
unsandboxed main process with an "Access Denied" error message from
BCryptGenRandom(), which is used by the HashMap contained in
env_logger::Builder

The root cause appears to be a virus scanner or other software interfering
with BCrypt DLLs loading.

This change adds a fallback option if BCryptGenRandom is unusable for
whatever reason. It will fallback to RtlGenRandom in this case.

Fixes #94098
2022-05-10 11:30:46 -04:00
..
common resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
hermit Use a single ReentrantMutex implementation on all platforms. 2022-04-16 11:30:22 +02:00
itron Use a single ReentrantMutex implementation on all platforms. 2022-04-16 11:30:22 +02:00
sgx Use a single ReentrantMutex implementation on all platforms. 2022-04-16 11:30:22 +02:00
solid library: Remove definitions and reexports of strlen from libstd 2022-04-14 21:57:01 +03:00
unix Round timeouts up to infinite in futex_wait on DragonFlyBSD. 2022-05-03 12:37:52 +02:00
unsupported Remove forgotten reexport of ReentrantMutex in sys::unsupported. 2022-04-18 13:10:36 +02:00
wasi Move std::sys::{mutex, condvar, rwlock} to std::sys::locks. 2022-03-22 18:19:47 +01:00
wasm Use futex locks on wasm+atomics. 2022-04-19 09:21:54 +02:00
windows Make HashMap fall back to RtlGenRandom if BCryptGenRandom fails 2022-05-10 11:30:46 -04:00
mod.rs Use target_family = "wasm" 2021-11-10 08:35:42 -08:00