diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-12-14 23:51:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 23:51:22 (GMT) |
commit | 358e5e17a51ba00742bfaee4557a94c3c4179c22 (patch) | |
tree | 0918046bb6a75f31957b4d0aa24ca73df93d5bbf /Misc/NEWS.d | |
parent | 96a5e50a5de3683b2afd6d680c7ecc4b525986f6 (diff) | |
download | cpython-358e5e17a51ba00742bfaee4557a94c3c4179c22.zip cpython-358e5e17a51ba00742bfaee4557a94c3c4179c22.tar.gz cpython-358e5e17a51ba00742bfaee4557a94c3c4179c22.tar.bz2 |
bpo-32329: Fix -R option for hash randomization (#4873)
bpo-32329, bpo-32030:
* The -R option now turns on hash randomization when the
PYTHONHASHSEED environment variable is set to 0 Previously, the
option was ignored.
* sys.flags.hash_randomization is now properly set to 0 when hash
randomization is turned off by PYTHONHASHSEED=0.
* _PyCoreConfig_ReadEnv() now reads the PYTHONHASHSEED environment
variable. _Py_HashRandomization_Init() now only apply the
configuration, it doesn't read PYTHONHASHSEED anymore.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2017-12-15-00-13-04.bpo-32329.q47IN2.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2017-12-15-00-13-04.bpo-32329.q47IN2.rst b/Misc/NEWS.d/next/Core and Builtins/2017-12-15-00-13-04.bpo-32329.q47IN2.rst new file mode 100644 index 0000000..86bcf23 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2017-12-15-00-13-04.bpo-32329.q47IN2.rst @@ -0,0 +1,5 @@ +The :option:`-R` option now turns on hash randomization when the +:envvar:`PYTHONHASHSEED` environment variable is set to ``0``. Previously, +the option was ignored. Moreover, ``sys.flags.hash_randomization`` is now +properly set to 0 when hash randomization is turned off by +``PYTHONHASHSEED=0``. |