mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
std::random_device in libstdc++ reads RDSEED on x86 Linux. On an AMD EPYC 9V45 (Zen 5) CI runner its 32-bit results repeat about 130 times in 65536 draws, so guest_posix_random fails. libc now exports HostEntropy_nid_no_patch, which uses getentropy (rand_s on Windows) and throws when the OS cannot provide entropy. arc4random, arc4random_buf, sceRandomGetRandomNumber, /dev/random and /dev/urandom reads, std::_Random_device and sceKernelUuidCreate use it, and the arc4random and random device TechnicalDebt entries say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
205 B
C++
9 lines
205 B
C++
#ifndef CORE_LIBS_PRX_LIBC_INCLUDE_HOSTENTROPY_HPP
|
|
#define CORE_LIBS_PRX_LIBC_INCLUDE_HOSTENTROPY_HPP
|
|
|
|
#include <cstddef>
|
|
|
|
extern "C" void HostEntropy_nid_no_patch(void* buffer, std::size_t size);
|
|
|
|
#endif
|