Commit 0b3b8c7a authored by Benjamin Peterson's avatar Benjamin Peterson

kill interned strings computed before random initialization

parent e4380db1
...@@ -397,6 +397,12 @@ Py_Main(int argc, char **argv) ...@@ -397,6 +397,12 @@ Py_Main(int argc, char **argv)
case 'W': case 'W':
PySys_AddWarnOption(_PyOS_optarg); 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; break;
case 'R': case 'R':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment