Skip to content
Commit Detail

Commit 259f793

Author
Hood Chatham <roberthoodchatham@gmail.com> 2025-11-11 08:33:48 -0800
Parents
ebda5da
Tree
555ac3c
Python: Add after snapshot import patches and use it to check rng seed (#5475)

In order to allow `random` to be imported at top level, we give it bad
entropy. To make sure that the user doesn't somehow use the random number
generator during startup, we crash on calls to the random module. However,
there is some slim possibility that we failed to block a call. This adds
an extra consistency check that the rng state did not change to ensure that
the random number generator definitely wasn't used.

Files changed