mirror of https://github.com/python/cpython.git
Backport fix from default branch for ./python -R -Wd where hash('d') would not
have gotten randomized.
This commit is contained in:
parent
b69fa1f8b7
commit
8757cad394
|
@ -396,6 +396,12 @@ Py_Main(int argc, char **argv)
|
|||
|
||||
case 'W':
|
||||
PySys_AddWarnOption(_PyOS_optarg);
|
||||
/* Extremely obscure hack: if _PyOS_optarg was one character,
|
||||
PyString_FromString in PySys_AddWarnOption will try to intern
|
||||
it. This is bad because hash randomization has not been setup
|
||||
yet, so the string will get the wrong hash. The following call
|
||||
will cause all the cached characters to be released. */
|
||||
PyString_Fini();
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
|
|
Loading…
Reference in New Issue