about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorChris Martin <marti4d@live.ca>2022-05-09 12:04:53 -0400
committerChris Martin <marti4d@live.ca>2022-05-10 11:30:46 -0400
commit0c92519d01b30996594cc16832fc52f0702a4855 (patch)
tree7e608683e1aa790f4fd601c14f03c1a1294ef6db /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parente209e85e39b4851c3ec122a45ddeabe318b2d522 (diff)
downloadrust-0c92519d01b30996594cc16832fc52f0702a4855.tar.gz
rust-0c92519d01b30996594cc16832fc52f0702a4855.zip
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
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions