Browse Source
bpo-32329: Fix -R option for hash randomization (#4873)
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.pull/4874/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 63 additions and 39 deletions
-
5Doc/using/cmdline.rst
-
8Include/pylifecycle.h
-
12Lib/test/test_cmd_line.py
-
5Misc/NEWS.d/next/Core and Builtins/2017-12-15-00-13-04.bpo-32329.q47IN2.rst
-
35Modules/main.c
-
37Python/bootstrap_hash.c
@ -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``. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue