kill interned strings computed before random initialization

This commit is contained in:
Benjamin Peterson 2012-02-21 00:40:14 -05:00
parent c7bbd7be94
commit 9be6c3ddf0
1 changed files with 6 additions and 0 deletions

View File

@ -397,6 +397,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':